<Window x:Class="WPF_ScanControl_Sample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:p="clr-namespace:WPF_ScanControl_Sample.Properties"
        mc:Ignorable="d"
        WindowStartupLocation="CenterScreen"
        Loaded="MainWindow_OnLoaded" Closing="MainWindow_OnClosing"
        FontSize="14"
        Title="{x:Static p:Resources.TitleApp}" Height="450" MinHeight="450" Width="800" MinWidth="600">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="240"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Column="0" Orientation="Vertical" Margin="15,10,10,0">
            <Button Name="btnGetScanners" Click="BtnGetScanners_OnClick" Height="30" Content="{x:Static p:Resources.BtnDetect}"/>
            <Button Name="btnOpen" Click="BtnOpen_OnClick" Height="30" Margin="0,10,0,0" Content="{x:Static p:Resources.BtnOpen}" IsEnabled="False"/>
            <Button Name="btnNeedCalibrate" Click="BtnNeedCalibrate_OnClick" Height="30" Margin="0,10,0,0" Content="{x:Static p:Resources.BtnIsNeedCalibrate}" IsEnabled="False"/>
            <Button Name="btnCalibrate" Click="BtnCalibrate_OnClick" Height="30" Margin="0,10,0,0" Content="{x:Static p:Resources.BtnCalibrate}" IsEnabled="False"/>
            <Grid Margin="0,10,0,0">
                <Label>DPI:</Label>
                <ComboBox Name="cbDpi" Margin="50,0,0,0" VerticalContentAlignment="Center" IsEnabled="False"/>
            </Grid>
            <Button Name="btnStartScan" Height="30" Click="BtnStartScan_OnClick" Margin="0,10,0,0" Content="{x:Static p:Resources.BtnStartScan}" IsEnabled="False"/>
            <Button Name="btnStartScanMemory" Height="30" Click="BtnStartScanMemory_OnClick" Margin="0,10,0,0" Content="{x:Static p:Resources.BtnStartScanMemory}" IsEnabled="False"/>
            <Button Name="btnClose" Height="30" Click="BtnClose_OnClick" Margin="0,10,0,0" Content="{x:Static p:Resources.BtnClose}" IsEnabled="False"/>

            <Grid Margin="0,15,0,0" VerticalAlignment="Top">
                <Label Content="{x:Static p:Resources.TextApiVersion}"/>
                <Label Name="lbApiVersion" Margin="140,0,0,0" FontWeight="Bold">---</Label>
                <Label Margin="0,20,0,0" Content="{x:Static p:Resources.TextCurrentScanner}"/>
                <Label Name="lbCurrentScanner" Margin="140,20,0,0" FontWeight="Bold" Foreground="Red">None</Label>
                <Label Margin="0,40,0,0" Content="{x:Static p:Resources.TextStatus}"/>
                <Label Name="lbOpenStatus" Margin="140,40,0,0" FontWeight="Bold">Closed</Label>
            </Grid>
        </StackPanel>

        <DockPanel Grid.Column="1" VerticalAlignment="Top">
            <Label DockPanel.Dock="Left" Margin="10,10,0,0" Content="{x:Static p:Resources.TextOutputFolder}"/>
            <Button DockPanel.Dock="Right" Name="btnOpenFolder" Click="BtnOpenFolder_OnClick" Width="70" Height="30" Margin="0,10,24,0"
                    Content="{x:Static p:Resources.BtnOpenFolder}"/>
            <Label Name="lbOutputPath" Margin="0,10,0,0"></Label>
        </DockPanel>

        <GroupBox Grid.Column="1" Name="groupBoxScanImage" Margin="10,50,20,20" Header="{x:Static p:Resources.TextImagePreview}">
            <Image Stretch="Uniform" Name="imagePreview" Margin="10"/>
        </GroupBox>
    </Grid>
</Window>
