<Page x:Name="Page_Access"
    x:Class="Zebra_RFID_Mobile.PageAccess"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Zebra_RFID_Mobile"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
    <Page.Resources>
        <Flyout x:Name="AcessFlyout" x:Key="AcessFlyout">
            <TextBlock x:Name="TextAccessStatus"  Text="{Binding RecievedStatus}" FontSize="22" VerticalAlignment="Center" Margin="0,0,0,10" Width="340" TextWrapping="Wrap" HorizontalAlignment="Center" Height="80"/>
        </Flyout>
    </Page.Resources>
    <Page.BottomAppBar>
        <CommandBar >
            <CommandBar.PrimaryCommands>
                <AppBarButton x:Name="AppBarButtonRapidRead" x:Uid="RapidRead" Label="RapidRead" Click="AppBarButtonGoToRapidRead">
                    <AppBarButton.Icon>
                        <BitmapIcon UriSource="Assets/tab_rapidread.png"/>
                    </AppBarButton.Icon>
                </AppBarButton>
                <AppBarButton x:Name="AppBarButtonInventory" x:Uid="Inventory" Label="Inventory" Click="AppBarButtonGoToInventory" >
                    <AppBarButton.Icon>
                        <BitmapIcon UriSource="Assets/tab_inventory.png"/>
                    </AppBarButton.Icon>
                </AppBarButton>
                <AppBarButton x:Name="AppBarButtonAccess1" x:Uid="Access" Label="Access" Click="AppBarButtonGoToAccess" >
                    <AppBarButton.Icon>
                        <BitmapIcon UriSource="Assets/tab_access.png"/>
                    </AppBarButton.Icon>
                </AppBarButton>
                <AppBarButton x:Name="s" x:Uid="Locate Tag" Label="LocateTag" Click="AppBarButtonGoToLocateTag">
                    <AppBarButton.Icon>
                        <BitmapIcon UriSource="Assets/tab_locate.png"/>
                    </AppBarButton.Icon>
                </AppBarButton>
            </CommandBar.PrimaryCommands>
        </CommandBar>
    </Page.BottomAppBar>
    <Grid>
        <Pivot Margin="0,50,0,0" FontSize="36">
            <PivotItem Header="Read\Write" FontSize="22" Margin="0">
                <Grid x:Name="GridReadWrite" Margin="0">
                    <TextBlock HorizontalAlignment="Left" Margin="10,115,0,0" TextWrapping="Wrap" Text="Memory Bank" VerticalAlignment="Top" Width="140" FontSize="20"/>
                    <TextBlock HorizontalAlignment="Left" Margin="10,65,0,0" TextWrapping="Wrap" Text="Password" VerticalAlignment="Top" FontSize="20"/>
                    <TextBlock HorizontalAlignment="Left" Margin="10,255,0,0" TextWrapping="Wrap" Text="Data" VerticalAlignment="Top"  Width="63"/>
                    <TextBlock HorizontalAlignment="Left" Margin="10,215,0,0" TextWrapping="Wrap" Text="Length (words)" VerticalAlignment="Top" FontSize="20"/>
                    <TextBlock HorizontalAlignment="Left" Margin="10,165,0,0" TextWrapping="Wrap" Text="Offset (words)" VerticalAlignment="Top" FontSize="20"/>
                    <TextBox x:Name="TextBoxTagPatternReadWrite" Text="{Binding SelectedTag, Mode=TwoWay}" HorizontalAlignment="Left" Margin="10,15,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="340" FontSize="18" Background="#FFF4F4F5" Opacity="0.5" MaxLength="256" PlaceholderText="Tag Pattern"/>
                    <TextBox x:Name="TextBoxReadData" Text="{Binding RecievedData}" HorizontalAlignment="Left" Margin="10,285,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="340" Height="100" FontSize="18" Background="White" Opacity="0.5" MaxLength="512"/>
                    <TextBox x:Name="TextBoxReadPassword" HorizontalAlignment="Left" Margin="150,67,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="200" FontSize="18" Height="30" Background="#FFF4F4F5" Opacity="0.5" Text="0" MaxLength="8"/>
                    <ComboBox x:Name="ComboBoxMemoryBankReadWrite" HorizontalAlignment="Left" Margin="150,115,0,0" VerticalAlignment="Top" PlaceholderText="Select " Width="200" Canvas.ZIndex="1" />
                    <TextBox x:Name="TextBoxReadOffset" HorizontalAlignment="Left" Margin="150,165,0,0" TextWrapping="Wrap" VerticalAlignment="Top"  Width="200" FontSize="18" Background="#FFF4F4F5" Opacity="0.5" Text="2" InputScope="Number" MaxLength="4"/>
                    <TextBox x:Name="TextBoxReadLenght" HorizontalAlignment="Left" Margin="150,215,0,0" TextWrapping="Wrap" VerticalAlignment="Top"  Width="200" FontSize="18" Background="#FFF4F4F5" Opacity="0.5" Text="0" InputScope="Number" MaxLength="4" />
                    <Button x:Name="ButtonWrite" HorizontalAlignment="Left" Margin="200,395,0,0" VerticalAlignment="Top" Content="Write" FontSize="22" FontWeight="Bold" Width="150" Click="ButtonWrite_Click" Height="60" FlyoutBase.AttachedFlyout="{StaticResource AcessFlyout}"/>
                    <Button x:Name="ButtonRead" Content="Read" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="25,395,0,0" FontSize="22" FontWeight="Bold" Width="150" Click="ButtonRead_Click" Height="60" FlyoutBase.AttachedFlyout="{StaticResource AcessFlyout}"/>
                </Grid>
            </PivotItem>
            <PivotItem Header="Lock" FontSize="22" Margin="0">
                <Grid x:Name="GridLock">
                    <TextBox x:Name="TextBoxTagPatternLock" Text="{Binding SelectedTag, Mode=TwoWay}" HorizontalAlignment="Left" Margin="10,30,0,0" TextWrapping="Wrap" VerticalAlignment="Top"  Width="340" FontSize="18" Background="#FFF4F4F5" Opacity="0.5" MaxLength="256" PlaceholderText="Tag Pattern"/>
                    <TextBlock HorizontalAlignment="Left" Margin="10,100,0,0" TextWrapping="Wrap" Text="Password" VerticalAlignment="Top" Height="26" FontSize="20"/>
                    <TextBox x:Name="TextBoxLockPassword" HorizontalAlignment="Left" Margin="150,100,0,0" TextWrapping="Wrap" VerticalAlignment="Top"  Width="200" FontSize="18" Background="#FFF4F4F5" Opacity="0.5" MaxLength="8" Text="0"/>
                    <Button x:Name="ButtonLock" Content="LOCK" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,20" Width="340" FontSize="22" FontWeight="Bold" Click="ButtonLock_Click" Height="60" FlyoutBase.AttachedFlyout="{StaticResource AcessFlyout}"/>
                    <TextBlock HorizontalAlignment="Left" Margin="10,160,0,0" TextWrapping="Wrap" Text="Memory Bank" VerticalAlignment="Top" Height="26" FontSize="20"/>
                    <ComboBox x:Name="ComboBoxLockPrivileges" HorizontalAlignment="Left" Margin="150,220,0,0" VerticalAlignment="Top" PlaceholderText="Select " Width="200" />
                    <TextBlock HorizontalAlignment="Left" Margin="10,220,0,0" TextWrapping="Wrap" Text="Lock Privilege" VerticalAlignment="Top" Height="26" FontSize="20"/>
                    <ComboBox x:Name="ComboBoxMemoryBankLock" HorizontalAlignment="Left" Margin="150,160,0,0" VerticalAlignment="Top" PlaceholderText="Select " Width="200"/>

                </Grid>
            </PivotItem>
            <PivotItem Header="Kill" FontSize="22" Margin="0">
                <Grid x:Name="GridKill">
                    <TextBox x:Name="TectBoxTagPatternKill" Text="{Binding SelectedTag, Mode=TwoWay}" HorizontalAlignment="Left" Margin="10,30,0,0" TextWrapping="Wrap" VerticalAlignment="Top"  Width="340" FontSize="18" Opacity="0.5" MaxLength="256" PlaceholderText="Tag Pattern"/>
                    <TextBlock HorizontalAlignment="Left" Margin="10,110,0,0" TextWrapping="Wrap" Text="Kill Password" VerticalAlignment="Top" Height="26" FontSize="20"/>
                    <TextBox x:Name="TextBoxKillPassword" HorizontalAlignment="Left" Margin="150,110,0,0" TextWrapping="Wrap" VerticalAlignment="Top"  Width="200" FontSize="18" Opacity="0.5" MaxLength="8" Text="0"/>
                    <Button x:Name="ButtonKill" Content="KILL" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,20" Width="340" FontSize="22" FontWeight="Bold" Click="ButtonKill_Click" Height="60" FlyoutBase.AttachedFlyout="{StaticResource AcessFlyout}"/>
                </Grid>
            </PivotItem>
        </Pivot>
        <AppBarButton HorizontalAlignment="Left" Icon="Back" Label="Home" Margin="10,0,0,0" VerticalAlignment="Top" Width="Auto" Click="AppBarButton_Click"/>
        <TextBlock HorizontalAlignment="Left" Margin="80,10,0,0" TextWrapping="Wrap" Text="Access" VerticalAlignment="Top" FontSize="30"/>
        <Button x:Name="Batterybutton" HorizontalAlignment="Left" Margin="320,0,0,0" VerticalAlignment="Top" Width="40" Height="55" Background="{x:Null}" Click="Batterybutton_Click">
            <Image x:Name="BatteryDPO" Source="{Binding BatteryDPOImage}"/>
        </Button>
    </Grid>
</Page>
