MainView.xaml 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  1. <wnd:CustomWnd x:Class="Virgo_DUI.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:Virgo_DUI.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="100"/>
  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 D" 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 MaxHeight="35"/>
  144. <RowDefinition MaxHeight="35"/>
  145. </Grid.RowDefinitions>
  146. <Grid.ColumnDefinitions>
  147. <ColumnDefinition MinWidth="45" MaxWidth="90"/>
  148. <ColumnDefinition MinWidth="65"/>
  149. <ColumnDefinition MinWidth="45" MaxWidth="90"/>
  150. <ColumnDefinition MinWidth="65"/>
  151. <ColumnDefinition MinWidth="45" MaxWidth="90"/>
  152. <ColumnDefinition MinWidth="65"/>
  153. <ColumnDefinition Width="15"/>
  154. <ColumnDefinition Width="200"/>
  155. </Grid.ColumnDefinitions>
  156. <!--<Border BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" CornerRadius="6,0,0,0" Background="{DynamicResource TopFrame_TableBG}">
  157. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" Padding="5,2">
  158. <TextBlock TextWrapping="NoWrap" Text="System" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
  159. </Border>
  160. </Border>-->
  161. <!--<Border Grid.Column="2" Visibility="Hidden" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" Background="{DynamicResource TopFrame_TableBG}">
  162. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" Padding="5,2">
  163. <TextBlock TextWrapping="NoWrap" Text="EFEM" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
  164. </Border>
  165. </Border>-->
  166. <Border Grid.Column="2" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" Background="{DynamicResource TopFrame_TableBG}">
  167. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" Padding="5,2">
  168. <TextBlock TextWrapping="NoWrap" Text="Host" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
  169. </Border>
  170. </Border>
  171. <Border Grid.Column="6" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="0,1,0,0" CornerRadius="0,6,0,0" Background="{DynamicResource TopFrame_TableBG}">
  172. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,0" CornerRadius="0,5,0,0" Padding="5,2"/>
  173. </Border>
  174. <Border Grid.Row="0" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" Background="{DynamicResource TopFrame_TableBG}">
  175. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" Padding="5,2">
  176. <TextBlock TextWrapping="NoWrap" Text="PMA" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{Binding PMA_TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
  177. </Border>
  178. </Border>
  179. <Border Grid.Row="1" Grid.Column="2" Visibility="Hidden" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" Background="{DynamicResource TopFrame_TableBG}">
  180. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" Padding="5,2">
  181. <TextBlock TextWrapping="NoWrap" Text="PMB" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{Binding PMB_TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
  182. </Border>
  183. </Border>
  184. <Border Grid.Row="0" Grid.Column="4" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" Background="{DynamicResource TopFrame_TableBG}">
  185. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,0,1" Padding="5,2">
  186. <TextBlock TextWrapping="NoWrap" Text="版本号:" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
  187. </Border>
  188. </Border>
  189. <Border Grid.Row="0" Grid.Column="5" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="0,1,0,0" Background="{DynamicResource TopFrame_TableBG}">
  190. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,1,0,1" Padding="0,2">
  191. <TextBlock TextWrapping="NoWrap" Text="{Binding SoftwareVersion}" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
  192. </Border>
  193. </Border>
  194. <!--<Border Grid.Row="1" Grid.Column="6" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="0,0,0,0" Background="{DynamicResource TopFrame_TableBG}">
  195. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" Padding="5,2"/>
  196. </Border>-->
  197. <Border Grid.Row="2" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" CornerRadius="0,0,0,6" Background="{DynamicResource TopFrame_TableBG}">
  198. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" CornerRadius="0,0,0,5" Padding="5,2">
  199. <TextBlock TextWrapping="NoWrap" Text="Log" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
  200. </Border>
  201. </Border>
  202. <!--<TextBox Grid.Column="1" Grid.ColumnSpan="3" TextWrapping="Wrap" Text="{Binding RtStatus}" Background="{Binding RtStatusBackground}" Style="{StaticResource TextBox_Top}" Margin="0,0,1,0"/>-->
  203. <!--<TextBox Grid.Column="3" TextWrapping="Wrap" Visibility="Hidden" Text="{Binding EfemStatus}" Background="{Binding EfemStatusBackground}" Style="{StaticResource TextBox_Top}" Margin="0,0,1,0"/>-->
  204. <TextBox Grid.Column="3" TextWrapping="Wrap" Text="{Binding HostStatus}" Background="{Binding HostStatusBackground}" Style="{StaticResource TextBox_Top}" Margin="0,0,1,0"/>
  205. <TextBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="3" TextWrapping="Wrap" Text="{Binding PMAStatus}" Background="{Binding PMAStatusBackground}" Style="{StaticResource TextBox_Top}" Margin="0,0,1,0"/>
  206. <TextBox Grid.Row="1" Grid.Column="3" Visibility="Hidden" TextWrapping="Wrap" Text="{Binding PMBStatus}" Background="{Binding PMBStatusBackground}" Style="{StaticResource TextBox_Top}" Margin="0,0,1,0"/>
  207. <Grid Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="6">
  208. <Grid.ColumnDefinitions>
  209. <ColumnDefinition />
  210. <ColumnDefinition Width="Auto"/>
  211. <ColumnDefinition Width="15"/>
  212. </Grid.ColumnDefinitions>
  213. <ComboBox ItemsSource="{Binding EventLogList}" Visibility="{Binding AllEventsVisibility}"
  214. SelectedIndex="{Binding EventLogList.Count,Mode=OneWay,Converter={StaticResource collectionLastIndexConverter}}"
  215. VerticalContentAlignment="Center" FontSize="14" Height="Auto">
  216. <ComboBox.ItemTemplate>
  217. <DataTemplate>
  218. <ContentControl>
  219. <ContentControl.Style>
  220. <Style TargetType="ContentControl">
  221. <Setter Property="Background" Value="{StaticResource MessagesInformationBackgroundBrush}"/>
  222. <Setter Property="FontFamily" Value="Calibri" />
  223. <Setter Property="FontSize" Value="16" />
  224. <Style.Triggers>
  225. <DataTrigger Binding="{Binding Level}" Value="Alarm">
  226. <Setter Property="Foreground" Value="{StaticResource MessagesErrorForegroundBrush}"/>
  227. </DataTrigger>
  228. <DataTrigger Binding="{Binding Level}" Value="Warning">
  229. <Setter Property="Foreground" Value="{StaticResource MessagesWarningForegroundBrush}"/>
  230. </DataTrigger>
  231. <DataTrigger Binding="{Binding Level}" Value="Information">
  232. <Setter Property="Foreground" Value="{StaticResource MessagesInformationForegroundBrush}"/>
  233. </DataTrigger>
  234. </Style.Triggers>
  235. </Style>
  236. </ContentControl.Style>
  237. <Grid>
  238. <Grid.ColumnDefinitions>
  239. <ColumnDefinition Width="120"/>
  240. <ColumnDefinition Width="*"/>
  241. </Grid.ColumnDefinitions>
  242. <TextBlock Grid.Column="0" Text="{Binding OccuringTime, Converter={StaticResource dateTimeToTextConverter}}" />
  243. <TextBlock Grid.Column="1" Text="{Binding Description}" />
  244. </Grid>
  245. </ContentControl>
  246. </DataTemplate>
  247. </ComboBox.ItemTemplate>
  248. </ComboBox>
  249. <ComboBox ItemsSource="{Binding WarnEventLogList}" Visibility="{Binding WarnEventsVisibility}"
  250. SelectedIndex="{Binding EventLogList.Count,Mode=OneWay,Converter={StaticResource collectionLastIndexConverter}}"
  251. VerticalContentAlignment="Center" FontSize="14" Height="Auto">
  252. <ComboBox.ItemTemplate>
  253. <DataTemplate>
  254. <ContentControl>
  255. <ContentControl.Style>
  256. <Style TargetType="ContentControl">
  257. <Setter Property="Background" Value="{StaticResource MessagesInformationBackgroundBrush}"/>
  258. <Setter Property="FontFamily" Value="Calibri" />
  259. <Setter Property="FontSize" Value="16" />
  260. <Style.Triggers>
  261. <DataTrigger Binding="{Binding Level}" Value="Alarm">
  262. <Setter Property="Foreground" Value="{StaticResource MessagesErrorForegroundBrush}"/>
  263. </DataTrigger>
  264. <DataTrigger Binding="{Binding Level}" Value="Warning">
  265. <Setter Property="Foreground" Value="{StaticResource MessagesWarningForegroundBrush}"/>
  266. </DataTrigger>
  267. <DataTrigger Binding="{Binding Level}" Value="Information">
  268. <Setter Property="Foreground" Value="{StaticResource MessagesInformationForegroundBrush}"/>
  269. </DataTrigger>
  270. </Style.Triggers>
  271. </Style>
  272. </ContentControl.Style>
  273. <Grid>
  274. <Grid.ColumnDefinitions>
  275. <ColumnDefinition Width="120"/>
  276. <ColumnDefinition Width="*"/>
  277. </Grid.ColumnDefinitions>
  278. <TextBlock Grid.Column="0" Text="{Binding OccuringTime, Converter={StaticResource dateTimeToTextConverter}}" />
  279. <TextBlock Grid.Column="1" Text="{Binding Description}" />
  280. </Grid>
  281. </ContentControl>
  282. </DataTemplate>
  283. </ComboBox.ItemTemplate>
  284. </ComboBox>
  285. <Border Grid.Column="1" BorderThickness="1" SnapsToDevicePixels="true" BorderBrush="{DynamicResource ComboBox_BD}" Background="{DynamicResource ComboBox_BG}">
  286. <Border x:Name="InnerBD_Shadow" BorderBrush="{DynamicResource ComboBox_BD_InnerShadow}" BorderThickness="1,1,0,0" Padding="5,1">
  287. <CheckBox Content="Alarm" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource FG_Black}" FontFamily="Arial" FontSize="16">
  288. <i:Interaction.Triggers>
  289. <i:EventTrigger EventName="Checked">
  290. <cal:ActionMessage MethodName="ShowAlarmEvents">
  291. </cal:ActionMessage>
  292. </i:EventTrigger>
  293. <i:EventTrigger EventName="Unchecked">
  294. <cal:ActionMessage MethodName="ShowAllEvents">
  295. </cal:ActionMessage>
  296. </i:EventTrigger>
  297. </i:Interaction.Triggers>
  298. </CheckBox>
  299. </Border>
  300. </Border>
  301. <Border Grid.Column="2" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="0,1,0,0" CornerRadius="0,0,6,0" Background="{DynamicResource TopFrame_TableBG}">
  302. <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" CornerRadius="0,0,5,0" Padding="5,2"/>
  303. </Border>
  304. </Grid>
  305. <StackPanel Grid.Column="7" Grid.RowSpan="3" VerticalAlignment="Center">
  306. <Grid Margin="5,0,0,0">
  307. <Grid.ColumnDefinitions>
  308. <ColumnDefinition />
  309. <ColumnDefinition />
  310. </Grid.ColumnDefinitions>
  311. <Button Content="FA Enable" Height="35"/>
  312. <Button Grid.Column="1" Content="FA Disable" Margin="5,0,0,0" Height="35"/>
  313. </Grid>
  314. <Grid Margin="5,5,0,0">
  315. <Grid.ColumnDefinitions>
  316. <ColumnDefinition />
  317. <ColumnDefinition />
  318. </Grid.ColumnDefinitions>
  319. <Button Content="Reset" Height="35">
  320. <i:Interaction.Triggers>
  321. <i:EventTrigger EventName="Click">
  322. <cal:ActionMessage MethodName="Reset">
  323. </cal:ActionMessage>
  324. </i:EventTrigger>
  325. </i:Interaction.Triggers>
  326. </Button>
  327. <Button Grid.Column="1" Content="Buzzer Off" Margin="5,0,0,0" Height="35">
  328. <i:Interaction.Triggers>
  329. <i:EventTrigger EventName="Click">
  330. <cal:ActionMessage MethodName="BuzzerOff">
  331. </cal:ActionMessage>
  332. </i:EventTrigger>
  333. </i:Interaction.Triggers>
  334. </Button>
  335. </Grid>
  336. </StackPanel>
  337. </Grid>
  338. <StackPanel Orientation="Horizontal" Grid.Column="2" Margin="10,8">
  339. <Border Width="50" BorderThickness="1,1,0,0" BorderBrush="#FF0A1624" Background="#FF396293" CornerRadius="6">
  340. <Viewbox Width="45" Height="80" >
  341. <deviceControl:AITSignalTower Width="45" Height="110" DeviceData="{Binding SignalTowerData}"></deviceControl:AITSignalTower>
  342. </Viewbox>
  343. </Border>
  344. <Grid Margin="10,0,0,0">
  345. <Grid.RowDefinitions>
  346. <RowDefinition Height="Auto"/>
  347. <RowDefinition />
  348. </Grid.RowDefinitions>
  349. <Grid>
  350. <Grid.RowDefinitions>
  351. <RowDefinition Height="24"/>
  352. <RowDefinition Height="24"/>
  353. </Grid.RowDefinitions>
  354. <Grid.ColumnDefinitions>
  355. <ColumnDefinition Width="40"/>
  356. <ColumnDefinition Width="60"/>
  357. </Grid.ColumnDefinitions>
  358. <Border BorderBrush="{DynamicResource Table_BD}" CornerRadius="5,0,0,0" BorderThickness="1" Background="{DynamicResource Table_BG_FirstTitle}" Padding="5,1">
  359. <TextBlock TextWrapping="NoWrap" Text="User" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="12"/>
  360. </Border>
  361. <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">
  362. <TextBlock TextWrapping="NoWrap" Text="Admin" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{DynamicResource FG_Black}" FontFamily="Arial" FontSize="12"/>
  363. </Border>
  364. <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">
  365. <TextBlock TextWrapping="NoWrap" Text="Role" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="12"/>
  366. </Border>
  367. <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">
  368. <TextBlock TextWrapping="NoWrap" Text="Manager" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{DynamicResource FG_Black}" FontFamily="Arial" FontSize="12"/>
  369. </Border>
  370. </Grid>
  371. <Button Grid.Row="1" Width="100" Content="Logout" FontSize="16" Margin="0,5,0,0">
  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. </StackPanel>
  381. </Grid>
  382. </Grid>
  383. <Grid Grid.Row="1" Background="{DynamicResource ContentFrame_BG}">
  384. <ContentControl x:Name="ActiveItem" cal:View.Context="{Binding Context}" cal:View.Model="{Binding ActiveItem}" Margin="0">
  385. </ContentControl>
  386. </Grid>
  387. <Border x:Name="Sub_Menu_Bar" Grid.Row="2">
  388. <Menu ItemsSource="{Binding Path=SubMenuItems}" Grid.Row="0" Background="{x:Null}" Margin="3,0,0,0">
  389. <Menu.ItemTemplate>
  390. <DataTemplate>
  391. <TextBlock Margin="1" Text="{Binding Path=ResKey}"/>
  392. </DataTemplate>
  393. </Menu.ItemTemplate>
  394. <Menu.ItemContainerStyle>
  395. <Style TargetType="MenuItem">
  396. <Setter Property="Command" Value="{Binding DataContext.MenuItemClickCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"/>
  397. <Setter Property="CommandParameter" Value="{ Binding }"/>
  398. <Setter Property="Background" Value="Transparent"/>
  399. <Setter Property="Foreground" Value="{DynamicResource SubMenu_FG}"/>
  400. <Setter Property="FontFamily" Value="Arial"/>
  401. <Setter Property="MinWidth" Value="100"/>
  402. <Setter Property="Height" Value="35"/>
  403. <Setter Property="FontSize" Value="14"/>
  404. <Setter Property="FontWeight" Value="bold"/>
  405. <Setter Property="Template">
  406. <Setter.Value>
  407. <ControlTemplate TargetType="{x:Type MenuItem}">
  408. <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">
  409. <Border x:Name="InnerBD" BorderBrush="{DynamicResource SubMenu_BD_Highlight}" BorderThickness="2,0,0,0" CornerRadius="0,0,4,4">
  410. <ContentPresenter x:Name="contentPresenter" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="6,0" Cursor="Hand" ContentSource="Header" RecognizesAccessKey="True" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  411. </Border>
  412. </Border>
  413. <ControlTemplate.Triggers>
  414. <DataTrigger Binding="{Binding Selected}" Value="True">
  415. <Setter Property="Background" TargetName="BG" Value="{DynamicResource SubMenu_BG_Select}"/>
  416. <Setter Property="BorderBrush" TargetName="BG" Value="{DynamicResource SubMenu_BD_Shadow_Select}"/>
  417. <Setter Property="BorderBrush" TargetName="InnerBD" Value="{DynamicResource SubMenu_BD_Highlight}"/>
  418. <Setter Property="Foreground" Value="{DynamicResource SubMenu_FG_Select}"/>
  419. <Setter Property="FontSize" Value="16"/>
  420. <Setter Property="Effect" TargetName="contentPresenter">
  421. <Setter.Value>
  422. <DropShadowEffect BlurRadius="5" Color="White" ShadowDepth="0"/>
  423. </Setter.Value>
  424. </Setter>
  425. </DataTrigger>
  426. <Trigger Property="IsHighlighted" Value="True">
  427. <Setter Property="Background" TargetName="BG" Value="{DynamicResource SubMenu_BG_Select}"/>
  428. <Setter Property="Foreground" Value="{DynamicResource SubMenu_FG_Select}"/>
  429. </Trigger>
  430. <Trigger Property="IsEnabled" Value="false">
  431. <Setter Property="Foreground" Value="#FF9A9A9A"/>
  432. </Trigger>
  433. </ControlTemplate.Triggers>
  434. </ControlTemplate>
  435. </Setter.Value>
  436. </Setter>
  437. </Style>
  438. </Menu.ItemContainerStyle>
  439. </Menu>
  440. </Border>
  441. <Border x:Name="Bottom_Frame" Grid.Row="3" Background="{DynamicResource BottomFrame_BG}">
  442. <Border BorderBrush="{DynamicResource BottomFrame_BD}" BorderThickness="0,0,0,1">
  443. <Menu ItemsSource="{Binding Path=MenuItems}" Grid.Row="0" Background="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="7,0">
  444. <Menu.ItemTemplate>
  445. <DataTemplate>
  446. <TextBlock Margin="1" Text="{Binding Path=ResKey}"/>
  447. </DataTemplate>
  448. </Menu.ItemTemplate>
  449. <Menu.ItemContainerStyle>
  450. <Style TargetType="MenuItem">
  451. <Setter Property="Command" Value="{Binding DataContext.MainMenuItemClickCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"/>
  452. <Setter Property="CommandParameter" Value="{ Binding }"/>
  453. <!--<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  454. <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>-->
  455. <Setter Property="Background" Value="Transparent"/>
  456. <Setter Property="FontSize" Value="16"/>
  457. <Setter Property="FontWeight" Value="Bold"/>
  458. <Setter Property="Margin" Value="10,0,0,0"/>
  459. <Setter Property="Width" Value="140"/>
  460. <Setter Property="Height" Value="50"/>
  461. <Setter Property="Template" Value="{DynamicResource SubMunu_ShowOnTop}"/>
  462. </Style>
  463. </Menu.ItemContainerStyle>
  464. </Menu>
  465. </Border>
  466. </Border>
  467. <Grid.Style>
  468. <Style>
  469. <Style.Triggers>
  470. <DataTrigger Binding="{Binding IsLogin}" Value="False">
  471. <Setter Property="Grid.Visibility" Value="Collapsed"></Setter>
  472. </DataTrigger>
  473. </Style.Triggers>
  474. </Style>
  475. </Grid.Style>
  476. </Grid>
  477. </Grid>
  478. </wnd:CustomWnd>