<?xml version="1.0" encoding="utf-8"?>
<Window x:Class="QFDT.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:my2="clr-namespace:QFDT" xmlns:my="clr-namespace:QFDT_Components;assembly=QFDT_Components" xmlns:my1="clr-namespace:QFDT_Components;assembly=QFDT_Components" xmlns:my3="clr-namespace:ShopFloorControl;assembly=ShopFloorControl" x:Name="Main" Title="{DynamicResource AppTitle}" Width="850" ResizeMode="CanMinimize" WindowStartupLocation="CenterScreen" Height="830" Closing="QFDT_Closing">
  <FrameworkElement.Resources>
    <ResourceDictionary>
      <RoutedUICommand x:Key="TurnPSOn" Text="Text" />
      <RoutedUICommand x:Key="TurnPSOff" Text="Another Text" />
    </ResourceDictionary>
  </FrameworkElement.Resources>
  <UIElement.InputBindings>
    <KeyBinding Key="P" Modifiers="Ctrl" Command="{StaticResource TurnPSOn}" />
    <KeyBinding Key="P" Modifiers="Alt" Command="{StaticResource TurnPSOff}" />
  </UIElement.InputBindings>
  <UIElement.CommandBindings>
    <CommandBinding Command="{x:Static my2:MainWindow.AboutCmd}" Executed="AboutCmdExecuted" CanExecute="AboutCmdCanExecute" />
    <CommandBinding Command="{x:Static my2:MainWindow.ExitCmd}" Executed="ExitCmdExecuted" CanExecute="ExitCmdCanExecute" />
    <CommandBinding Command="Delete" Executed="Delete_Executed" CanExecute="Delete_CanExecute" />
    <CommandBinding Command="{x:Static my2:MainWindow.CloneCmd}" Executed="Clone_Executed" CanExecute="Clone_CanExecute" />
    <CommandBinding Command="New" Executed="New_Executed" CanExecute="New_CanExecute" />
    <CommandBinding Command="{x:Static my2:MainWindow.EditCmd}" Executed="Edit_Executed" CanExecute="Edit_CanExecute" />
    <CommandBinding Command="{x:Static my2:MainWindow.OptionsCmd}" Executed="Options_Executed" CanExecute="Options_CanExecute" />
    <CommandBinding Command="{x:Static my2:MainWindow.PresentationCmd}" Executed="Presentation_Executed" CanExecute="Presentation_CanExecute" />
    <CommandBinding Command="{StaticResource TurnPSOn}" Executed="bnPSOn_Click" />
    <CommandBinding Command="{StaticResource TurnPSOff}" Executed="bnPSOff_Click" />
  </UIElement.CommandBindings>
  <StackPanel Margin="0,0,0,0">
    <Menu>
      <MenuItem Header="{DynamicResource File}">
        <MenuItem Command="New" Header="{DynamicResource NewProduct}" />
        <MenuItem Command="{x:Static my2:MainWindow.EditCmd}" Header="Edit" />
        <MenuItem Command="Delete" Header="{DynamicResource DeleteProduct}" />
        <MenuItem Header="{DynamicResource DuplicateProduct}" Command="{x:Static my2:MainWindow.CloneCmd}" />
        <Separator />
        <MenuItem Header="{DynamicResource Exit}" Command="{x:Static my2:MainWindow.ExitCmd}" />
      </MenuItem>
      <MenuItem Header="{DynamicResource Tools}">
        <MenuItem Header="{DynamicResource Options}" Command="{x:Static my2:MainWindow.OptionsCmd}" />
      </MenuItem>
      <MenuItem Header="{DynamicResource Help}">
        <MenuItem Header="{DynamicResource HelpDoc}" Command="{x:Static my2:MainWindow.PresentationCmd}" />
        <MenuItem Header="{DynamicResource About}" Command="{x:Static my2:MainWindow.AboutCmd}" />
      </MenuItem>
    </Menu>
    <StackPanel Margin="0,10,0,10">
      <StackPanel Orientation="Horizontal">
        <Label Name="lblProduct" Content="{DynamicResource Product}" Margin="20,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <ComboBox Name="comboProducts" HorizontalAlignment="Left" Margin="50,0,0,0" VerticalAlignment="Center" Width="150" SelectionChanged="comboProducts_SelectionChanged" />
        <Label Content="COM:" Margin="50,0,0,0" />
        <TextBox Name="ConnectionStatus" Text="" IsReadOnly="False" Width="60" Margin="10,0,0,0" />
        <Button Margin="10,0,0,0" Width="80" Content="Connect" Click="Connect_Click" />
        <Button Margin="50,0,0,0" Width="100" Content="Operating Mode" Click="OpMode_Click" />
        <TextBox Name="OpModeStatus" Text="" IsReadOnly="True" Margin="10,0,0,0" Width="100" />
      </StackPanel>
      <Expander Header="Device Information" Panel.ZIndex="99" BorderThickness="2">
        <Canvas>
          <StackPanel>
            <ListBox Name="listInformation2" Height="100" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top" Width="500" />
            <StackPanel Orientation="Horizontal">
              <Button Name="PI1" Content="" Width="100" Margin="10,5,0,0" Click="bn_Resource_Click" />
              <Button Name="PI2" Content="" Width="100" Margin="10,5,0,0" Click="bn_Resource_Click" />
              <Button Name="PI3" Content="" Width="100" Margin="10,5,0,0" Click="bn_Resource_Click" />
              <Button Name="PI4" Content="" Width="100" Margin="10,5,0,0" Click="bn_Resource_Click" />
              <Button Name="PI5" Content="" Width="100" Margin="10,5,0,0" Click="bn_Resource_Click" />
            </StackPanel>
          </StackPanel>
        </Canvas>
      </Expander>
      <StackPanel Orientation="Horizontal" Height="97">
        <GroupBox Margin="15,0,0,0" Header="HLOS/FFBM" Width="100" Height="50">
          <ComboBox Name="cboAPSSBootMode" VerticalAlignment="Center" Width="77" SelectionChanged="BootMode_SelectionChanged">
            <ComboBoxItem>HLOS</ComboBoxItem>
            <ComboBoxItem>FFBM</ComboBoxItem>
          </ComboBox>
        </GroupBox>
        <GroupBox Header="FTM/ONLINE NV" Width="100" Height="50">
          <ComboBox Name="FTMModeCombo" VerticalAlignment="Center" Width="77" SelectionChanged="FTMMode_SelectionChanged">
            <ComboBoxItem>ONLINE</ComboBoxItem>
            <ComboBoxItem>FTM</ComboBoxItem>
          </ComboBox>
        </GroupBox>
        <Button Margin="20,0,2,0" VerticalAlignment="Center" Width="70" Content="Reset" Click="Reset_Click" />
        <GroupBox Margin="10,0,0,0" Header="FTM/ONLINE RUNTIME" Width="150" Height="50">
          <ComboBox Name="RuntimeModeCombo" VerticalAlignment="Center" Width="120" SelectionChanged="RunTimeMode_SelectionChanged">
            <ComboBoxItem>ONLINE</ComboBoxItem>
            <ComboBoxItem>FTM</ComboBoxItem>
          </ComboBox>
        </GroupBox>
        <GroupBox Name="PowerSupplyGB" Header="Power Supply" Height="63" HorizontalAlignment="Left" Margin="20,0,0,0" VerticalAlignment="Center">
          <StackPanel Orientation="Horizontal">
            <Button Name="PS_On" Content="On" Height="23" HorizontalAlignment="Left" Margin="5,5,0,0" VerticalAlignment="Top" Width="39" ToolTip="Ctrl+P" Click="bnPSOn_Click" />
            <Button Name="PS_Off" Content="Off" Height="23" HorizontalAlignment="Left" Margin="5,5,0,0" VerticalAlignment="Top" Width="39" ToolTip="Alt+P" Click="bnPSOff_Click" />
            <TextBox Name="txtCurrent" Height="23" HorizontalAlignment="Left" Margin="5,5,0,0" VerticalAlignment="Top" Width="80" IsReadOnly="True" />
          </StackPanel>
        </GroupBox>
        <Canvas ZIndex="2">
          <StackPanel />
        </Canvas>
        <Button Name="button1" Content="Temp button" Height="23" Width="75" Click="button1_Click" />
      </StackPanel>
    </StackPanel>
    <StackPanel Orientation="Horizontal" Margin="0,10,0,10">
      <StackPanel Name="buttonsPanel" Width="200" Height="435">
        <Button Name="btnTx" Margin="10,0,10,0" Height="31" Content="Modem Tx" Click="ModemTx_Click" />
        <Button Name="btnRx" Margin="10,0,10,0" Height="31" Content="Modem Rx" Click="ModemRx_Click" />
        <Button Name="GSM_btn" Margin="10,0,10,0" Height="31" Content="GSM" Click="GSM_Click" />
        <Button Margin="10,0,10,0" Height="31" Content="GNSS" Click="GPS_Click" />
        <Button Margin="10,0,10,0" Height="31" Content="WLAN" Click="WLAN_Click" />
        <Button Margin="10,0,10,0" Height="31" Content="Factory Info" Click="Factory_Info_Click" />
        <Button Margin="10,0,10,0" Height="31" Content="RFFE Scan" Click="RFFE_Scan_Click" />
        <Button Margin="10,0,10,0" Height="31" Content="NV Items" Click="NV_Items_Click" />
        <Button Margin="10,0,10,0" Height="31" Content="HLOS Commands" Click="HLOS_Commands_Click" />
        <Button Margin="10,0,10,0" Height="31" Content="Shop Floor Control" Click="ShopFloorControl_Click" />
        <Button Margin="10,0,10,0" Height="31" Content="Power Supply" Click="Power_Supply_Click" />
        <Button Name="FTM_btn" Margin="10,0,10,0" Height="31" Content="FTM AP Commands" DataContext="{Binding}" Click="FTM_AP_Click" />
        <Button Name="SE_btn" Margin="10,0,10,0" Height="31" Content="Cellular Scenario Editing" Click="Scenario_Editing_Click" />
        <Button Name="QMSL_btn" Margin="10,0,10,0" Height="31" Content="QMSL Log" Click="QMSL_Log_Click" />
      </StackPanel>
      <StackPanel>
        <TabControl Name="Tab_Main" BorderThickness="0" Background="#FFFFFF" Width="600" Height="400" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="20,10,0,0" SelectionChanged="Tab_Main_SelectionChanged">
          <TabItem Name="ProductInfo" Header="{DynamicResource ProductInfo}">
            <my1:ProductInformation Name="ProductInformation" />
          </TabItem>
          <TabItem Name="Mode_Selection" Visibility="Hidden" Header="{DynamicResource ModeSelection}">
            <my1:ModeSelection Name="ModeSelection" HorizontalAlignment="Left" VerticalAlignment="Top" />
          </TabItem>
          <TabItem Name="ModemTx" Header="{DynamicResource WBTx}">
            <my1:FTM_RF_Tx Name="FTM_RF_Tx" HorizontalAlignment="Left" VerticalAlignment="Top" />
          </TabItem>
          <TabItem Name="ModemTx_QSC" Header="{DynamicResource WBTx}">
            <my1:FTM_RF_Tx_QSC Name="FTM_RF_Tx_QSC1" HorizontalAlignment="Left" VerticalAlignment="Top" />
          </TabItem>
          <TabItem Name="ModemRx" Header="{DynamicResource WBRx}">
            <my1:FTM_RF_Rx Name="FTM_RF_Rx" HorizontalAlignment="Left" VerticalAlignment="Top" />
          </TabItem>
          <TabItem Name="ModemRx_QSC" Header="{DynamicResource WBRx}">
            <my1:FTM_RF_Rx_QSC Name="FTM_RF_Rx_QSC1" HorizontalAlignment="Left" VerticalAlignment="Top" />
          </TabItem>
          <TabItem Name="GSMTx" Header="{DynamicResource GSM}">
            <my1:FTM_GSM_RF Name="FTM_GSM_RF" HorizontalAlignment="Left" VerticalAlignment="Top" />
          </TabItem>
          <TabItem Name="QSCMessageForSingleGSM">
            <Label Content="In QSC Cal mode, GSM RF debug has been merged into Modem Tx/Rx page" HorizontalAlignment="Center" VerticalAlignment="Center" />
          </TabItem>
          <TabItem Name="GPSCN0" Header="GPS">
            <my1:GPS Name="GPS" HorizontalAlignment="Left" VerticalAlignment="Top" />
          </TabItem>
          <TabItem Name="FactoryInfo" Header="FactoryInfo">
            <my1:FactoryDataTracking Name="FactoryDataTracking1" HorizontalAlignment="Left" VerticalAlignment="Top" />
          </TabItem>
          <TabItem Name="WLAN_UNKNOWNCHIP">
            <my1:ShowInfo_WrongWCN Name="WLAN_Unknown" HorizontalAlignment="Left" VerticalAlignment="Top" />
          </TabItem>
          <TabItem Name="WLAN_CHIP_WCN36XX" Header="WLAN_WCN36XX">
            <my1:Wlan_WCN36XX Name="Wlan_WCN36XX1" HorizontalAlignment="Left" VerticalAlignment="Top" />
          </TabItem>
          <TabItem Name="WLAN_CHIP_WCN39XX" Header="WLAN_WCN39XX">
            <my1:Wlan_WCN39XX Name="Wlan_WCN39XX1" HorizontalAlignment="Left" VerticalAlignment="Top" />
          </TabItem>
          <TabItem Name="RF360" Header="{DynamicResource RF360}">
            <my1:RFFE_Scan Name="RFFE_Scan1" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Top" />
          </TabItem>
          <TabItem Name="NV" Header="NV">
            <my1:Non_Volatile_Items_Management Name="non_Volatile_Items_Management1" />
          </TabItem>
          <TabItem Name="PowerSupply" Header="{DynamicResource PowerSupply}">
            <my1:PowerSupply_V2 Name="powerSupply1" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Top" />
          </TabItem>
          <TabItem Name="PCF" Header="{DynamicResource PCF}">
            <my1:PCF_Wizard Name="PCF_Wizard" HorizontalAlignment="Left" VerticalAlignment="Top" />
          </TabItem>
          <TabItem Name="ScenarioEditing" Header="{DynamicResource ScenarioEditing}" UseLayoutRounding="False">
            <my1:ScenarioEditing Name="scenarioEditing1" HorizontalAlignment="Left" VerticalAlignment="Top" Width="585" Height="320" />
          </TabItem>
          <TabItem Name="QSCMessageForScenario">
            <Label Content="Cellular Scenario Editing is only available for RF Cal Wideband V4" HorizontalAlignment="Center" VerticalAlignment="Center" />
          </TabItem>
          <TabItem Name="QMSL_Log" Header="{DynamicResource QMSLLogs}">
            <my1:QMSL_Log Name="qMSL_Log1" HorizontalAlignment="Left" VerticalAlignment="Top" />
          </TabItem>
          <TabItem Name="HLOS" Header="{DynamicResource HLOS}">
            <my1:HLOS Name="HLOS2" HorizontalAlignment="Left" VerticalAlignment="Top" />
          </TabItem>
          <TabItem Name="ShopFloorControl" Header="{DynamicResource ShopFloorControl}">
            <my3:SFC Name="SFC1" Width="363" HorizontalAlignment="Left" VerticalAlignment="Top" />
          </TabItem>
          <TabItem Name="Options" Header="{DynamicResource Options}">
            <my2:Option x:Name="option1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,0,0,0" />
          </TabItem>
          <TabItem Name="FTM" Header="FTM">
            <my1:FTM_FFBM Name="FTM_FFBM" HorizontalAlignment="Left" VerticalAlignment="Top" />
          </TabItem>
          <TabItem Name="ScenarioEditingV2" Header="ScenarioEditingV2">
            <my1:ScenarioEditingV2 Name="SEV2" HorizontalAlignment="Left" VerticalAlignment="Top" Height="370" Width="600" />
          </TabItem>
        </TabControl>
      </StackPanel>
    </StackPanel>
    <StackPanel Margin="0,10,0,10">
      <StackPanel Orientation="Horizontal">
        <TextBlock Name="Debug_Message" HorizontalAlignment="Left" Height="20" Margin="20,5,0,5" VerticalAlignment="Top" Text="{DynamicResource DebugMessages}" />
        <Button Name="bnCleatDebugMessage" Content="{DynamicResource Clear}" Height="20" HorizontalAlignment="Left" Margin="138,5,0,5" VerticalAlignment="Top" Width="75" Click="bnCleatDebugMessage_Click" />
      </StackPanel>
      <RichTextBox Name="txtDebugMessage" Height="100" HorizontalAlignment="Left" Margin="20,10,0,5" VerticalAlignment="Top" Width="745" IsReadOnly="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Visible" />
    </StackPanel>
  </StackPanel>
</Window>