MainView.xaml 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  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. <StackPanel Orientation="Vertical" Grid.Row="0" Grid.Column="0">
  144. <Image Source="/Resources/Images/jetplasmalogo.png" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,30,0,0" />
  145. <TextBlock Text="{Binding SoftwareVersion}" Foreground="white" FontSize="18" Margin="80,-20,0,0"/>
  146. </StackPanel>
  147. <StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,0,0,5">
  148. <TextBlock Text="Time:" Foreground="white" FontSize="13" Padding="5,0" />
  149. <TextBlock Text="{Binding RunTime}" Foreground="white" FontSize="13" Padding="5,0" />
  150. </StackPanel>
  151. <!--<StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,0,0,5">
  152. <TextBlock Text="Ver:" Foreground="white" FontSize="13" Padding="5,0" />
  153. <TextBlock Text="{Binding SoftwareVersion}" Foreground="white" FontSize="13" Padding="5,0" />
  154. </StackPanel>-->
  155. <Grid Grid.Column="1" Margin="10,8,0,8">
  156. <Grid.RowDefinitions>
  157. <RowDefinition/>
  158. <RowDefinition/>
  159. <RowDefinition/>
  160. </Grid.RowDefinitions>
  161. <Grid.ColumnDefinitions>
  162. <ColumnDefinition Width="80" />
  163. <ColumnDefinition MinWidth="65"/>
  164. <ColumnDefinition Width="80"/>
  165. <ColumnDefinition MinWidth="65"/>
  166. <ColumnDefinition Width="80"/>
  167. <ColumnDefinition MinWidth="65"/>
  168. </Grid.ColumnDefinitions>
  169. <Label Style="{DynamicResource TopLable_LeftTop}" BorderBrush="Gray" Content="System" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
  170. <Label Grid.Column="2" Style="{DynamicResource TopLable}" BorderBrush="Gray" Content="EFEM" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
  171. <Label Grid.Column="4" Style="{DynamicResource TopLable}" BorderBrush="Gray" Content="TM" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
  172. <Label Grid.Row="1" Grid.Column="0" Visibility="{Binding PMAVisibility}" BorderBrush="{Binding IsOnlinePMA, Converter={StaticResource UnitOnlineBorderColorConverter}}" Style="{DynamicResource TopLable}" Content="PMA" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
  173. <Label.ContextMenu>
  174. <ContextMenu>
  175. <MenuItem Header="Put PMA Online" IsEnabled="{Binding IsOnlinePMA, Converter={StaticResource BoolReverseConverter}}" >
  176. <i:Interaction.Triggers>
  177. <i:EventTrigger EventName="Click">
  178. <cal:ActionMessage MethodName="PutModuleOnline">
  179. <cal:Parameter Value="PMA"></cal:Parameter>
  180. </cal:ActionMessage>
  181. </i:EventTrigger>
  182. </i:Interaction.Triggers>
  183. </MenuItem>
  184. <MenuItem Header="Put PMA Offline" IsEnabled="{Binding IsOnlinePMA }" >
  185. <i:Interaction.Triggers>
  186. <i:EventTrigger EventName="Click">
  187. <cal:ActionMessage MethodName="PutModuleOffline">
  188. <cal:Parameter Value="PMA"></cal:Parameter>
  189. </cal:ActionMessage>
  190. </i:EventTrigger>
  191. </i:Interaction.Triggers>
  192. </MenuItem>
  193. </ContextMenu>
  194. </Label.ContextMenu>
  195. </Label>
  196. <Label Grid.Row="1" Grid.Column="2" Visibility="{Binding PMBVisibility}" BorderBrush="{Binding IsOnlinePMB, Converter={StaticResource UnitOnlineBorderColorConverter}}" Style="{DynamicResource TopLable}" Content="PMB" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
  197. <Label.ContextMenu>
  198. <ContextMenu>
  199. <MenuItem Header="Put PMB Online" IsEnabled="{Binding IsOnlinePMB, Converter={StaticResource BoolReverseConverter}}" >
  200. <i:Interaction.Triggers>
  201. <i:EventTrigger EventName="Click">
  202. <cal:ActionMessage MethodName="PutModuleOnline">
  203. <cal:Parameter Value="PMB"></cal:Parameter>
  204. </cal:ActionMessage>
  205. </i:EventTrigger>
  206. </i:Interaction.Triggers>
  207. </MenuItem>
  208. <MenuItem Header="Put PMB Offline" IsEnabled="{Binding IsOnlinePMB }" >
  209. <i:Interaction.Triggers>
  210. <i:EventTrigger EventName="Click">
  211. <cal:ActionMessage MethodName="PutModuleOffline">
  212. <cal:Parameter Value="PMB"></cal:Parameter>
  213. </cal:ActionMessage>
  214. </i:EventTrigger>
  215. </i:Interaction.Triggers>
  216. </MenuItem>
  217. </ContextMenu>
  218. </Label.ContextMenu>
  219. </Label>
  220. <Label Grid.Row="1" Grid.Column="4" BorderBrush="Gray" Style="{DynamicResource TopLable}" Content="Host" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
  221. <Label Grid.Row="2" Grid.Column="0" BorderBrush="Gray" Style="{DynamicResource TopLable_LeftBottom}" Content="Log" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
  222. <TextBox Grid.Column="1" TextWrapping="Wrap" IsReadOnly="True" Text="{Binding RtStatus}" Background="{Binding RtStatusBackground}" Style="{StaticResource TextBox_Top}" VerticalContentAlignment="Center"/>
  223. <TextBox Grid.Column="3" TextWrapping="Wrap" IsReadOnly="True" Text="{Binding EfemStatus}" Background="{Binding EfemStatusBackground}" Style="{StaticResource TextBox_Top}" VerticalContentAlignment="Center"/>
  224. <TextBox Grid.Column="5" TextWrapping="Wrap" IsReadOnly="True" Text="{Binding TMStatus}" Background="{Binding TMStatusBackground}" Style="{StaticResource TextBox_RightTop}" VerticalContentAlignment="Center"/>
  225. <TextBox Grid.Row="1" Grid.Column="1" TextWrapping="Wrap" IsReadOnly="True" Text="{Binding PMAStatus}" Visibility="{Binding PMAVisibility}" Background="{Binding PMAStatusBackground}" Style="{StaticResource TextBox_Top}" VerticalContentAlignment="Center"/>
  226. <TextBox Grid.Row="1" Visibility="{Binding PMBVisibility}" Grid.Column="3" TextWrapping="Wrap" IsReadOnly="True" Text="{Binding PMBStatus}" Background="{Binding PMBStatusBackground}" Style="{StaticResource TextBox_Top}" VerticalContentAlignment="Center"/>
  227. <TextBox Grid.Row="1" Grid.Column="5" TextWrapping="Wrap" IsReadOnly="True" Text="{Binding HostStatus}" Background="{Binding HostStatusBackground}" Style="{StaticResource TextBox_Top}" VerticalContentAlignment="Center"/>
  228. <Grid Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="5">
  229. <Grid.ColumnDefinitions>
  230. <ColumnDefinition />
  231. <ColumnDefinition Width="Auto"/>
  232. </Grid.ColumnDefinitions>
  233. <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">
  234. <ComboBox.ItemTemplate>
  235. <DataTemplate>
  236. <ContentControl>
  237. <ContentControl.Style>
  238. <Style TargetType="ContentControl">
  239. <Setter Property="Background" Value="{StaticResource MessagesInformationBackgroundBrush}"/>
  240. <Style.Triggers>
  241. <DataTrigger Binding="{Binding Level}" Value="Alarm">
  242. <Setter Property="Foreground" Value="{StaticResource MessagesErrorForegroundBrush}"/>
  243. </DataTrigger>
  244. <DataTrigger Binding="{Binding Level}" Value="Warning">
  245. <Setter Property="Foreground" Value="{StaticResource MessagesWarningForegroundBrush}"/>
  246. </DataTrigger>
  247. <DataTrigger Binding="{Binding Level}" Value="Information">
  248. <Setter Property="Foreground" Value="{StaticResource MessagesInformationForegroundBrush}"/>
  249. </DataTrigger>
  250. </Style.Triggers>
  251. </Style>
  252. </ContentControl.Style>
  253. <Grid>
  254. <Grid.ColumnDefinitions>
  255. <ColumnDefinition Width="100"/>
  256. <ColumnDefinition Width="100"/>
  257. <ColumnDefinition Width="0"/>
  258. <ColumnDefinition Width="*"/>
  259. </Grid.ColumnDefinitions>
  260. <TextBlock Margin="8,0,0,0" Grid.Column="0" Text="{Binding OccuringTime, Converter={StaticResource dateTimeToTextConverter}}" />
  261. <TextBlock Grid.Column="2" Text="{Binding Id}" Margin="8,0,0,0"/>
  262. <TextBlock Grid.Column="1" Text="{Binding Source}" Margin="8,0,0,0" />
  263. <TextBlock Grid.Column="3" Text="{Binding Description}" Margin="8,0,0,0"/>
  264. </Grid>
  265. </ContentControl>
  266. </DataTemplate>
  267. </ComboBox.ItemTemplate>
  268. </ComboBox>
  269. <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">
  270. <ComboBox.ItemTemplate>
  271. <DataTemplate>
  272. <ContentControl>
  273. <ContentControl.Style>
  274. <Style TargetType="ContentControl">
  275. <Setter Property="Background" Value="{StaticResource MessagesInformationBackgroundBrush}"/>
  276. <Style.Triggers>
  277. <DataTrigger Binding="{Binding Level}" Value="Alarm">
  278. <Setter Property="Foreground" Value="{StaticResource MessagesErrorForegroundBrush}"/>
  279. </DataTrigger>
  280. <DataTrigger Binding="{Binding Level}" Value="Warning">
  281. <Setter Property="Foreground" Value="{StaticResource MessagesWarningForegroundBrush}"/>
  282. </DataTrigger>
  283. <DataTrigger Binding="{Binding Level}" Value="Information">
  284. <Setter Property="Foreground" Value="{StaticResource MessagesInformationForegroundBrush}"/>
  285. </DataTrigger>
  286. </Style.Triggers>
  287. </Style>
  288. </ContentControl.Style>
  289. <Grid>
  290. <Grid.ColumnDefinitions>
  291. <ColumnDefinition Width="100"/>
  292. <ColumnDefinition Width="100"/>
  293. <ColumnDefinition Width="0"/>
  294. <ColumnDefinition Width="*"/>
  295. </Grid.ColumnDefinitions>
  296. <TextBlock Margin="2,0,0,0" Grid.Column="0" Text="{Binding OccuringTime, Converter={StaticResource dateTimeToTextConverter}}" />
  297. <TextBlock Grid.Column="2" Text="{Binding Id}" Margin="8,0,0,0"/>
  298. <TextBlock Grid.Column="1" Text="{Binding Source}" Margin="8,0,0,0" />
  299. <TextBlock Grid.Column="3" Text="{Binding Description}" Margin="2,0,0,0"/>
  300. </Grid>
  301. </ContentControl>
  302. </DataTemplate>
  303. </ComboBox.ItemTemplate>
  304. </ComboBox>
  305. <Label Grid.Row="2" Grid.Column="6" Style="{DynamicResource TopLable_RightBottom}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
  306. <CheckBox Content="Alarm" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource FG_Black}" FontFamily="Arial" FontSize="16">
  307. <i:Interaction.Triggers>
  308. <i:EventTrigger EventName="Checked">
  309. <cal:ActionMessage MethodName="ShowAlarmEvents">
  310. </cal:ActionMessage>
  311. </i:EventTrigger>
  312. <i:EventTrigger EventName="Unchecked">
  313. <cal:ActionMessage MethodName="ShowAllEvents">
  314. </cal:ActionMessage>
  315. </i:EventTrigger>
  316. </i:Interaction.Triggers>
  317. </CheckBox>
  318. </Label>
  319. </Grid>
  320. </Grid>
  321. <Grid Grid.Column="2" Margin="8,10" IsEnabled="{Binding IsPermission}">
  322. <Grid.RowDefinitions>
  323. <RowDefinition/>
  324. <RowDefinition/>
  325. </Grid.RowDefinitions>
  326. <Grid.ColumnDefinitions>
  327. <ColumnDefinition />
  328. <ColumnDefinition />
  329. </Grid.ColumnDefinitions>
  330. <Button Content="FA Enable" Margin="2,4" Style="{DynamicResource TopButton}" IsEnabled="{Binding IsEnableFAEnable}">
  331. <i:Interaction.Triggers>
  332. <i:EventTrigger EventName="Click">
  333. <cal:ActionMessage MethodName="FAEnable"/>
  334. </i:EventTrigger>
  335. </i:Interaction.Triggers>
  336. </Button>
  337. <Button Grid.Column="1" Content="FA Disable" Margin="2,4" Style="{DynamicResource TopButton}" IsEnabled="{Binding IsDisableFAEnable}">
  338. <i:Interaction.Triggers>
  339. <i:EventTrigger EventName="Click">
  340. <cal:ActionMessage MethodName="FADisable"/>
  341. </i:EventTrigger>
  342. </i:Interaction.Triggers>
  343. </Button>
  344. <Button Grid.Row="1" Content="Reset" Margin="2,4" Style="{DynamicResource TopButton}" Visibility="Collapsed">
  345. <i:Interaction.Triggers>
  346. <i:EventTrigger EventName="Click">
  347. <cal:ActionMessage MethodName="Reset">
  348. </cal:ActionMessage>
  349. </i:EventTrigger>
  350. </i:Interaction.Triggers>
  351. </Button>
  352. <Button Grid.Row="1" Grid.Column="0" Content="Buzzer Off" Margin="2,4" Style="{DynamicResource TopButton}">
  353. <i:Interaction.Triggers>
  354. <i:EventTrigger EventName="Click">
  355. <cal:ActionMessage MethodName="BuzzerOff">
  356. </cal:ActionMessage>
  357. </i:EventTrigger>
  358. </i:Interaction.Triggers>
  359. </Button>
  360. </Grid>
  361. <Label Grid.Column="3" Style="{DynamicResource TopLable_SignalTower}" Margin="0,5" Width="50" VerticalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
  362. <Viewbox Width="45" Height="80">
  363. <deviceControl:AITSignalTower Width="45" Height="110" DeviceData="{Binding SignalTowerData}"></deviceControl:AITSignalTower>
  364. </Viewbox>
  365. </Label>
  366. <Grid Grid.Column="4" Margin="5,10">
  367. <Grid.RowDefinitions>
  368. <RowDefinition />
  369. <RowDefinition />
  370. </Grid.RowDefinitions>
  371. <Border Margin="2,4" Background="{DynamicResource TopFrame_UserInfoBG}" BorderBrush="{DynamicResource TopFrame_UserInfoBD}" BorderThickness="1" CornerRadius="5" SnapsToDevicePixels="True">
  372. <TextBlock TextWrapping="NoWrap" Text="{Binding User.LoginName}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
  373. </Border>
  374. <Button Grid.Row="1" Style="{DynamicResource Logout_Button}" Margin="2,4" Content="Logout">
  375. <i:Interaction.Triggers>
  376. <i:EventTrigger EventName="Click">
  377. <cal:ActionMessage MethodName="Logout">
  378. </cal:ActionMessage>
  379. </i:EventTrigger>
  380. </i:Interaction.Triggers>
  381. </Button>
  382. </Grid>
  383. </Grid>
  384. </Border>
  385. </Grid>
  386. <Grid Grid.Row="1" Background="{DynamicResource MainArea_BG}">
  387. <Rectangle Fill="{DynamicResource MainArea_InnerBG}" Margin="20,8" RadiusX="5" RadiusY="5">
  388. <Rectangle.Effect>
  389. <BlurEffect Radius="40"/>
  390. </Rectangle.Effect>
  391. </Rectangle>
  392. <ContentControl x:Name="ActiveItem" cal:View.Context="{Binding Context}" cal:View.Model="{Binding ActiveItem}" Margin="10">
  393. </ContentControl>
  394. </Grid>
  395. <Border x:Name="Sub_Menu_Bar" Grid.Row="2" Style="{DynamicResource Sub_Menu_BarStyle}">
  396. <Menu ItemsSource="{Binding Path=SubMenuItems}" Grid.Row="0" Background="{x:Null}" ItemContainerStyle="{DynamicResource BottomSubMenu}" Margin="3,0">
  397. <Menu.ItemTemplate>
  398. <DataTemplate>
  399. <TextBlock Margin="1" Text="{Binding Path=ResKey}"/>
  400. </DataTemplate>
  401. </Menu.ItemTemplate>
  402. </Menu>
  403. </Border>
  404. <Border x:Name="Bottom_Frame" Grid.Row="3" Style="{DynamicResource Bottom_FrameStyle}">
  405. <Grid>
  406. <Grid.ColumnDefinitions>
  407. <ColumnDefinition Width="150"/>
  408. <ColumnDefinition Width="*"/>
  409. <ColumnDefinition Width="150"/>
  410. </Grid.ColumnDefinitions>
  411. <!--<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"/>-->
  412. <Menu ItemsSource="{Binding Path=MenuItems}" Grid.Row="0" Grid.Column="1" Background="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0" ItemContainerStyle="{DynamicResource MainMenu}">
  413. <Menu.ItemTemplate>
  414. <DataTemplate>
  415. <TextBlock Margin="1" Text="{Binding Path=ResKey}"/>
  416. </DataTemplate>
  417. </Menu.ItemTemplate>
  418. </Menu>
  419. <TextBlock Grid.Column="2" Opacity="0.2" HorizontalAlignment="Center" Text="Mars" VerticalAlignment="Center" FontFamily="Arial" Foreground="White" FontSize="50" FontWeight="Bold" Margin="10,0" FontStyle="Italic">
  420. <TextBlock.Effect>
  421. <DropShadowEffect/>
  422. </TextBlock.Effect>
  423. </TextBlock>
  424. </Grid>
  425. </Border>
  426. <Grid.Style>
  427. <Style>
  428. <Style.Triggers>
  429. <DataTrigger Binding="{Binding IsLogin}" Value="False">
  430. <Setter Property="Grid.Visibility" Value="Collapsed"></Setter>
  431. </DataTrigger>
  432. </Style.Triggers>
  433. </Style>
  434. </Grid.Style>
  435. </Grid>
  436. </Border>
  437. </Grid>
  438. </wnd:CustomWnd>