MainView.xaml 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. <wnd:CustomWnd x:Class="EfemDualUI.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:converter="clr-namespace:MECF.Framework.UI.Client.Ctrlib.Converter;assembly=MECF.Framework.UI.Client"
  10. xmlns:deviceControl="clr-namespace:Aitex.Core.UI.DeviceControl;assembly=MECF.Framework.UI.Core"
  11. xmlns:efemDualUi="clr-namespace:EfemDualUI"
  12. Title="MainView" Height="1060" Width="1920">
  13. <Window.Resources>
  14. <efemDualUi:DateTimeToTextConverter x:Key="dateTimeToTextConverter"/>
  15. <efemDualUi:CollectionLastIndexConverter x:Key="collectionLastIndexConverter" />
  16. <converter:UnitOnlineBorderColorConverter x:Key="UnitOnlineBorderColorConverter"/>
  17. <converter:BoolReverseConverter x:Key="BoolReverseConverter"></converter:BoolReverseConverter>
  18. </Window.Resources>
  19. <Grid Background="{DynamicResource MainArea_BG}">
  20. <Grid x:Name="LoginPart" Background="{StaticResource Login_BG}">
  21. <Ellipse MaxWidth="1000" MaxHeight="800" Fill="{DynamicResource Login_BG_Highlight}"/>
  22. <Grid Width="590" Height="465">
  23. <Grid.Effect>
  24. <DropShadowEffect Color="#FF0B1E5A" BlurRadius="30" ShadowDepth="0"/>
  25. </Grid.Effect>
  26. <Border BorderBrush="{DynamicResource LoginPanel_BD}" BorderThickness="1" CornerRadius="3" Background="{DynamicResource LoginPanel_BG}">
  27. <Grid>
  28. <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}"/>
  29. <Grid Margin="60,40">
  30. <Grid.RowDefinitions>
  31. <RowDefinition Height="70"/>
  32. <RowDefinition Height="10"/>
  33. <RowDefinition/>
  34. <RowDefinition Height="Auto"/>
  35. </Grid.RowDefinitions>
  36. <StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
  37. <TextBlock TextWrapping="Wrap" Text="Login" FontWeight="Bold" FontFamily="Arial" FontSize="50" Foreground="White" VerticalAlignment="Bottom" Margin="0,0,0,5"/>
  38. <TextBlock TextWrapping="Wrap" Text="登录" FontFamily="SimHei" FontSize="32" Foreground="White" Opacity="0.5" Margin="10,0,0,12" VerticalAlignment="Bottom" FontWeight="Bold"/>
  39. </StackPanel>
  40. <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="-20,0">
  41. <Rectangle Fill="#19FFFFFF" Width="10" Height="10"/>
  42. <Rectangle Fill="#7FFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  43. <Rectangle Fill="#33FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  44. <Rectangle Fill="#66FFFFFF" Width="10" Height="10" Margin="50,0,0,0"/>
  45. <Rectangle Fill="#7FFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  46. <Rectangle Fill="#4CFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  47. <Rectangle Fill="#33FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  48. <Rectangle Fill="#66FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  49. <Rectangle Fill="#99FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  50. <Rectangle Fill="#7FFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  51. <Rectangle Fill="#99FFFFFF" Width="10" Height="10" Margin="20,0,0,0"/>
  52. <Rectangle Fill="#B2FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  53. <Rectangle Fill="#CCFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  54. <Rectangle Fill="#CCFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  55. <Rectangle Fill="#B2FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  56. <Rectangle Fill="#19FFFFFF" Width="10" Height="10" Margin="50,0,0,0"/>
  57. <Rectangle Fill="#4CFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  58. <Rectangle Fill="#19FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  59. <Rectangle Fill="#4CFFFFFF" Width="10" Height="10" Margin="30,0,0,0"/>
  60. <Rectangle Fill="#66FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  61. <Rectangle Fill="#33FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  62. <Rectangle Fill="#33FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  63. <Rectangle Fill="#66FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  64. <Rectangle Fill="#7FFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  65. <Rectangle Fill="#4CFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  66. <Rectangle Fill="#33FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  67. </StackPanel>
  68. <Grid Margin="40" Grid.Row="2">
  69. <Grid.ColumnDefinitions>
  70. <ColumnDefinition Width="130"/>
  71. <ColumnDefinition/>
  72. </Grid.ColumnDefinitions>
  73. <Grid.RowDefinitions>
  74. <RowDefinition/>
  75. <RowDefinition/>
  76. <RowDefinition/>
  77. </Grid.RowDefinitions>
  78. <TextBox x:Name="tbLoginName" Grid.Column="1" Text="" TabIndex="0" TextWrapping="Wrap" Height="45" VerticalAlignment="Center" Style="{DynamicResource Login_TextBox}"/>
  79. <PasswordBox x:Name="pdbPassword" Grid.Column="1" Grid.Row="1" TabIndex="1" Height="45" Style="{DynamicResource Login_PasswordBox}">
  80. <i:Interaction.Triggers>
  81. <i:EventTrigger EventName="KeyDown">
  82. <cal:ActionMessage MethodName="Enter">
  83. <cal:Parameter Value="$eventargs" />
  84. <cal:Parameter Value="{Binding ElementName=tbLoginName, Path=Text}" />
  85. <cal:Parameter Value="{Binding ElementName=pdbPassword}" />
  86. <cal:Parameter Value="{Binding ElementName=cbRole, Path=SelectedValue}" />
  87. </cal:ActionMessage>
  88. </i:EventTrigger>
  89. </i:Interaction.Triggers>
  90. </PasswordBox>
  91. <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">
  92. </ComboBox>
  93. <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"/>
  94. <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"/>
  95. <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"/>
  96. </Grid>
  97. <Button Style="{StaticResource Login_Button}" Content="Login" Grid.Row="3" FontFamily="Arial" FontSize="18" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center" Height="55" Width="160">
  98. <i:Interaction.Triggers>
  99. <i:EventTrigger EventName="Click">
  100. <cal:ActionMessage MethodName="Login">
  101. <cal:Parameter Value="{Binding ElementName=tbLoginName, Path=Text}" />
  102. <cal:Parameter Value="{Binding ElementName=pdbPassword}" />
  103. <cal:Parameter Value="{Binding ElementName=cbRole, Path=SelectedValue}" />
  104. </cal:ActionMessage>
  105. </i:EventTrigger>
  106. </i:Interaction.Triggers>
  107. </Button>
  108. </Grid>
  109. </Grid>
  110. </Border>
  111. </Grid>
  112. <Grid.Style>
  113. <Style>
  114. <Style.Triggers>
  115. <DataTrigger Binding="{Binding IsLogin}" Value="True">
  116. <Setter Property="Grid.Visibility" Value="Collapsed"></Setter>
  117. </DataTrigger>
  118. </Style.Triggers>
  119. </Style>
  120. </Grid.Style>
  121. </Grid>
  122. <Border BorderBrush="LightCyan" BorderThickness="2" Margin="3,1" CornerRadius="4" Padding="1" >
  123. <Grid x:Name="MainPage">
  124. <Grid.RowDefinitions>
  125. <RowDefinition Height="120"/>
  126. <RowDefinition />
  127. <RowDefinition Height="30"/>
  128. <RowDefinition Height="70"/>
  129. </Grid.RowDefinitions>
  130. <Grid x:Name="Top_Frame">
  131. <Grid.RowDefinitions>
  132. <RowDefinition Height="30*" />
  133. </Grid.RowDefinitions>
  134. <Border Style="{DynamicResource TopFrame_Style}">
  135. <Grid>
  136. <Grid.ColumnDefinitions>
  137. <ColumnDefinition Width="200"/>
  138. <ColumnDefinition/>
  139. <ColumnDefinition Width="250"/>
  140. <ColumnDefinition Width="Auto"/>
  141. <ColumnDefinition Width="100"/>
  142. </Grid.ColumnDefinitions>
  143. <Image Grid.Row="0" Grid.Column="0" Source="/Resources/Images/jetplasmalogo.png" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,39,0,22" />
  144. <StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,0,0,5">
  145. <TextBlock Text="Time:" Foreground="white" FontSize="13" Padding="5,0" />
  146. <TextBlock Text="{Binding RunTime}" Foreground="white" FontSize="13" Padding="5,0" />
  147. </StackPanel>
  148. <!--<StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,0,0,5">
  149. <TextBlock Text="Ver:" Foreground="white" FontSize="13" Padding="5,0" />
  150. <TextBlock Text="{Binding SoftwareVersion}" Foreground="white" FontSize="13" Padding="5,0" />
  151. </StackPanel>-->
  152. <Grid Grid.Column="1" Margin="10,8,0,8">
  153. <Grid.RowDefinitions>
  154. <RowDefinition/>
  155. <RowDefinition/>
  156. <RowDefinition/>
  157. </Grid.RowDefinitions>
  158. <Grid.ColumnDefinitions>
  159. <ColumnDefinition Width="80" />
  160. <ColumnDefinition MinWidth="65"/>
  161. <ColumnDefinition Width="80"/>
  162. <ColumnDefinition MinWidth="65"/>
  163. <ColumnDefinition Width="80"/>
  164. <ColumnDefinition MinWidth="65"/>
  165. </Grid.ColumnDefinitions>
  166. <Label Style="{DynamicResource TopLable_LeftTop}" BorderBrush="Gray" Content="System" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
  167. <Label Grid.Column="2" Style="{DynamicResource TopLable}" BorderBrush="Gray" Content="EFEM" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
  168. <Label Grid.Column="4" Style="{DynamicResource TopLable}" BorderBrush="Gray" Content="TM" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
  169. <Label Grid.Row="1" Grid.Column="0" BorderBrush="{Binding IsOnlinePMA, Converter={StaticResource UnitOnlineBorderColorConverter}}" Style="{DynamicResource TopLable}" Content="PMA" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
  170. <Label.ContextMenu>
  171. <ContextMenu>
  172. <MenuItem Header="Put PMA Online" IsEnabled="{Binding IsOnlinePMA, Converter={StaticResource BoolReverseConverter}}" >
  173. <i:Interaction.Triggers>
  174. <i:EventTrigger EventName="Click">
  175. <cal:ActionMessage MethodName="PutModuleOnline">
  176. <cal:Parameter Value="PMA"></cal:Parameter>
  177. </cal:ActionMessage>
  178. </i:EventTrigger>
  179. </i:Interaction.Triggers>
  180. </MenuItem>
  181. <MenuItem Header="Put PMA Offline" IsEnabled="{Binding IsOnlinePMA }" >
  182. <i:Interaction.Triggers>
  183. <i:EventTrigger EventName="Click">
  184. <cal:ActionMessage MethodName="PutModuleOffline">
  185. <cal:Parameter Value="PMA"></cal:Parameter>
  186. </cal:ActionMessage>
  187. </i:EventTrigger>
  188. </i:Interaction.Triggers>
  189. </MenuItem>
  190. </ContextMenu>
  191. </Label.ContextMenu>
  192. </Label>
  193. <Label Grid.Row="1" Grid.Column="2" BorderBrush="{Binding IsOnlinePMB, Converter={StaticResource UnitOnlineBorderColorConverter}}" Style="{DynamicResource TopLable}" Content="PMB" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
  194. <Label.ContextMenu>
  195. <ContextMenu>
  196. <MenuItem Header="Put PMB Online" IsEnabled="{Binding IsOnlinePMB, Converter={StaticResource BoolReverseConverter}}" >
  197. <i:Interaction.Triggers>
  198. <i:EventTrigger EventName="Click">
  199. <cal:ActionMessage MethodName="PutModuleOnline">
  200. <cal:Parameter Value="PMB"></cal:Parameter>
  201. </cal:ActionMessage>
  202. </i:EventTrigger>
  203. </i:Interaction.Triggers>
  204. </MenuItem>
  205. <MenuItem Header="Put PMB Offline" IsEnabled="{Binding IsOnlinePMB }" >
  206. <i:Interaction.Triggers>
  207. <i:EventTrigger EventName="Click">
  208. <cal:ActionMessage MethodName="PutModuleOffline">
  209. <cal:Parameter Value="PMB"></cal:Parameter>
  210. </cal:ActionMessage>
  211. </i:EventTrigger>
  212. </i:Interaction.Triggers>
  213. </MenuItem>
  214. </ContextMenu>
  215. </Label.ContextMenu>
  216. </Label>
  217. <Label Grid.Row="1" Grid.Column="4" BorderBrush="Gray" Style="{DynamicResource TopLable}" Content="Host" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
  218. <Label Grid.Row="2" Grid.Column="0" BorderBrush="Gray" Style="{DynamicResource TopLable_LeftBottom}" Content="Log" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
  219. <TextBox Grid.Column="1" TextWrapping="Wrap" IsReadOnly="True" Text="{Binding RtStatus}" Background="{Binding RtStatusBackground}" Style="{StaticResource TextBox_Top}" VerticalContentAlignment="Center"/>
  220. <TextBox Grid.Column="3" TextWrapping="Wrap" IsReadOnly="True" Text="{Binding EfemStatus}" Background="{Binding EfemStatusBackground}" Style="{StaticResource TextBox_Top}" VerticalContentAlignment="Center"/>
  221. <TextBox Grid.Column="5" TextWrapping="Wrap" IsReadOnly="True" Text="{Binding TMStatus}" Background="{Binding TMStatusBackground}" Style="{StaticResource TextBox_RightTop}" VerticalContentAlignment="Center"/>
  222. <TextBox Grid.Row="1" Grid.Column="1" TextWrapping="Wrap" IsReadOnly="True" Text="{Binding PMAStatus}" Background="{Binding PMAStatusBackground}" Style="{StaticResource TextBox_Top}" VerticalContentAlignment="Center"/>
  223. <TextBox Grid.Row="1" Grid.Column="3" TextWrapping="Wrap" IsReadOnly="True" Text="{Binding PMBStatus}" Background="{Binding PMBStatusBackground}" Style="{StaticResource TextBox_Top}" VerticalContentAlignment="Center"/>
  224. <TextBox Grid.Row="1" Grid.Column="5" TextWrapping="Wrap" IsReadOnly="True" Text="{Binding HostStatus}" Background="{Binding HostStatusBackground}" Style="{StaticResource TextBox_Top}" VerticalContentAlignment="Center"/>
  225. <Grid Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="5">
  226. <Grid.ColumnDefinitions>
  227. <ColumnDefinition />
  228. <ColumnDefinition Width="Auto"/>
  229. </Grid.ColumnDefinitions>
  230. <ComboBox Style="{DynamicResource Top_ComboBox}" ItemsSource="{Binding EventLogList}" Visibility="{Binding AllEventsVisibility}" SelectedIndex="{Binding EventLogList.Count,Mode=OneWay,Converter={StaticResource collectionLastIndexConverter}}" VerticalContentAlignment="Center" FontSize="15" Height="Auto">
  231. <ComboBox.ItemTemplate>
  232. <DataTemplate>
  233. <ContentControl>
  234. <ContentControl.Style>
  235. <Style TargetType="ContentControl">
  236. <Setter Property="Background" Value="{StaticResource MessagesInformationBackgroundBrush}"/>
  237. <Style.Triggers>
  238. <DataTrigger Binding="{Binding Level}" Value="Alarm">
  239. <Setter Property="Foreground" Value="{StaticResource MessagesErrorForegroundBrush}"/>
  240. </DataTrigger>
  241. <DataTrigger Binding="{Binding Level}" Value="Warning">
  242. <Setter Property="Foreground" Value="{StaticResource MessagesWarningForegroundBrush}"/>
  243. </DataTrigger>
  244. <DataTrigger Binding="{Binding Level}" Value="Information">
  245. <Setter Property="Foreground" Value="{StaticResource MessagesInformationForegroundBrush}"/>
  246. </DataTrigger>
  247. </Style.Triggers>
  248. </Style>
  249. </ContentControl.Style>
  250. <Grid>
  251. <Grid.ColumnDefinitions>
  252. <ColumnDefinition Width="100"/>
  253. <ColumnDefinition Width="100"/>
  254. <ColumnDefinition Width="0"/>
  255. <ColumnDefinition Width="*"/>
  256. </Grid.ColumnDefinitions>
  257. <TextBlock Margin="8,0,0,0" Grid.Column="0" Text="{Binding OccuringTime, Converter={StaticResource dateTimeToTextConverter}}" />
  258. <TextBlock Grid.Column="2" Text="{Binding Id}" Margin="8,0,0,0"/>
  259. <TextBlock Grid.Column="1" Text="{Binding Source}" Margin="8,0,0,0" />
  260. <TextBlock Grid.Column="3" Text="{Binding Description}" Margin="8,0,0,0"/>
  261. </Grid>
  262. </ContentControl>
  263. </DataTemplate>
  264. </ComboBox.ItemTemplate>
  265. </ComboBox>
  266. <ComboBox Style="{DynamicResource Top_ComboBox}" ItemsSource="{Binding WarnEventLogList}" Visibility="{Binding WarnEventsVisibility}" SelectedIndex="{Binding WarnEventLogList.Count,Mode=OneWay,Converter={StaticResource collectionLastIndexConverter}}" VerticalContentAlignment="Center" FontSize="15" Height="Auto" SelectionChanged="ComboBox_SelectionChanged">
  267. <ComboBox.ItemTemplate>
  268. <DataTemplate>
  269. <ContentControl>
  270. <ContentControl.Style>
  271. <Style TargetType="ContentControl">
  272. <Setter Property="Background" Value="{StaticResource MessagesInformationBackgroundBrush}"/>
  273. <Style.Triggers>
  274. <DataTrigger Binding="{Binding Level}" Value="Alarm">
  275. <Setter Property="Foreground" Value="{StaticResource MessagesErrorForegroundBrush}"/>
  276. </DataTrigger>
  277. <DataTrigger Binding="{Binding Level}" Value="Warning">
  278. <Setter Property="Foreground" Value="{StaticResource MessagesWarningForegroundBrush}"/>
  279. </DataTrigger>
  280. <DataTrigger Binding="{Binding Level}" Value="Information">
  281. <Setter Property="Foreground" Value="{StaticResource MessagesInformationForegroundBrush}"/>
  282. </DataTrigger>
  283. </Style.Triggers>
  284. </Style>
  285. </ContentControl.Style>
  286. <Grid>
  287. <Grid.ColumnDefinitions>
  288. <ColumnDefinition Width="100"/>
  289. <ColumnDefinition Width="100"/>
  290. <ColumnDefinition Width="0"/>
  291. <ColumnDefinition Width="*"/>
  292. </Grid.ColumnDefinitions>
  293. <TextBlock Margin="2,0,0,0" Grid.Column="0" Text="{Binding OccuringTime, Converter={StaticResource dateTimeToTextConverter}}" />
  294. <TextBlock Grid.Column="2" Text="{Binding Id}" Margin="8,0,0,0"/>
  295. <TextBlock Grid.Column="1" Text="{Binding Source}" Margin="8,0,0,0" />
  296. <TextBlock Grid.Column="3" Text="{Binding Description}" Margin="2,0,0,0"/>
  297. </Grid>
  298. </ContentControl>
  299. </DataTemplate>
  300. </ComboBox.ItemTemplate>
  301. </ComboBox>
  302. <Label Grid.Row="2" Grid.Column="6" Style="{DynamicResource TopLable_RightBottom}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
  303. <CheckBox Content="Alarm" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource FG_Black}" FontFamily="Arial" FontSize="16">
  304. <i:Interaction.Triggers>
  305. <i:EventTrigger EventName="Checked">
  306. <cal:ActionMessage MethodName="ShowAlarmEvents">
  307. </cal:ActionMessage>
  308. </i:EventTrigger>
  309. <i:EventTrigger EventName="Unchecked">
  310. <cal:ActionMessage MethodName="ShowAllEvents">
  311. </cal:ActionMessage>
  312. </i:EventTrigger>
  313. </i:Interaction.Triggers>
  314. </CheckBox>
  315. </Label>
  316. </Grid>
  317. </Grid>
  318. <Grid Grid.Column="2" Margin="8,10" IsEnabled="{Binding IsPermission}">
  319. <Grid.RowDefinitions>
  320. <RowDefinition/>
  321. <RowDefinition/>
  322. </Grid.RowDefinitions>
  323. <Grid.ColumnDefinitions>
  324. <ColumnDefinition />
  325. <ColumnDefinition />
  326. </Grid.ColumnDefinitions>
  327. <Button Content="FA Enable" Margin="2,4" Style="{DynamicResource TopButton}" IsEnabled="{Binding IsEnableFAEnable}">
  328. <i:Interaction.Triggers>
  329. <i:EventTrigger EventName="Click">
  330. <cal:ActionMessage MethodName="FAEnable"/>
  331. </i:EventTrigger>
  332. </i:Interaction.Triggers>
  333. </Button>
  334. <Button Grid.Column="1" Content="FA Disable" Margin="2,4" Style="{DynamicResource TopButton}" IsEnabled="{Binding IsDisableFAEnable}">
  335. <i:Interaction.Triggers>
  336. <i:EventTrigger EventName="Click">
  337. <cal:ActionMessage MethodName="FADisable"/>
  338. </i:EventTrigger>
  339. </i:Interaction.Triggers>
  340. </Button>
  341. <Button Grid.Row="1" Content="Reset" Margin="2,4" Style="{DynamicResource TopButton}">
  342. <i:Interaction.Triggers>
  343. <i:EventTrigger EventName="Click">
  344. <cal:ActionMessage MethodName="Reset">
  345. </cal:ActionMessage>
  346. </i:EventTrigger>
  347. </i:Interaction.Triggers>
  348. </Button>
  349. <Button Grid.Row="1" Grid.Column="1" Content="Buzzer Off" Margin="2,4" Style="{DynamicResource TopButton}">
  350. <i:Interaction.Triggers>
  351. <i:EventTrigger EventName="Click">
  352. <cal:ActionMessage MethodName="BuzzerOff">
  353. </cal:ActionMessage>
  354. </i:EventTrigger>
  355. </i:Interaction.Triggers>
  356. </Button>
  357. </Grid>
  358. <Label Grid.Column="3" Style="{DynamicResource TopLable_SignalTower}" Margin="0,5" Width="50" VerticalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
  359. <Viewbox Width="45" Height="80">
  360. <deviceControl:AITSignalTower Width="45" Height="110" DeviceData="{Binding SignalTowerData}"></deviceControl:AITSignalTower>
  361. </Viewbox>
  362. </Label>
  363. <Grid Grid.Column="4" Margin="5,10">
  364. <Grid.RowDefinitions>
  365. <RowDefinition />
  366. <RowDefinition />
  367. </Grid.RowDefinitions>
  368. <Border Margin="2,4" Background="{DynamicResource TopFrame_UserInfoBG}" BorderBrush="{DynamicResource TopFrame_UserInfoBD}" BorderThickness="1" CornerRadius="5" SnapsToDevicePixels="True">
  369. <TextBlock TextWrapping="NoWrap" Text="{Binding User.LoginName}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
  370. </Border>
  371. <Button Grid.Row="1" Style="{DynamicResource Logout_Button}" Margin="2,4" Content="Logout">
  372. <i:Interaction.Triggers>
  373. <i:EventTrigger EventName="Click">
  374. <cal:ActionMessage MethodName="Logout">
  375. </cal:ActionMessage>
  376. </i:EventTrigger>
  377. </i:Interaction.Triggers>
  378. </Button>
  379. </Grid>
  380. </Grid>
  381. </Border>
  382. </Grid>
  383. <Grid Grid.Row="1" Background="{DynamicResource MainArea_BG}">
  384. <Rectangle Fill="{DynamicResource MainArea_InnerBG}" Margin="20,8" RadiusX="5" RadiusY="5">
  385. <Rectangle.Effect>
  386. <BlurEffect Radius="40"/>
  387. </Rectangle.Effect>
  388. </Rectangle>
  389. <ContentControl x:Name="ActiveItem" cal:View.Context="{Binding Context}" cal:View.Model="{Binding ActiveItem}" Margin="10">
  390. </ContentControl>
  391. </Grid>
  392. <Border x:Name="Sub_Menu_Bar" Grid.Row="2" Style="{DynamicResource Sub_Menu_BarStyle}">
  393. <Menu ItemsSource="{Binding Path=SubMenuItems}" Grid.Row="0" Background="{x:Null}" ItemContainerStyle="{DynamicResource BottomSubMenu}" Margin="3,0">
  394. <Menu.ItemTemplate>
  395. <DataTemplate>
  396. <TextBlock Margin="1" Text="{Binding Path=ResKey}"/>
  397. </DataTemplate>
  398. </Menu.ItemTemplate>
  399. </Menu>
  400. </Border>
  401. <Border x:Name="Bottom_Frame" Grid.Row="3" Style="{DynamicResource Bottom_FrameStyle}">
  402. <Grid>
  403. <Grid.ColumnDefinitions>
  404. <ColumnDefinition Width="150"/>
  405. <ColumnDefinition Width="*"/>
  406. <ColumnDefinition Width="150"/>
  407. </Grid.ColumnDefinitions>
  408. <!--<TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="LOGO" VerticalAlignment="Center" FontFamily="Arial" Foreground="White" FontSize="50" FontWeight="Bold" Margin="9,10,1743,2" FontStyle="Italic" RenderTransformOrigin="-5.298,-0.284"/>-->
  409. <Menu ItemsSource="{Binding Path=MenuItems}" Grid.Row="0" Grid.Column="1" Background="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0" ItemContainerStyle="{DynamicResource MainMenu}">
  410. <Menu.ItemTemplate>
  411. <DataTemplate>
  412. <TextBlock Margin="1" Text="{Binding Path=ResKey}"/>
  413. </DataTemplate>
  414. </Menu.ItemTemplate>
  415. </Menu>
  416. <TextBlock Grid.Column="2" Opacity="0.2" HorizontalAlignment="Center" Text="Metis" VerticalAlignment="Center" FontFamily="Arial" Foreground="White" FontSize="50" FontWeight="Bold" Margin="10,0" FontStyle="Italic">
  417. <TextBlock.Effect>
  418. <DropShadowEffect/>
  419. </TextBlock.Effect>
  420. </TextBlock>
  421. </Grid>
  422. </Border>
  423. <Grid.Style>
  424. <Style>
  425. <Style.Triggers>
  426. <DataTrigger Binding="{Binding IsLogin}" Value="False">
  427. <Setter Property="Grid.Visibility" Value="Collapsed"></Setter>
  428. </DataTrigger>
  429. </Style.Triggers>
  430. </Style>
  431. </Grid.Style>
  432. </Grid>
  433. </Border>
  434. </Grid>
  435. </wnd:CustomWnd>