MainWindow.xaml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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="1080" Width="1920" Background="#FF363535"
  10. input:InputMethod.IsInputMethodEnabled="False"
  11. WindowStartupLocation="CenterScreen"
  12. WindowState="Maximized"
  13. x:Name="uxManinWindow">
  14. <Window.Resources>
  15. </Window.Resources>
  16. <Viewbox>
  17. <StackPanel Orientation="Vertical">
  18. <StackPanel Orientation="Horizontal">
  19. <StackPanel Orientation="Vertical" Width="400" Margin="10,0,0,0">
  20. <GroupBox>
  21. <GroupBox.Header>
  22. <Label Content="{DynamicResource Account}" Foreground="White" FontSize="16"/>
  23. </GroupBox.Header>
  24. <StackPanel Orientation="Vertical">
  25. <Button Width="100" Click="Logout_Click" IsEnabled="{Binding IsInputLock}">
  26. <Label Content="{DynamicResource logout}"/>
  27. </Button>
  28. <StackPanel Orientation="Horizontal" Height="30" Margin="0,10,0,10">
  29. <Grid Width="178">
  30. <Label Content="{DynamicResource UserID}" Foreground="White" FontSize="16" HorizontalAlignment="Center"/>
  31. </Grid>
  32. <TextBox Text="{Binding UserID}" IsEnabled="{Binding IsInputLock}" IsReadOnly="True" Width="200" FontSize="16" TextAlignment="Center" VerticalContentAlignment="Center"/>
  33. </StackPanel>
  34. <StackPanel Orientation="Horizontal" Height="30" Margin="0,0,0,10">
  35. <Grid Width="178">
  36. <Label Content="{DynamicResource WorkOrder}" Foreground="White" FontSize="16" HorizontalAlignment="Center"/>
  37. </Grid>
  38. <TextBox Text="{Binding WorkOrder}" IsEnabled="{Binding IsInputLock}" IsReadOnly="True" Width="200" FontSize="16" TextAlignment="Center" VerticalContentAlignment="Center"
  39. TextChanged="WorkOrder_TextChanged" KeyDown="WorkOrder_KeyDown"/>
  40. </StackPanel>
  41. </StackPanel>
  42. </GroupBox>
  43. <GroupBox>
  44. <GroupBox.Header>
  45. <Label Content="{DynamicResource BarcodeSetting}" Foreground="White" FontSize="16"/>
  46. </GroupBox.Header>
  47. <StackPanel Orientation="Vertical">
  48. <StackPanel Orientation="Horizontal" Height="30">
  49. <Grid Width="178">
  50. <Label Content="{DynamicResource ModelName}" Foreground="White" FontSize="16" HorizontalAlignment="Center"/>
  51. </Grid>
  52. <TextBox x:Name="uxModelName" Text="{Binding ModelName}" IsEnabled="{Binding IsInputLock}" IsReadOnly="True" Width="200" FontSize="16" TextAlignment="Center" VerticalContentAlignment="Center"/>
  53. </StackPanel>
  54. <StackPanel Orientation="Horizontal" Height="30" Margin="0,10,0,10">
  55. <Grid Width="178">
  56. <Label Content="{DynamicResource SerialNumber}" Foreground="White" FontSize="16" HorizontalAlignment="Center"/>
  57. </Grid>
  58. <TextBox x:Name="uxSerialNumber" Text="{Binding SerialNumber}" IsEnabled="{Binding IsInputLock}" IsReadOnly="True" Width="200" FontSize="16" TextAlignment="Center" VerticalContentAlignment="Center"/>
  59. </StackPanel>
  60. <StackPanel Orientation="Horizontal" Height="30" Margin="0,0,0,10">
  61. <Grid Width="178">
  62. <Label Content="{DynamicResource SimStatus}" Foreground="White" FontSize="16" HorizontalAlignment="Center"/>
  63. </Grid>
  64. <CheckBox x:Name="uxIsSimCheckEnabled" IsChecked="{Binding IsSimInsert}" IsEnabled="{Binding IsInputLock}" IsHitTestVisible="False" VerticalAlignment="Center" />
  65. </StackPanel>
  66. <StackPanel Orientation="Horizontal" Height="30" Margin="0,0,0,10">
  67. <Grid Width="178">
  68. <Label Content="{DynamicResource ICCID}" Foreground="White" FontSize="16" HorizontalAlignment="Center"/>
  69. </Grid>
  70. <TextBox x:Name="uxICCID" Text="{Binding ICCID}" IsReadOnly="True" Width="200" FontSize="16" TextAlignment="Center" VerticalContentAlignment="Center">
  71. <TextBox.IsEnabled>
  72. <MultiBinding Converter="{StaticResource booleanAndConverter}">
  73. <Binding Path="IsSimInsert" />
  74. <Binding Path="IsInputLock" />
  75. </MultiBinding>
  76. </TextBox.IsEnabled>
  77. </TextBox>
  78. </StackPanel>
  79. <StackPanel Orientation="Horizontal" Height="30" Margin="0,0,0,10">
  80. <Grid Width="178">
  81. <Label Content="{DynamicResource IMSI}" Foreground="White" FontSize="16" HorizontalAlignment="Center"/>
  82. </Grid>
  83. <TextBox x:Name="uxIMSI" Text="{Binding IMSI}" IsReadOnly="True" Width="200" FontSize="16" TextAlignment="Center" VerticalContentAlignment="Center">
  84. <TextBox.IsEnabled>
  85. <MultiBinding Converter="{StaticResource booleanAndConverter}">
  86. <Binding Path="IsSimInsert" />
  87. <Binding Path="IsInputLock" />
  88. </MultiBinding>
  89. </TextBox.IsEnabled>
  90. </TextBox>
  91. </StackPanel>
  92. </StackPanel>
  93. </GroupBox>
  94. </StackPanel>
  95. <StackPanel Orientation="Vertical" Width="400" Margin="10,0,0,0">
  96. <GroupBox>
  97. <GroupBox.Header>
  98. <Label Content="{DynamicResource FirmwareVersion}" Foreground="White" FontSize="16"/>
  99. </GroupBox.Header>
  100. <DataGrid AutoGenerateColumns="False" Margin="10" Height="335" CanUserSortColumns="False" IsEnabled="{Binding IsInputLock}" ItemsSource="{Binding FirmwareUpdateModels}">
  101. <DataGrid.Columns>
  102. <DataGridTextColumn Header="{DynamicResource FirmwareVersionHeaderName}" Width="150" MinWidth="50" Binding="{Binding Path=Module}" IsReadOnly="True"/>
  103. <DataGridTextColumn Header="{DynamicResource FirmwareVersionHeaderVersion}" Width="150" MinWidth="70" Binding="{Binding Path=Version}" IsReadOnly="True"/>
  104. <!--" DataGridTextColumn Header="File name" Binding="{Binding Path=FirmwareFileName}" IsReadOnly="False"/-->
  105. </DataGrid.Columns>
  106. </DataGrid>
  107. </GroupBox>
  108. </StackPanel>
  109. <Grid Margin="10,0,0,0">
  110. <Grid.RowDefinitions>
  111. <RowDefinition Height="*"/>
  112. <RowDefinition Height="30"/>
  113. <RowDefinition Height="*"/>
  114. </Grid.RowDefinitions>
  115. <Button Grid.Row="0" Margin="30" x:Name="uxStartBtn" Click="StartInit_Click">
  116. <Button.Template>
  117. <ControlTemplate TargetType="Button">
  118. <Border CornerRadius="10" BorderThickness="2" BorderBrush="Gray" Background="White">
  119. <Border.Effect>
  120. <DropShadowEffect ShadowDepth="10"/>
  121. </Border.Effect>
  122. <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
  123. </Border>
  124. </ControlTemplate>
  125. </Button.Template>
  126. <Button.IsEnabled>
  127. <MultiBinding Converter="{StaticResource booleanAndConverter}">
  128. <Binding Path="IsInputLock" />
  129. <Binding Path="IsInputCheckpassed" />
  130. </MultiBinding>
  131. </Button.IsEnabled>
  132. <Label FontSize="36" Content="{DynamicResource StartProcedure}"/>
  133. </Button>
  134. <StackPanel Grid.Row="1" Orientation="Vertical">
  135. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
  136. <ProgressBar Minimum="0" Maximum="100" x:Name="uxProgress" VerticalAlignment="Center" Height="20" Width="250"/>
  137. <Label x:Name="uxProgressRate" Content="0%" Foreground="White" FontSize="16"/>
  138. </StackPanel>
  139. </StackPanel>
  140. <Grid Grid.Row="2" Background="White" Margin="30" x:Name="uxStatusContainer">
  141. <Label FontSize="36" x:Name="uxStatus" Foreground="Black" Content="Idel" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  142. </Grid>
  143. </Grid>
  144. </StackPanel>
  145. <Label x:Name="uxStatusBar" FontSize="36" Content="" Margin="0,10,0,0" Foreground="White" HorizontalAlignment="Center"/>
  146. </StackPanel>
  147. </Viewbox>
  148. </Window>