MainWindow.xaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <Window x:Class="AwInitilizer.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:input="clr-namespace:System.Windows.Input;assembly=PresentationCore"
  7. xmlns:local="clr-namespace:AwInitilizer"
  8. mc:Ignorable="d"
  9. Title="Initlizer" Height="590" Width="790" Background="#FF363535"
  10. input:InputMethod.IsInputMethodEnabled="False"
  11. x:Name="uxManinWindow">
  12. <Window.Resources>
  13. </Window.Resources>
  14. <Viewbox>
  15. <StackPanel Orientation="Horizontal">
  16. <StackPanel Orientation="Vertical" Width="790">
  17. <GroupBox>
  18. <GroupBox.Header>
  19. <Label Content="Account" Foreground="White" FontSize="16"/>
  20. </GroupBox.Header>
  21. <StackPanel Orientation="Vertical">
  22. <StackPanel Orientation="Horizontal" Height="30" Margin="0,0,0,10">
  23. <Grid Width="200">
  24. <Label Content="User Id" Foreground="White" FontSize="16" HorizontalAlignment="Center"/>
  25. </Grid>
  26. <TextBox Text="{Binding UserID}" IsEnabled="{Binding IsInputLock}" IsReadOnly="True" Width="440" FontSize="16" TextAlignment="Center" VerticalContentAlignment="Center"/>
  27. <Button Width="100" Click="Logout_Click" IsEnabled="{Binding IsInputLock}">
  28. <Label Content="Logout"/>
  29. </Button>
  30. </StackPanel>
  31. <StackPanel Orientation="Horizontal" Height="30" Margin="0,0,0,10">
  32. <Grid Width="200">
  33. <Label Content="Work Order" Foreground="White" FontSize="16" HorizontalAlignment="Center"/>
  34. </Grid>
  35. <TextBox Text="{Binding WorkOrder}" IsEnabled="{Binding IsInputLock}" IsReadOnly="True" Width="540" FontSize="16" TextAlignment="Center" VerticalContentAlignment="Center"
  36. TextChanged="WorkOrder_TextChanged" KeyDown="WorkOrder_KeyDown"/>
  37. </StackPanel>
  38. </StackPanel>
  39. </GroupBox>
  40. <GroupBox>
  41. <GroupBox.Header>
  42. <Label Content="Barcode Setting" Foreground="White" FontSize="16"/>
  43. </GroupBox.Header>
  44. <StackPanel Orientation="Vertical">
  45. <StackPanel Orientation="Horizontal">
  46. <StackPanel Orientation="Horizontal" Height="30">
  47. <Grid Width="200">
  48. <Label Content="Model Name" Foreground="White" FontSize="16" HorizontalAlignment="Center"/>
  49. </Grid>
  50. <TextBox x:Name="uxModelName" Text="{Binding ModelName}" IsEnabled="{Binding IsInputLock}" IsReadOnly="True" Width="170" FontSize="16" TextAlignment="Center" VerticalContentAlignment="Center"/>
  51. </StackPanel>
  52. <StackPanel Orientation="Horizontal" Height="30">
  53. <Grid Width="200">
  54. <Label Content="Serial Number" Foreground="White" FontSize="16" HorizontalAlignment="Center"/>
  55. </Grid>
  56. <TextBox x:Name="uxSerialNumber" Text="{Binding SerialNumber}" IsEnabled="{Binding IsInputLock}" IsReadOnly="True" Width="170" FontSize="16" TextAlignment="Center" VerticalContentAlignment="Center"/>
  57. </StackPanel>
  58. </StackPanel>
  59. <Frame Height="10"/>
  60. </StackPanel>
  61. </GroupBox>
  62. <GroupBox>
  63. <GroupBox.Header>
  64. <Label Content="Config Setting" Foreground="White" FontSize="16"/>
  65. </GroupBox.Header>
  66. <StackPanel Orientation="Vertical">
  67. <StackPanel Orientation="Horizontal" Height="30">
  68. <Grid Width="200">
  69. <Label Content="Setting File" Foreground="White" FontSize="16" HorizontalAlignment="Center"/>
  70. </Grid>
  71. <TextBox x:Name="uxSettingFile" Text="{Binding SettingFileName}" IsEnabled="{Binding IsInputLock}" IsReadOnly="True" Width="540" FontSize="16" TextAlignment="Center" VerticalContentAlignment="Center"/>
  72. </StackPanel>
  73. <Frame Height="10"/>
  74. <StackPanel Orientation="Horizontal" Height="30">
  75. <Grid Width="200">
  76. <Label Content="4G Module Reversiion" Foreground="White" FontSize="16" HorizontalAlignment="Center"/>
  77. </Grid>
  78. <TextBox x:Name="uxFourGModuleVer" Text="{Binding FourGenModuleVersion}" IsEnabled="{Binding IsInputLock}" IsReadOnly="True" Width="540" FontSize="16" TextAlignment="Center" VerticalContentAlignment="Center"/>
  79. </StackPanel>
  80. <Frame Height="10"/>
  81. <StackPanel Orientation="Horizontal" Height="30">
  82. <Grid Width="200">
  83. <Label Content="4G Sim Card Information" Foreground="White" FontSize="16" HorizontalAlignment="Center"/>
  84. </Grid>
  85. <CheckBox x:Name="uxIsSimCheckEnabled" IsChecked="{Binding IsSimInsert}" IsEnabled="{Binding IsInputLock}" IsHitTestVisible="False" VerticalAlignment="Center" />
  86. <Grid Width="10"/>
  87. <Grid Width="70">
  88. <Label Content="ICCID" Foreground="White" FontSize="16" HorizontalAlignment="Center"/>
  89. </Grid>
  90. <Grid Width="10"/>
  91. <TextBox x:Name="uxICCID" Text="{Binding ICCID}" IsReadOnly="True" Width="176" FontSize="16" TextAlignment="Center" VerticalContentAlignment="Center">
  92. <TextBox.IsEnabled>
  93. <MultiBinding Converter="{StaticResource booleanAndConverter}">
  94. <Binding Path="IsSimInsert" />
  95. <Binding Path="IsInputLock" />
  96. </MultiBinding>
  97. </TextBox.IsEnabled>
  98. </TextBox>
  99. <Grid Width="70">
  100. <Label Content="IMSI" Foreground="White" FontSize="16" HorizontalAlignment="Center"/>
  101. </Grid>
  102. <Grid Width="10"/>
  103. <TextBox x:Name="uxIMSI" Text="{Binding IMSI}" IsReadOnly="True" Width="176" FontSize="16" TextAlignment="Center" VerticalContentAlignment="Center">
  104. <TextBox.IsEnabled>
  105. <MultiBinding Converter="{StaticResource booleanAndConverter}">
  106. <Binding Path="IsSimInsert" />
  107. <Binding Path="IsInputLock" />
  108. </MultiBinding>
  109. </TextBox.IsEnabled>
  110. </TextBox>
  111. <Grid Width="10"/>
  112. </StackPanel>
  113. <Frame Height="10"/>
  114. </StackPanel>
  115. </GroupBox>
  116. <GroupBox>
  117. <GroupBox.Header>
  118. <Label Content="Firmware version" Foreground="White" FontSize="16"/>
  119. </GroupBox.Header>
  120. <DataGrid AutoGenerateColumns="False" Margin="10" Height="150" CanUserSortColumns="False" IsEnabled="{Binding IsInputLock}" ItemsSource="{Binding FirmwareUpdateModels}">
  121. <DataGrid.Columns>
  122. <DataGridTextColumn Header="Module" Width="150" MinWidth="50" Binding="{Binding Path=Module}" IsReadOnly="True"/>
  123. <DataGridTextColumn Header="Version" Width="150" MinWidth="70" Binding="{Binding Path=Version}" IsReadOnly="True"/>
  124. <DataGridTextColumn Header="File name" Binding="{Binding Path=FirmwareFileName}" IsReadOnly="False"/>
  125. </DataGrid.Columns>
  126. </DataGrid>
  127. </GroupBox>
  128. <Grid Height="50">
  129. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
  130. <ProgressBar Minimum="0" Maximum="100" x:Name="uxProgress" VerticalAlignment="Center" Height="10" Width="250"/>
  131. <Label x:Name="uxProgressRate" Content="0%" Foreground="White" FontSize="16"/>
  132. <Grid Width="10"/>
  133. <Button x:Name="uxStartBtn" Click="StartInit_Click">
  134. <Button.IsEnabled>
  135. <MultiBinding Converter="{StaticResource booleanAndConverter}">
  136. <Binding Path="IsInputLock" />
  137. <Binding Path="IsInputCheckpassed" />
  138. </MultiBinding>
  139. </Button.IsEnabled>
  140. <Label Content="Start DC Initialize"/>
  141. </Button>
  142. </StackPanel>
  143. </Grid>
  144. <GroupBox Height="280" >
  145. <GroupBox.Header>
  146. <Label Content="Init Procedure" Foreground="White" FontSize="16"/>
  147. </GroupBox.Header>
  148. <DataGrid AutoGenerateColumns="False" Margin="10" x:Name="uxProcedureDataGrid" CanUserSortColumns="False" IsEnabled="{Binding IsInputLock}" ItemsSource="{Binding UpdateProcedure}">
  149. <DataGrid.Columns>
  150. <DataGridTextColumn Header="Name" Width="150" MinWidth="50" Binding="{Binding Path=Name}" IsReadOnly="True"/>
  151. <DataGridTextColumn Header="Content" Width="500" MinWidth="70" Binding="{Binding Path=Content}" IsReadOnly="True"/>
  152. <DataGridCheckBoxColumn Header="Action" Binding="{Binding Path=IsActivated}" IsReadOnly="False"/>
  153. </DataGrid.Columns>
  154. </DataGrid>
  155. </GroupBox>
  156. </StackPanel>
  157. <Grid Width="10"/>
  158. <StackPanel Orientation="Vertical" Width="400">
  159. <GroupBox Height="885">
  160. <GroupBox.Header>
  161. <Label Content="Terminal" Foreground="White" FontSize="16"/>
  162. </GroupBox.Header>
  163. <ScrollViewer x:Name="uxTerminalScroller">
  164. <TextBlock x:Name="uxTerminal" Background="Black" Margin="10" Foreground="Green">
  165. </TextBlock>
  166. </ScrollViewer>
  167. </GroupBox>
  168. </StackPanel>
  169. </StackPanel>
  170. </Viewbox>
  171. </Window>