MainWindow.xaml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <Window
  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:input="clr-namespace:System.Windows.Input;assembly=PresentationCore"
  6. xmlns:local="clr-namespace:AwInitilizer"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:resx="clr-namespace:AwInitilizer.Resx"
  9. x:Name="uxManinWindow"
  10. Title="Initlizer"
  11. Width="1920"
  12. Height="1080"
  13. input:InputMethod.IsInputMethodEnabled="False"
  14. Background="#FF363535"
  15. WindowStartupLocation="CenterScreen"
  16. WindowState="Maximized"
  17. mc:Ignorable="d"
  18. x:Class="AwInitilizer.MainWindow">
  19. <Window.Resources />
  20. <Viewbox>
  21. <StackPanel Orientation="Vertical">
  22. <StackPanel Orientation="Horizontal">
  23. <StackPanel
  24. Width="400"
  25. Margin="10,0,0,0"
  26. Orientation="Vertical">
  27. <GroupBox>
  28. <GroupBox.Header>
  29. <Label
  30. FontSize="16"
  31. Content="{x:Static resx:AppResources.Account}"
  32. Foreground="White" />
  33. </GroupBox.Header>
  34. <StackPanel Orientation="Vertical">
  35. <Button
  36. Width="100"
  37. Click="Logout_Click"
  38. IsEnabled="{Binding IsInputLock}">
  39. <Label Content="{x:Static resx:AppResources.Logout}" />
  40. </Button>
  41. <StackPanel
  42. Height="30"
  43. Margin="0,10,0,10"
  44. Orientation="Horizontal">
  45. <Grid Width="178">
  46. <Label
  47. HorizontalAlignment="Center"
  48. FontSize="16"
  49. Content="{x:Static resx:AppResources.UserID}"
  50. Foreground="White" />
  51. </Grid>
  52. <TextBox
  53. Width="200"
  54. VerticalContentAlignment="Center"
  55. Text="{Binding UserID}"
  56. FontSize="16"
  57. IsEnabled="{Binding IsInputLock}"
  58. IsReadOnly="True"
  59. TextAlignment="Center" />
  60. </StackPanel>
  61. <StackPanel
  62. Height="30"
  63. Margin="0,0,0,10"
  64. Orientation="Horizontal">
  65. <Grid Width="178">
  66. <Label
  67. HorizontalAlignment="Center"
  68. FontSize="16"
  69. Content="{x:Static resx:AppResources.WorkOrder}"
  70. Foreground="White" />
  71. </Grid>
  72. <TextBox
  73. Width="200"
  74. VerticalContentAlignment="Center"
  75. Text="{Binding WorkOrder}"
  76. FontSize="16"
  77. IsEnabled="{Binding IsInputLock}"
  78. IsReadOnly="True"
  79. KeyDown="WorkOrder_KeyDown"
  80. TextAlignment="Center"
  81. TextChanged="WorkOrder_TextChanged" />
  82. </StackPanel>
  83. </StackPanel>
  84. </GroupBox>
  85. <GroupBox>
  86. <GroupBox.Header>
  87. <Label
  88. FontSize="16"
  89. Content="{x:Static resx:AppResources.BarcodeSetting}"
  90. Foreground="White" />
  91. </GroupBox.Header>
  92. <StackPanel Orientation="Vertical">
  93. <StackPanel Height="30" Orientation="Horizontal">
  94. <Grid Width="178">
  95. <Label
  96. HorizontalAlignment="Center"
  97. FontSize="16"
  98. Content="{x:Static resx:AppResources.ModelName}"
  99. Foreground="White" />
  100. </Grid>
  101. <TextBox
  102. x:Name="uxModelName"
  103. Width="200"
  104. VerticalContentAlignment="Center"
  105. Text="{Binding ModelName}"
  106. FontSize="16"
  107. IsEnabled="{Binding IsInputLock}"
  108. IsReadOnly="True"
  109. TextAlignment="Center" />
  110. </StackPanel>
  111. <StackPanel
  112. Height="30"
  113. Margin="0,10,0,10"
  114. Orientation="Horizontal">
  115. <Grid Width="178">
  116. <Label
  117. HorizontalAlignment="Center"
  118. FontSize="16"
  119. Content="{x:Static resx:AppResources.SerialNumber}"
  120. Foreground="White" />
  121. </Grid>
  122. <TextBox
  123. x:Name="uxSerialNumber"
  124. Width="200"
  125. VerticalContentAlignment="Center"
  126. Text="{Binding SerialNumber}"
  127. FontSize="16"
  128. IsEnabled="{Binding IsInputLock}"
  129. IsReadOnly="True"
  130. TextAlignment="Center" />
  131. </StackPanel>
  132. <StackPanel
  133. Height="30"
  134. Margin="0,0,0,10"
  135. Orientation="Horizontal">
  136. <Grid Width="178">
  137. <Label
  138. HorizontalAlignment="Center"
  139. FontSize="16"
  140. Content="{x:Static resx:AppResources.SimStatus}"
  141. Foreground="White" />
  142. </Grid>
  143. <CheckBox
  144. x:Name="uxIsSimCheckEnabled"
  145. VerticalAlignment="Center"
  146. IsChecked="{Binding IsSimInsert}"
  147. IsEnabled="{Binding IsInputLock}"
  148. IsHitTestVisible="False" />
  149. </StackPanel>
  150. <StackPanel
  151. Height="30"
  152. Margin="0,0,0,10"
  153. Orientation="Horizontal">
  154. <Grid Width="178">
  155. <Label
  156. HorizontalAlignment="Center"
  157. FontSize="16"
  158. Content="{x:Static resx:AppResources.ICCID}"
  159. Foreground="White" />
  160. </Grid>
  161. <TextBox
  162. x:Name="uxICCID"
  163. Width="200"
  164. VerticalContentAlignment="Center"
  165. Text="{Binding ICCID}"
  166. FontSize="16"
  167. IsReadOnly="True"
  168. TextAlignment="Center">
  169. <TextBox.IsEnabled>
  170. <MultiBinding Converter="{StaticResource booleanAndConverter}">
  171. <Binding Path="IsSimInsert" />
  172. <Binding Path="IsInputLock" />
  173. </MultiBinding>
  174. </TextBox.IsEnabled>
  175. </TextBox>
  176. </StackPanel>
  177. <StackPanel
  178. Height="30"
  179. Margin="0,0,0,10"
  180. Orientation="Horizontal">
  181. <Grid Width="178">
  182. <Label
  183. HorizontalAlignment="Center"
  184. FontSize="16"
  185. Content="{x:Static resx:AppResources.IMSI}"
  186. Foreground="White" />
  187. </Grid>
  188. <TextBox
  189. x:Name="uxIMSI"
  190. Width="200"
  191. VerticalContentAlignment="Center"
  192. Text="{Binding IMSI}"
  193. FontSize="16"
  194. IsReadOnly="True"
  195. TextAlignment="Center">
  196. <TextBox.IsEnabled>
  197. <MultiBinding Converter="{StaticResource booleanAndConverter}">
  198. <Binding Path="IsSimInsert" />
  199. <Binding Path="IsInputLock" />
  200. </MultiBinding>
  201. </TextBox.IsEnabled>
  202. </TextBox>
  203. </StackPanel>
  204. </StackPanel>
  205. </GroupBox>
  206. </StackPanel>
  207. <StackPanel
  208. Width="400"
  209. Margin="10,0,0,0"
  210. Orientation="Vertical">
  211. <GroupBox>
  212. <GroupBox.Header>
  213. <Label
  214. FontSize="16"
  215. Content="{x:Static resx:AppResources.FirmwareVersion}"
  216. Foreground="White" />
  217. </GroupBox.Header>
  218. <DataGrid
  219. Height="335"
  220. Margin="10"
  221. AutoGenerateColumns="False"
  222. CanUserSortColumns="False"
  223. IsEnabled="{Binding IsInputLock}"
  224. ItemsSource="{Binding FirmwareUpdateModels}">
  225. <DataGrid.Columns>
  226. <DataGridTextColumn
  227. Width="150"
  228. MinWidth="50"
  229. Binding="{Binding Path=Module}"
  230. Header="{x:Static resx:AppResources.FirmwareVersionHeaderName}"
  231. IsReadOnly="True" />
  232. <DataGridTextColumn
  233. Width="150"
  234. MinWidth="70"
  235. Binding="{Binding Path=Version}"
  236. Header="{x:Static resx:AppResources.FirmwareVersionHeaderVersion}"
  237. IsReadOnly="True" />
  238. <!-- " DataGridTextColumn Header="File name" Binding="{Binding Path=FirmwareFileName}" IsReadOnly="False"/ -->
  239. </DataGrid.Columns>
  240. </DataGrid>
  241. </GroupBox>
  242. </StackPanel>
  243. <Grid Margin="10,0,0,0">
  244. <Grid.RowDefinitions>
  245. <RowDefinition Height="*" />
  246. <RowDefinition Height="30" />
  247. <RowDefinition Height="*" />
  248. </Grid.RowDefinitions>
  249. <Button
  250. x:Name="uxStartBtn"
  251. Grid.Row="0"
  252. Margin="30"
  253. Click="StartInit_Click">
  254. <Button.Template>
  255. <ControlTemplate TargetType="Button">
  256. <Border
  257. Background="White"
  258. BorderBrush="Gray"
  259. BorderThickness="2"
  260. CornerRadius="10">
  261. <Border.Effect>
  262. <DropShadowEffect ShadowDepth="10" />
  263. </Border.Effect>
  264. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
  265. </Border>
  266. </ControlTemplate>
  267. </Button.Template>
  268. <Button.IsEnabled>
  269. <MultiBinding Converter="{StaticResource booleanAndConverter}">
  270. <Binding Path="IsInputLock" />
  271. <Binding Path="IsInputCheckpassed" />
  272. </MultiBinding>
  273. </Button.IsEnabled>
  274. <Label FontSize="36" Content="{x:Static resx:AppResources.StartProcedure}" />
  275. </Button>
  276. <StackPanel Grid.Row="1" Orientation="Vertical">
  277. <StackPanel
  278. HorizontalAlignment="Center"
  279. VerticalAlignment="Center"
  280. Orientation="Horizontal">
  281. <ProgressBar
  282. x:Name="uxProgress"
  283. Width="250"
  284. Height="20"
  285. VerticalAlignment="Center"
  286. Maximum="100"
  287. Minimum="0" />
  288. <Label
  289. x:Name="uxProgressRate"
  290. FontSize="16"
  291. Content="0%"
  292. Foreground="White" />
  293. </StackPanel>
  294. </StackPanel>
  295. <Grid
  296. x:Name="uxStatusContainer"
  297. Grid.Row="2"
  298. Margin="30"
  299. Background="White">
  300. <Label
  301. x:Name="uxStatus"
  302. HorizontalAlignment="Center"
  303. VerticalAlignment="Center"
  304. FontSize="36"
  305. Content="Idel"
  306. Foreground="Black" />
  307. </Grid>
  308. </Grid>
  309. </StackPanel>
  310. <Label
  311. x:Name="uxStatusBar"
  312. Margin="0,10,0,0"
  313. HorizontalAlignment="Center"
  314. FontSize="36"
  315. Content=""
  316. Foreground="White" />
  317. </StackPanel>
  318. </Viewbox>
  319. </Window>