MainView.xaml 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  1. <wnd:CustomWnd x:Class="VirgoUI.Client.MainView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
  5. xmlns:cal="http://www.caliburn.org"
  6. WindowState="Maximized"
  7. WindowStartupLocation="CenterScreen"
  8. xmlns:wnd="http://OpenSEMI.Ctrlib.com/presentation"
  9. xmlns:client="clr-namespace:VirgoUI.Client"
  10. xmlns:deviceControl="clr-namespace:Aitex.Core.UI.DeviceControl;assembly=MECF.Framework.UI.Core"
  11. Title="MainView" Height="880" Width="1600" >
  12. <Window.Resources>
  13. <client:DateTimeToTextConverter x:Key="dateTimeToTextConverter"/>
  14. <client:CollectionLastIndexConverter x:Key="collectionLastIndexConverter" />
  15. </Window.Resources>
  16. <Grid>
  17. <Grid x:Name="LoginPart" Background="{StaticResource Login_BG}">
  18. <Ellipse Width="850" Height="600" Fill="{DynamicResource Login_BG_Highlight}"/>
  19. <Grid Width="590" Height="465">
  20. <Grid.Effect>
  21. <DropShadowEffect Color="#FF004D83" BlurRadius="30" ShadowDepth="0"/>
  22. </Grid.Effect>
  23. <Border BorderBrush="{DynamicResource LoginPanel_BD}" BorderThickness="1" CornerRadius="3" Background="{DynamicResource LoginPanel_BG}">
  24. <Grid>
  25. <Path Data="M0,0 L0.67857742,0.054499656 C95.091171,7.7605554 387.09985,38.266688 589.03564,132.3875 L590,132.84716 590,249.338 C590,250.99486 588.65686,252.338 587,252.338 L441.29346,252.338 440.83957,252.18517 C350.99802,222.35816 203.01686,189.00345 6.2653065,198.4652 L0,198.80318 z" Stretch="Fill" Height="252.338" VerticalAlignment="Bottom" Width="590" Fill="{DynamicResource LoginPanel_InnerGrow}"/>
  26. <Grid Margin="60,40">
  27. <Grid.RowDefinitions>
  28. <RowDefinition Height="70"/>
  29. <RowDefinition Height="10"/>
  30. <RowDefinition/>
  31. <RowDefinition Height="Auto"/>
  32. </Grid.RowDefinitions>
  33. <StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
  34. <TextBlock TextWrapping="Wrap" Text="Login" FontWeight="Bold" FontFamily="Arial" FontSize="50" Foreground="White" VerticalAlignment="Bottom" Margin="0,0,0,5"/>
  35. <TextBlock TextWrapping="Wrap" Text="登录" FontFamily="SimHei" FontSize="32" Foreground="White" Opacity="0.5" Margin="10,0,0,12" VerticalAlignment="Bottom" FontWeight="Bold"/>
  36. </StackPanel>
  37. <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="-20,0">
  38. <Rectangle Fill="#19FFFFFF" Width="10" Height="10"/>
  39. <Rectangle Fill="#7FFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  40. <Rectangle Fill="#33FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  41. <Rectangle Fill="#66FFFFFF" Width="10" Height="10" Margin="50,0,0,0"/>
  42. <Rectangle Fill="#7FFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  43. <Rectangle Fill="#4CFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  44. <Rectangle Fill="#33FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  45. <Rectangle Fill="#66FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  46. <Rectangle Fill="#99FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  47. <Rectangle Fill="#7FFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  48. <Rectangle Fill="#99FFFFFF" Width="10" Height="10" Margin="20,0,0,0"/>
  49. <Rectangle Fill="#B2FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  50. <Rectangle Fill="#CCFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  51. <Rectangle Fill="#CCFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  52. <Rectangle Fill="#B2FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  53. <Rectangle Fill="#19FFFFFF" Width="10" Height="10" Margin="50,0,0,0"/>
  54. <Rectangle Fill="#4CFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  55. <Rectangle Fill="#19FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  56. <Rectangle Fill="#4CFFFFFF" Width="10" Height="10" Margin="30,0,0,0"/>
  57. <Rectangle Fill="#66FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  58. <Rectangle Fill="#33FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  59. <Rectangle Fill="#33FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  60. <Rectangle Fill="#66FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  61. <Rectangle Fill="#7FFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  62. <Rectangle Fill="#4CFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  63. <Rectangle Fill="#33FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  64. </StackPanel>
  65. <Grid Margin="40" Grid.Row="2">
  66. <Grid.ColumnDefinitions>
  67. <ColumnDefinition Width="130"/>
  68. <ColumnDefinition/>
  69. </Grid.ColumnDefinitions>
  70. <Grid.RowDefinitions>
  71. <RowDefinition/>
  72. <RowDefinition/>
  73. <RowDefinition/>
  74. </Grid.RowDefinitions>
  75. <TextBox x:Name="tbLoginName" Grid.Column="1" Text="{Binding LastLoginName}" TextChanged="TbLoginName_TextChanged" TabIndex="0" TextWrapping="Wrap" Height="45" VerticalAlignment="Center" Style="{DynamicResource Login_TextBox}"/>
  76. <PasswordBox x:Name="pdbPassword" Grid.Column="1" Grid.Row="1" TabIndex="1" Height="45" Style="{DynamicResource Login_PasswordBox}">
  77. <i:Interaction.Triggers>
  78. <i:EventTrigger EventName="KeyDown">
  79. <cal:ActionMessage MethodName="Enter">
  80. <cal:Parameter Value="$eventargs" />
  81. <cal:Parameter Value="{Binding ElementName=tbLoginName, Path=Text}" />
  82. <cal:Parameter Value="{Binding ElementName=pdbPassword}" />
  83. <cal:Parameter Value="{Binding ElementName=cbRole, Path=SelectedValue}" />
  84. </cal:ActionMessage>
  85. </i:EventTrigger>
  86. </i:Interaction.Triggers>
  87. </PasswordBox>
  88. <ComboBox x:Name="cbRole" Style="{DynamicResource Login_ComboBox}" Grid.Column="1" Grid.Row="2" Height="45" ItemsSource="{Binding Roles}" DisplayMemberPath="RoleName" SelectedIndex="0" TabIndex="2">
  89. </ComboBox>
  90. <TextBlock TextWrapping="Wrap" Text="User Name" Foreground="{DynamicResource FG_White}" FontSize="16" FontFamily="Arial" FontWeight="Bold" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,20,0"/>
  91. <TextBlock TextWrapping="Wrap" Text="Password" Foreground="{DynamicResource FG_White}" FontSize="16" FontFamily="Arial" FontWeight="Bold" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,20,0" Grid.Row="1"/>
  92. <TextBlock TextWrapping="Wrap" Text="Role" Foreground="{DynamicResource FG_White}" FontSize="16" FontFamily="Arial" FontWeight="Bold" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,20,0" Grid.Row="2"/>
  93. </Grid>
  94. <Button Style="{StaticResource Login_Button}" Content="Login" Grid.Row="3" FontFamily="Arial" FontSize="18" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center" Height="55" Width="160">
  95. <i:Interaction.Triggers>
  96. <i:EventTrigger EventName="Click">
  97. <cal:ActionMessage MethodName="Login">
  98. <cal:Parameter Value="{Binding ElementName=tbLoginName, Path=Text}" />
  99. <cal:Parameter Value="{Binding ElementName=pdbPassword}" />
  100. <cal:Parameter Value="{Binding ElementName=cbRole, Path=SelectedValue}" />
  101. </cal:ActionMessage>
  102. </i:EventTrigger>
  103. </i:Interaction.Triggers>
  104. </Button>
  105. </Grid>
  106. </Grid>
  107. </Border>
  108. </Grid>
  109. <Grid.Style>
  110. <Style>
  111. <Style.Triggers>
  112. <DataTrigger Binding="{Binding IsLogin}" Value="True">
  113. <Setter Property="Grid.Visibility" Value="Collapsed"></Setter>
  114. </DataTrigger>
  115. </Style.Triggers>
  116. </Style>
  117. </Grid.Style>
  118. </Grid>
  119. <Grid x:Name="MainPage" Background="{DynamicResource MainFrame_BG}">
  120. <Grid.RowDefinitions>
  121. <RowDefinition Height="5*" MaxHeight="130"/>
  122. <RowDefinition Height="20*"/>
  123. <RowDefinition Height="Auto" MinHeight="35"/>
  124. <RowDefinition Height="3*" MaxHeight="70"/>
  125. </Grid.RowDefinitions>
  126. <Grid x:Name="Top_Frame">
  127. <Grid.RowDefinitions>
  128. <RowDefinition Height="30*" />
  129. </Grid.RowDefinitions>
  130. <Grid>
  131. <Grid.ColumnDefinitions>
  132. <ColumnDefinition Width="Auto"/>
  133. <ColumnDefinition />
  134. <ColumnDefinition Width="Auto"/>
  135. </Grid.ColumnDefinitions>
  136. <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="Virgo" VerticalAlignment="Center" FontFamily="Arial" Foreground="White" FontSize="64" FontWeight="Bold" Margin="10,0" FontStyle="Italic">
  137. <TextBlock.Effect>
  138. <DropShadowEffect/>
  139. </TextBlock.Effect>
  140. </TextBlock>
  141. <Grid Grid.Column="1" Margin="10,8,0,8">
  142. <Grid.RowDefinitions>
  143. <RowDefinition/>
  144. <RowDefinition/>
  145. <RowDefinition/>
  146. <RowDefinition/>
  147. </Grid.RowDefinitions>
  148. <Grid.ColumnDefinitions>
  149. <ColumnDefinition MinWidth="45" MaxWidth="90"/>
  150. <ColumnDefinition MinWidth="65"/>
  151. <ColumnDefinition MinWidth="45" MaxWidth="90"/>
  152. <ColumnDefinition MinWidth="65"/>
  153. <ColumnDefinition MinWidth="45" MaxWidth="90"/>
  154. <ColumnDefinition MinWidth="65"/>
  155. <ColumnDefinition Width="15"/>
  156. <ColumnDefinition Width="200"/>
  157. </Grid.ColumnDefinitions>
  158. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" CornerRadius="6,0,0,0" Background="{DynamicResource TopFrame_TableBG}">
  159. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" Padding="5,2">
  160. <TextBlock TextWrapping="NoWrap" Text="System" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
  161. </Border>
  162. </Border>
  163. <Border Grid.Column="2" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" Background="{DynamicResource TopFrame_TableBG}">
  164. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" Padding="5,2">
  165. <TextBlock TextWrapping="NoWrap" Text="EFEM" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
  166. </Border>
  167. </Border>
  168. <Border Grid.Column="4" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" Background="{DynamicResource TopFrame_TableBG}">
  169. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" Padding="5,2">
  170. <TextBlock TextWrapping="NoWrap" Text="Host" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
  171. </Border>
  172. </Border>
  173. <Border Grid.Column="6" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="0,1,0,0" CornerRadius="0,6,0,0" Background="{DynamicResource TopFrame_TableBG}">
  174. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,0" CornerRadius="0,5,0,0" Padding="5,2"/>
  175. </Border>
  176. <Border Grid.Row="1" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" Background="{DynamicResource TopFrame_TableBG}">
  177. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" Padding="5,2">
  178. <TextBlock TextWrapping="NoWrap" Text="PMA" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{Binding PMA_TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
  179. </Border>
  180. </Border>
  181. <!--<Border Grid.Row="1" Grid.Column="2" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" Background="{DynamicResource TopFrame_TableBG}">
  182. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" Padding="5,2">
  183. <TextBlock TextWrapping="NoWrap" Text="PMB" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{Binding PMB_TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
  184. </Border>
  185. </Border>-->
  186. <Border Grid.Row="1" Grid.Column="4" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" Background="{DynamicResource TopFrame_TableBG}">
  187. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,0,1" Padding="5,2">
  188. <TextBlock TextWrapping="NoWrap" Text="版本号:" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
  189. </Border>
  190. </Border>
  191. <Grid Grid.Row="1" Grid.Column="5">
  192. <Grid.ColumnDefinitions>
  193. <ColumnDefinition MinWidth="35"/>
  194. <ColumnDefinition MinWidth="30"/>
  195. </Grid.ColumnDefinitions>
  196. <Border Grid.Column="0" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="0,1,0,0" Background="{DynamicResource TopFrame_TableBG}">
  197. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,1,0,1" Padding="0,2">
  198. <TextBlock TextWrapping="NoWrap" Text="{Binding SoftwareVersion}" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
  199. </Border>
  200. </Border>
  201. <Border Grid.Column="1" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="0,1,0,0" Background="{DynamicResource TopFrame_TableBG}">
  202. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,1,0,1" Padding="0,2">
  203. <TextBlock TextWrapping="NoWrap" Text="{Binding SystemTime}" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
  204. </Border>
  205. </Border>
  206. </Grid>
  207. <Border Grid.Row="1" Grid.Column="6" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="0,0,0,0" Background="{DynamicResource TopFrame_TableBG}">
  208. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" Padding="5,2"/>
  209. </Border>
  210. <Border Grid.Row="2" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" CornerRadius="0" Background="{DynamicResource TopFrame_TableBG}">
  211. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" CornerRadius="0" Padding="5,2">
  212. <TextBlock TextWrapping="NoWrap" Text="Log" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
  213. </Border>
  214. </Border>
  215. <Border Grid.Row="3" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" CornerRadius="0,0,0,6" Background="{DynamicResource TopFrame_TableBG}">
  216. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" CornerRadius="0,0,0,5" Padding="5,2">
  217. <TextBlock TextWrapping="NoWrap" Text="Alarm" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
  218. </Border>
  219. </Border>
  220. <TextBox Grid.Column="1" TextWrapping="Wrap" Text="{Binding RtStatus}" Background="{Binding RtStatusBackground}" Style="{StaticResource TextBox_Top}" Margin="0,0,1,0"/>
  221. <TextBox Grid.Column="3" TextWrapping="Wrap" Text="{Binding EfemStatus}" Background="{Binding EfemStatusBackground}" Style="{StaticResource TextBox_Top}" Margin="0,0,1,0"/>
  222. <TextBox Grid.Column="5" TextWrapping="Wrap" Text="{Binding HostCommunicationStatus}" Background="{Binding HostCommunicationStatusBackground}" Style="{StaticResource TextBox_Top}" Margin="0,0,1,0"/>
  223. <TextBox Grid.Row="1" Grid.Column="1" TextWrapping="Wrap" Text="{Binding PMAStatus}" Background="{Binding PMAStatusBackground}" Style="{StaticResource TextBox_Top}" Margin="0,0,1,0"/>
  224. <!--<TextBox Grid.Row="1" Grid.Column="3" TextWrapping="Wrap" Text="{Binding PMBStatus}" Background="{Binding PMBStatusBackground}" Style="{StaticResource TextBox_Top}" Margin="0,0,1,0"/>-->
  225. <Grid Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="6">
  226. <Grid.ColumnDefinitions>
  227. <ColumnDefinition />
  228. <ColumnDefinition Width="Auto"/>
  229. <ColumnDefinition Width="15"/>
  230. </Grid.ColumnDefinitions>
  231. <ComboBox ItemsSource="{Binding EventLogList}" Visibility="{Binding AllEventsVisibility}"
  232. SelectedIndex="{Binding EventLogList.Count,Mode=OneWay,Converter={StaticResource collectionLastIndexConverter}}"
  233. VerticalContentAlignment="Center" FontSize="14" Height="Auto">
  234. <ComboBox.ItemTemplate>
  235. <DataTemplate>
  236. <ContentControl>
  237. <ContentControl.Style>
  238. <Style TargetType="ContentControl">
  239. <Setter Property="Background" Value="{StaticResource MessagesInformationBackgroundBrush}"/>
  240. <Setter Property="FontFamily" Value="Segoe,SimSun" />
  241. <Setter Property="FontSize" Value="16" />
  242. <Style.Triggers>
  243. <DataTrigger Binding="{Binding Level}" Value="Alarm">
  244. <Setter Property="Foreground" Value="{StaticResource MessagesErrorForegroundBrush}"/>
  245. </DataTrigger>
  246. <DataTrigger Binding="{Binding Level}" Value="Warning">
  247. <Setter Property="Foreground" Value="{StaticResource MessagesWarningForegroundBrush}"/>
  248. </DataTrigger>
  249. <DataTrigger Binding="{Binding Level}" Value="Information">
  250. <Setter Property="Foreground" Value="{StaticResource MessagesInformationForegroundBrush}"/>
  251. </DataTrigger>
  252. </Style.Triggers>
  253. </Style>
  254. </ContentControl.Style>
  255. <Grid>
  256. <Grid.ColumnDefinitions>
  257. <ColumnDefinition Width="120"/>
  258. <ColumnDefinition Width="*"/>
  259. </Grid.ColumnDefinitions>
  260. <TextBlock Grid.Column="0" Text="{Binding OccuringTime, Converter={StaticResource dateTimeToTextConverter}}" />
  261. <TextBlock Grid.Column="1" Text="{Binding Description}" />
  262. </Grid>
  263. </ContentControl>
  264. </DataTemplate>
  265. </ComboBox.ItemTemplate>
  266. </ComboBox>
  267. <!--<ComboBox ItemsSource="{Binding WarnEventLogList}" Visibility="{Binding WarnEventsVisibility}"
  268. SelectedIndex="{Binding EventLogList.Count,Mode=OneWay,Converter={StaticResource collectionLastIndexConverter}}"
  269. VerticalContentAlignment="Center" FontSize="14" Height="Auto">
  270. <ComboBox.ItemTemplate>
  271. <DataTemplate>
  272. <ContentControl>
  273. <ContentControl.Style>
  274. <Style TargetType="ContentControl">
  275. <Setter Property="Background" Value="{StaticResource MessagesInformationBackgroundBrush}"/>
  276. <Setter Property="FontFamily" Value="Calibri" />
  277. <Setter Property="FontSize" Value="16" />
  278. <Style.Triggers>
  279. <DataTrigger Binding="{Binding Level}" Value="Alarm">
  280. <Setter Property="Foreground" Value="{StaticResource MessagesErrorForegroundBrush}"/>
  281. </DataTrigger>
  282. <DataTrigger Binding="{Binding Level}" Value="Warning">
  283. <Setter Property="Foreground" Value="{StaticResource MessagesWarningForegroundBrush}"/>
  284. </DataTrigger>
  285. <DataTrigger Binding="{Binding Level}" Value="Information">
  286. <Setter Property="Foreground" Value="{StaticResource MessagesInformationForegroundBrush}"/>
  287. </DataTrigger>
  288. </Style.Triggers>
  289. </Style>
  290. </ContentControl.Style>
  291. <Grid>
  292. <Grid.ColumnDefinitions>
  293. <ColumnDefinition Width="120"/>
  294. <ColumnDefinition Width="*"/>
  295. </Grid.ColumnDefinitions>
  296. <TextBlock Grid.Column="0" Text="{Binding OccuringTime, Converter={StaticResource dateTimeToTextConverter}}" />
  297. <TextBlock Grid.Column="1" Text="{Binding Description}" />
  298. </Grid>
  299. </ContentControl>
  300. </DataTemplate>
  301. </ComboBox.ItemTemplate>
  302. </ComboBox>-->
  303. <!--<Border Grid.Column="1" BorderThickness="1" SnapsToDevicePixels="true" BorderBrush="{DynamicResource ComboBox_BD}" Background="{DynamicResource ComboBox_BG}">
  304. <Border x:Name="InnerBD_Shadow" BorderBrush="{DynamicResource ComboBox_BD_InnerShadow}" BorderThickness="1,1,0,0" Padding="5,1">
  305. <CheckBox Content="Alarm" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource FG_Black}" FontFamily="Arial" FontSize="16">
  306. <i:Interaction.Triggers>
  307. <i:EventTrigger EventName="Checked">
  308. <cal:ActionMessage MethodName="ShowAlarmEvents">
  309. </cal:ActionMessage>
  310. </i:EventTrigger>
  311. <i:EventTrigger EventName="Unchecked">
  312. <cal:ActionMessage MethodName="ShowAllEvents">
  313. </cal:ActionMessage>
  314. </i:EventTrigger>
  315. </i:Interaction.Triggers>
  316. </CheckBox>
  317. </Border>
  318. </Border>-->
  319. <Border Grid.Column="2" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="0,1,0,0" CornerRadius="0" Background="{DynamicResource TopFrame_TableBG}">
  320. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" CornerRadius="0" Padding="5,2"/>
  321. </Border>
  322. </Grid>
  323. <Grid Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="6">
  324. <Grid.ColumnDefinitions>
  325. <ColumnDefinition />
  326. <ColumnDefinition Width="Auto"/>
  327. <ColumnDefinition Width="15"/>
  328. </Grid.ColumnDefinitions>
  329. <ComboBox ItemsSource="{Binding WarnEventLogList}" Visibility="Visible"
  330. SelectedIndex="{Binding WarnEventLogList.Count,Mode=OneWay,Converter={StaticResource collectionLastIndexConverter}}"
  331. VerticalContentAlignment="Center" FontSize="14" Height="Auto" IsDropDownOpen="{Binding IsAlarmListOpen}">
  332. <ComboBox.ItemTemplate>
  333. <DataTemplate>
  334. <ContentControl>
  335. <ContentControl.Style>
  336. <Style TargetType="ContentControl">
  337. <Setter Property="Background" Value="{StaticResource MessagesInformationBackgroundBrush}"/>
  338. <Setter Property="FontFamily" Value="Calibri" />
  339. <Setter Property="FontSize" Value="16" />
  340. <Style.Triggers>
  341. <DataTrigger Binding="{Binding Level}" Value="Alarm">
  342. <Setter Property="Foreground" Value="{StaticResource MessagesErrorForegroundBrush}"/>
  343. </DataTrigger>
  344. <DataTrigger Binding="{Binding Level}" Value="Warning">
  345. <Setter Property="Foreground" Value="{StaticResource MessagesWarningForegroundBrush}"/>
  346. </DataTrigger>
  347. <DataTrigger Binding="{Binding Level}" Value="Information">
  348. <Setter Property="Foreground" Value="{StaticResource MessagesInformationForegroundBrush}"/>
  349. </DataTrigger>
  350. </Style.Triggers>
  351. </Style>
  352. </ContentControl.Style>
  353. <Grid>
  354. <Grid.ColumnDefinitions>
  355. <ColumnDefinition Width="120"/>
  356. <ColumnDefinition Width="*"/>
  357. </Grid.ColumnDefinitions>
  358. <TextBlock Grid.Column="0" Text="{Binding OccuringTime, Converter={StaticResource dateTimeToTextConverter}}" />
  359. <TextBlock Grid.Column="1" Text="{Binding Description}" />
  360. </Grid>
  361. </ContentControl>
  362. </DataTemplate>
  363. </ComboBox.ItemTemplate>
  364. </ComboBox>
  365. <Border Grid.Column="2" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="0,1,0,0" CornerRadius="0,0,6,0" Background="{DynamicResource TopFrame_TableBG}">
  366. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" CornerRadius="0,0,5,0" Padding="5,2"/>
  367. </Border>
  368. </Grid>
  369. <StackPanel Grid.Column="7" Grid.RowSpan="3" VerticalAlignment="Center">
  370. <Grid Margin="5,0,0,0">
  371. <Grid.ColumnDefinitions>
  372. <ColumnDefinition />
  373. <ColumnDefinition />
  374. </Grid.ColumnDefinitions>
  375. <Button Content="Host Enable" Height="35" IsEnabled="{Binding IsEnableFAEnable}">
  376. <i:Interaction.Triggers>
  377. <i:EventTrigger EventName="Click">
  378. <cal:ActionMessage MethodName="FAEnable"/>
  379. </i:EventTrigger>
  380. </i:Interaction.Triggers>
  381. </Button>
  382. <Button Grid.Column="1" Content="Host Disable" Margin="5,0,0,0" Height="35" IsEnabled="{Binding IsDisableFAEnable}">
  383. <i:Interaction.Triggers>
  384. <i:EventTrigger EventName="Click">
  385. <cal:ActionMessage MethodName="FADisable"/>
  386. </i:EventTrigger>
  387. </i:Interaction.Triggers>
  388. </Button>
  389. </Grid>
  390. <Grid Margin="5,5,0,0">
  391. <Grid.ColumnDefinitions>
  392. <ColumnDefinition />
  393. <ColumnDefinition />
  394. </Grid.ColumnDefinitions>
  395. <Button Content="Reset" Height="35">
  396. <i:Interaction.Triggers>
  397. <i:EventTrigger EventName="Click">
  398. <cal:ActionMessage MethodName="Reset">
  399. </cal:ActionMessage>
  400. </i:EventTrigger>
  401. </i:Interaction.Triggers>
  402. </Button>
  403. <Button Grid.Column="1" Content="Buzzer Off" Margin="5,0,0,0" Height="35">
  404. <i:Interaction.Triggers>
  405. <i:EventTrigger EventName="Click">
  406. <cal:ActionMessage MethodName="BuzzerOff">
  407. </cal:ActionMessage>
  408. </i:EventTrigger>
  409. </i:Interaction.Triggers>
  410. </Button>
  411. </Grid>
  412. </StackPanel>
  413. </Grid>
  414. <StackPanel Orientation="Horizontal" Grid.Column="2" Margin="10,8">
  415. <Border Width="50" BorderThickness="1,1,0,0" BorderBrush="#FF0A1624" Background="#FF396293" CornerRadius="6">
  416. <Viewbox Width="45" Height="80" >
  417. <deviceControl:AITSignalTower Width="45" Height="110" DeviceData="{Binding SignalTowerData}"></deviceControl:AITSignalTower>
  418. </Viewbox>
  419. </Border>
  420. <Grid Margin="10,0,0,0">
  421. <Grid.RowDefinitions>
  422. <RowDefinition Height="Auto"/>
  423. <RowDefinition />
  424. </Grid.RowDefinitions>
  425. <Grid>
  426. <Grid.RowDefinitions>
  427. <RowDefinition Height="24"/>
  428. <RowDefinition Height="24"/>
  429. </Grid.RowDefinitions>
  430. <Grid.ColumnDefinitions>
  431. <ColumnDefinition Width="40"/>
  432. <ColumnDefinition Width="60"/>
  433. </Grid.ColumnDefinitions>
  434. <Border BorderBrush="{DynamicResource Table_BD}" CornerRadius="5,0,0,0" BorderThickness="1" Background="{DynamicResource Table_BG_FirstTitle}" Padding="5,1">
  435. <TextBlock TextWrapping="NoWrap" Text="User" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="12"/>
  436. </Border>
  437. <Border Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" CornerRadius="0,5,0,0" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
  438. <TextBlock TextWrapping="NoWrap" Text="{Binding LoginName}" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{DynamicResource FG_Black}" FontFamily="Arial" FontSize="12"/>
  439. </Border>
  440. <Border Grid.Row="1" BorderBrush="{DynamicResource Table_BD}" CornerRadius="0,0,0,5" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_FirstTitle}" Padding="5,1">
  441. <TextBlock TextWrapping="NoWrap" Text="Role" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="12"/>
  442. </Border>
  443. <Border Grid.Row="1" Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" CornerRadius="0,0,5,0" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
  444. <TextBlock TextWrapping="NoWrap" Text="{Binding RoleName}" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{DynamicResource FG_Black}" FontFamily="Arial" FontSize="12"/>
  445. </Border>
  446. </Grid>
  447. <Button Grid.Row="1" Width="100" Content="Logout" FontSize="16" Margin="0,5,0,0">
  448. <i:Interaction.Triggers>
  449. <i:EventTrigger EventName="Click">
  450. <cal:ActionMessage MethodName="Logout">
  451. </cal:ActionMessage>
  452. </i:EventTrigger>
  453. </i:Interaction.Triggers>
  454. </Button>
  455. </Grid>
  456. </StackPanel>
  457. </Grid>
  458. </Grid>
  459. <Grid Grid.Row="1" Background="{DynamicResource ContentFrame_BG}">
  460. <ContentControl x:Name="ActiveItem" cal:View.Context="{Binding Context}" cal:View.Model="{Binding ActiveItem}" Margin="0">
  461. </ContentControl>
  462. </Grid>
  463. <Border x:Name="Sub_Menu_Bar" Grid.Row="2">
  464. <Menu ItemsSource="{Binding Path=SubMenuItems}" Grid.Row="0" Background="{x:Null}" Margin="3,0,0,0">
  465. <Menu.ItemTemplate>
  466. <DataTemplate>
  467. <TextBlock Margin="1" Text="{Binding Path=ResKey}"/>
  468. </DataTemplate>
  469. </Menu.ItemTemplate>
  470. <Menu.ItemContainerStyle>
  471. <Style TargetType="MenuItem">
  472. <Setter Property="Command" Value="{Binding DataContext.MenuItemClickCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"/>
  473. <Setter Property="CommandParameter" Value="{ Binding }"/>
  474. <Setter Property="Background" Value="Transparent"/>
  475. <Setter Property="Foreground" Value="{DynamicResource SubMenu_FG}"/>
  476. <Setter Property="FontFamily" Value="Arial"/>
  477. <Setter Property="MinWidth" Value="100"/>
  478. <Setter Property="Height" Value="35"/>
  479. <Setter Property="FontSize" Value="14"/>
  480. <Setter Property="FontWeight" Value="bold"/>
  481. <Setter Property="Template">
  482. <Setter.Value>
  483. <ControlTemplate TargetType="{x:Type MenuItem}">
  484. <Border x:Name="BG" BorderBrush="{DynamicResource SubMenu_BD_Shadow}" BorderThickness="0,0,2,2" CornerRadius="0,0,5,5" Background="{DynamicResource SubMenu_BG}" Cursor="Hand">
  485. <Border x:Name="InnerBD" BorderBrush="{DynamicResource SubMenu_BD_Highlight}" BorderThickness="2,0,0,0" CornerRadius="0,0,4,4">
  486. <ContentPresenter x:Name="contentPresenter" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="6,0" Cursor="Hand" ContentSource="Header" RecognizesAccessKey="True" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  487. </Border>
  488. </Border>
  489. <ControlTemplate.Triggers>
  490. <DataTrigger Binding="{Binding Selected}" Value="True">
  491. <Setter Property="Background" TargetName="BG" Value="{DynamicResource SubMenu_BG_Select}"/>
  492. <Setter Property="BorderBrush" TargetName="BG" Value="{DynamicResource SubMenu_BD_Shadow_Select}"/>
  493. <Setter Property="BorderBrush" TargetName="InnerBD" Value="{DynamicResource SubMenu_BD_Highlight}"/>
  494. <Setter Property="Foreground" Value="{DynamicResource SubMenu_FG_Select}"/>
  495. <Setter Property="FontSize" Value="16"/>
  496. <Setter Property="Effect" TargetName="contentPresenter">
  497. <Setter.Value>
  498. <DropShadowEffect BlurRadius="5" Color="White" ShadowDepth="0"/>
  499. </Setter.Value>
  500. </Setter>
  501. </DataTrigger>
  502. <Trigger Property="IsHighlighted" Value="True">
  503. <Setter Property="Background" TargetName="BG" Value="{DynamicResource SubMenu_BG_Select}"/>
  504. <Setter Property="Foreground" Value="{DynamicResource SubMenu_FG_Select}"/>
  505. </Trigger>
  506. <Trigger Property="IsEnabled" Value="false">
  507. <Setter Property="Foreground" Value="#FF9A9A9A"/>
  508. </Trigger>
  509. </ControlTemplate.Triggers>
  510. </ControlTemplate>
  511. </Setter.Value>
  512. </Setter>
  513. </Style>
  514. </Menu.ItemContainerStyle>
  515. </Menu>
  516. </Border>
  517. <Border x:Name="Bottom_Frame" Grid.Row="3" Background="{DynamicResource BottomFrame_BG}">
  518. <Border BorderBrush="{DynamicResource BottomFrame_BD}" BorderThickness="0,0,0,1">
  519. <Menu ItemsSource="{Binding Path=MenuItems}" Grid.Row="0" Background="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="7,0">
  520. <Menu.ItemTemplate>
  521. <DataTemplate>
  522. <TextBlock Margin="1" Text="{Binding Path=ResKey}"/>
  523. </DataTemplate>
  524. </Menu.ItemTemplate>
  525. <Menu.ItemContainerStyle>
  526. <Style TargetType="MenuItem">
  527. <Setter Property="Command" Value="{Binding DataContext.MainMenuItemClickCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"/>
  528. <Setter Property="CommandParameter" Value="{ Binding }"/>
  529. <!--<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  530. <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>-->
  531. <Setter Property="Background" Value="Transparent"/>
  532. <Setter Property="FontSize" Value="16"/>
  533. <Setter Property="FontWeight" Value="Bold"/>
  534. <Setter Property="Margin" Value="10,0,0,0"/>
  535. <Setter Property="Width" Value="140"/>
  536. <Setter Property="Height" Value="50"/>
  537. <Setter Property="Template" Value="{DynamicResource SubMunu_ShowOnTop}"/>
  538. </Style>
  539. </Menu.ItemContainerStyle>
  540. </Menu>
  541. </Border>
  542. </Border>
  543. <Grid.Style>
  544. <Style>
  545. <Style.Triggers>
  546. <DataTrigger Binding="{Binding IsLogin}" Value="False">
  547. <Setter Property="Grid.Visibility" Value="Collapsed"></Setter>
  548. </DataTrigger>
  549. </Style.Triggers>
  550. </Style>
  551. </Grid.Style>
  552. </Grid>
  553. </Grid>
  554. </wnd:CustomWnd>