EventView.xaml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <UserControl x:Class="Venus_MainPages.Views.EventView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:Venus_MainPages.Views"
  7. xmlns:wfi ="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
  8. xmlns:wf ="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
  9. xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
  10. xmlns:prism="http://prismlibrary.com/"
  11. xmlns:converters="clr-namespace:Venus_Themes.Converters;assembly=Venus_Themes"
  12. xmlns:converters2="clr-namespace:Venus_MainPages.Converters"
  13. prism:ViewModelLocator.AutoWireViewModel="True"
  14. xmlns:customeControl="clr-namespace:Venus_Themes.CustomControls;assembly=Venus_Themes"
  15. mc:Ignorable="d"
  16. d:DesignHeight="1000" d:DesignWidth="1000" x:Name="eventView">
  17. <UserControl.Resources>
  18. <converters:BoolToBool x:Key="BoolToBool"/>
  19. <converters2:AllNoneCheckboxConverter x:Key="AllNoneCheckboxConverter"/>
  20. <converters:BoolToVisibility2 x:Key="BoolToVisibility2"/>
  21. <converters:BoolToVisibility4 x:Key="BoolToVisibility4"/>
  22. </UserControl.Resources>
  23. <i:Interaction.Triggers>
  24. <i:EventTrigger EventName="Loaded">
  25. <i:InvokeCommandAction Command="{Binding LoadCommand}" CommandParameter="{Binding ElementName=eventView}"/>
  26. </i:EventTrigger>
  27. </i:Interaction.Triggers>
  28. <Grid HorizontalAlignment="Left">
  29. <Grid.ColumnDefinitions>
  30. <ColumnDefinition Width="260" />
  31. <ColumnDefinition Width="*" />
  32. </Grid.ColumnDefinitions>
  33. <Grid Grid.Column="0">
  34. <Grid.RowDefinitions>
  35. <RowDefinition Height="34"/>
  36. <RowDefinition Height="24"/>
  37. <RowDefinition Height="Auto"/>
  38. <RowDefinition Height="Auto"/>
  39. <RowDefinition Height="Auto"/>
  40. <RowDefinition Height="Auto"/>
  41. <RowDefinition Height="Auto"/>
  42. <RowDefinition Height="Auto"/>
  43. </Grid.RowDefinitions>
  44. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,1,1,0" Background="{DynamicResource Table_BG_Title}">
  45. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
  46. <RadioButton Content="Manual" IsChecked="{Binding IsAuto,Converter={StaticResource BoolToBool}}" FontSize="18"/>
  47. <RadioButton Content="Auto" IsChecked="{Binding IsAuto}" FontSize="18" Margin="5,0,0,0"/>
  48. </StackPanel>
  49. </Border>
  50. <Border Grid.Row="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
  51. <TextBlock Text="Query Condition" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  52. </Border>
  53. <Border Grid.Row="2" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
  54. <StackPanel Margin="0,5">
  55. <StackPanel Orientation="Horizontal">
  56. <TextBlock Text="Start Time" Width="70" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center"/>
  57. <wfi:WindowsFormsHost Margin="5,0,0,0" FontSize="14" FontFamily="Arial" Width="170" Height="22" VerticalAlignment="Center">
  58. <wf:DateTimePicker x:Name="wfTimeFrom" Value="2011-8-1" CustomFormat="yyyy/MM/dd HH:mm:ss" Format="Custom"></wf:DateTimePicker>
  59. </wfi:WindowsFormsHost>
  60. </StackPanel>
  61. <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
  62. <TextBlock Text="End Time" Width="70" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center"/>
  63. <wfi:WindowsFormsHost Margin="5,0,0,0" FontSize="14" FontFamily="Arial" Width="170" Height="22" VerticalAlignment="Center">
  64. <wf:DateTimePicker x:Name="wfTimeTo" Value="2013-8-1" CustomFormat="yyyy/MM/dd HH:mm:ss" Format="Custom"></wf:DateTimePicker>
  65. </wfi:WindowsFormsHost>
  66. </StackPanel>
  67. </StackPanel>
  68. </Border>
  69. <Border Grid.Row="3" Margin="0,5,0,0" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Height="30">
  70. <TextBlock Text="Type Option" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  71. </Border>
  72. <Border Grid.Row="4" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
  73. <StackPanel HorizontalAlignment="Left">
  74. <CheckBox Content="All" FontSize="14" Margin="5">
  75. <CheckBox.IsChecked>
  76. <MultiBinding Converter="{StaticResource AllNoneCheckboxConverter}">
  77. <Binding ElementName="alarmCheckBox" Path="IsChecked"/>
  78. <Binding ElementName="warnCheckBox" Path="IsChecked"/>
  79. <Binding ElementName="infoCheckBox" Path="IsChecked"/>
  80. </MultiBinding>
  81. </CheckBox.IsChecked>
  82. </CheckBox>
  83. <CheckBox x:Name="alarmCheckBox" Content="Alarm" IsChecked="{Binding SearchAlarmEvent}" FontSize="14" Margin="5"/>
  84. <CheckBox x:Name="warnCheckBox" Content="Warning" IsChecked="{Binding SearchWarningEvent}" FontSize="14" Margin="5"/>
  85. <CheckBox x:Name="infoCheckBox" Content="Information" IsChecked="{Binding SearchInfoEvent}" FontSize="14" Margin="5"/>
  86. <!--<CheckBox Content="Operation" Height="Auto" IsChecked="{Binding SearchOpeLog}" FontSize="14" />-->
  87. </StackPanel>
  88. </Border>
  89. <Border Grid.Row="5" Margin="0,5,0,0" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Height="30">
  90. <TextBlock Text="Module Option" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  91. </Border>
  92. <Border Grid.Row="6" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
  93. <!--<StackPanel Orientation="Horizontal" Margin="0,5">
  94. <TextBlock Text="Key Words" Name="checkBox3" Tag="ReactorC" FontFamily="Arial" FontSize="14" VerticalAlignment="Center"/>
  95. <TextBox Margin="5,0,0,0" FontSize="14" Text="{Binding SearchKeyWords,UpdateSourceTrigger=PropertyChanged}" Width="170"/>
  96. </StackPanel>-->
  97. <StackPanel HorizontalAlignment="Left">
  98. <CheckBox Content="All" FontSize="14" Margin="5" Width="120" x:Name="allModuleCheckBox">
  99. <CheckBox.IsChecked>
  100. <MultiBinding Converter="{StaticResource AllNoneCheckboxConverter}">
  101. <Binding ElementName="SystemCheckBox" Path="IsChecked"/>
  102. <Binding ElementName="PMACheckBox" Path="IsChecked"/>
  103. <Binding ElementName="PMBCheckBox" Path="IsChecked"/>
  104. <Binding ElementName="PMCCheckBox" Path="IsChecked"/>
  105. <Binding ElementName="PMDCheckBox" Path="IsChecked"/>
  106. <Binding ElementName="LLACheckBox" Path="IsChecked"/>
  107. <Binding ElementName="LLBCheckBox" Path="IsChecked"/>
  108. <Binding ElementName="TMCheckBox" Path="IsChecked"/>
  109. <Binding ElementName="EFEMCheckBox" Path="IsChecked"/>
  110. <Binding ElementName="VCEACheckBox" Path="IsChecked"/>
  111. <Binding ElementName="VCEBCheckBox" Path="IsChecked"/>
  112. </MultiBinding>
  113. </CheckBox.IsChecked>
  114. </CheckBox>
  115. <CheckBox x:Name="SystemCheckBox" Content="System" IsChecked="{Binding SearchSystem}" FontSize="14" Margin="5" />
  116. <CheckBox x:Name="PMACheckBox" Content="PMA" IsChecked="{Binding SearchPMA}" FontSize="14" Margin="5" />
  117. <CheckBox x:Name="PMBCheckBox" Content="PMB" IsChecked="{Binding SearchPMB}" FontSize="14" Margin="5" />
  118. <CheckBox x:Name="PMCCheckBox" Content="PMC" IsChecked="{Binding SearchPMC}" FontSize="14" Margin="5" />
  119. <CheckBox x:Name="PMDCheckBox" Content="PMD" IsChecked="{Binding SearchPMD}" FontSize="14" Margin="5" />
  120. <CheckBox x:Name="TMCheckBox" Content="TM" IsChecked="{Binding SearchTM}" FontSize="14" Margin="5" />
  121. <CheckBox x:Name="LLACheckBox" Content="LLA" IsChecked="{Binding SearchLLA}" FontSize="14" Margin="5" Visibility="{Binding KeplerType,Converter={StaticResource BoolToVisibility2}}"/>
  122. <CheckBox x:Name="LLBCheckBox" Content="LLB" IsChecked="{Binding SearchLLB}" FontSize="14" Margin="5" Visibility="{Binding KeplerType,Converter={StaticResource BoolToVisibility2}}"/>
  123. <CheckBox x:Name="EFEMCheckBox" Content="EFEM" IsChecked="{Binding SearchEFEM}" FontSize="14" Margin="5" Visibility="{Binding KeplerType,Converter={StaticResource BoolToVisibility2}}"/>
  124. <CheckBox x:Name="VCEACheckBox" Content="VCEA" IsChecked="{Binding SearchVCEA}" FontSize="14" Margin="5" Visibility="{Binding KeplerType,Converter={StaticResource BoolToVisibility4}}"/>
  125. <CheckBox x:Name="VCEBCheckBox" Content="VCEB" IsChecked="{Binding SearchVCEB}" FontSize="14" Margin="5" Visibility="{Binding KeplerType,Converter={StaticResource BoolToVisibility4}}"/>
  126. </StackPanel>
  127. </Border>
  128. <StackPanel Grid.Row="7" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,20">
  129. <customeControl:PathButton Width="110" Height="33" FontFamily="Arial" Content="Query" Command="{Binding SearchCommand}" IsEnabled="{Binding IsAuto,Converter={StaticResource BoolToBool}}">
  130. <!--<i:Interaction.Triggers>
  131. <i:EventTrigger EventName="Click">
  132. <cal:ActionMessage MethodName="Search">
  133. </cal:ActionMessage>
  134. </i:EventTrigger>
  135. </i:Interaction.Triggers>-->
  136. </customeControl:PathButton>
  137. <customeControl:PathButton Width="110" Height="33" Margin="0,5,0,0" FontFamily="Arial" Content="Export" Command="{Binding ExportCommand}" IsEnabled="{Binding IsAuto,Converter={StaticResource BoolToBool}}">
  138. <!--<i:Interaction.Triggers>
  139. <i:EventTrigger EventName="Click">
  140. <cal:ActionMessage MethodName="Export">
  141. </cal:ActionMessage>
  142. </i:EventTrigger>
  143. </i:Interaction.Triggers>-->
  144. </customeControl:PathButton>
  145. </StackPanel>
  146. </Grid>
  147. <Grid Grid.Column="1" Margin="10,0,0,0">
  148. <Grid>
  149. <Grid.RowDefinitions>
  150. <RowDefinition Height="Auto"/>
  151. <RowDefinition Height="*"/>
  152. </Grid.RowDefinitions>
  153. <StackPanel Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Horizontal">
  154. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Width="70" Height="24">
  155. <TextBlock Text="Total:" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center"/>
  156. </Border>
  157. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1" Width="130" Height="24">
  158. <TextBlock Text="{Binding Total}" FlowDirection="LeftToRight" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center"/>
  159. </Border>
  160. <!--<Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Width="70" Height="24">
  161. <TextBlock Text="Records" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center"/>
  162. </Border>-->
  163. <!--<Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1" Width="150" Height="24">
  164. <TextBlock Text="" FlowDirection="LeftToRight" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center"/>
  165. </Border>-->
  166. <customeControl:Pagination Grid.Row="2" PageCount="{Binding PageCount,UpdateSourceTrigger=PropertyChanged}" Height="30" x:Name="pageControl"/>
  167. </StackPanel>
  168. <DataGrid Grid.Row="1" Margin="0,5,0,0"
  169. AlternationCount="2"
  170. ScrollViewer.CanContentScroll="True"
  171. ScrollViewer.VerticalScrollBarVisibility="Auto"
  172. ScrollViewer.HorizontalScrollBarVisibility="Auto"
  173. HorizontalAlignment="Left"
  174. AutoGenerateColumns="False" Name="dataGrid1" ItemsSource="{Binding SearchedResult,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
  175. FontFamily="Arial,SimSun"
  176. CanUserReorderColumns="False" CanUserAddRows="False"
  177. CanUserSortColumns="False"
  178. IsReadOnly="True" FontSize="14">
  179. <DataGrid.Columns>
  180. <DataGridTemplateColumn Width="40" CanUserSort="True" SortMemberPath="Icon">
  181. <DataGridTemplateColumn.CellTemplate>
  182. <DataTemplate>
  183. <Image Width="20" Height="20" HorizontalAlignment="Center" Stretch="Fill" VerticalAlignment="Center" Source="{Binding Icon}" />
  184. </DataTemplate>
  185. </DataGridTemplateColumn.CellTemplate>
  186. </DataGridTemplateColumn>
  187. <DataGridTextColumn Width="50" Binding="{Binding ID,Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False">
  188. <DataGridTextColumn.HeaderTemplate >
  189. <DataTemplate>
  190. <TextBlock Text="ID" VerticalAlignment="Center" TextAlignment="Center"/>
  191. </DataTemplate>
  192. </DataGridTextColumn.HeaderTemplate>
  193. </DataGridTextColumn>
  194. <DataGridTextColumn Width="70" Binding="{Binding LogType,Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False">
  195. <DataGridTextColumn.HeaderTemplate >
  196. <DataTemplate>
  197. <TextBlock Text="Type" VerticalAlignment="Center" TextAlignment="Center"/>
  198. </DataTemplate>
  199. </DataGridTextColumn.HeaderTemplate>
  200. </DataGridTextColumn>
  201. <DataGridTextColumn Width="170" Binding="{Binding Time,Mode=OneWay}" CanUserSort="True" CanUserReorder="True" IsReadOnly="True" CanUserResize="False">
  202. <DataGridTextColumn.HeaderTemplate >
  203. <DataTemplate>
  204. <TextBlock Text="Time" VerticalAlignment="Center" TextAlignment="Center"/>
  205. </DataTemplate>
  206. </DataGridTextColumn.HeaderTemplate>
  207. </DataGridTextColumn>
  208. <DataGridTextColumn Width="100" Binding="{Binding TargetChamber,Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False" >
  209. <DataGridTextColumn.HeaderTemplate >
  210. <DataTemplate>
  211. <TextBlock Text="Module" VerticalAlignment="Center" TextAlignment="Center"/>
  212. </DataTemplate>
  213. </DataGridTextColumn.HeaderTemplate>
  214. </DataGridTextColumn>
  215. <DataGridTextColumn Width="*" Binding="{Binding Detail,Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False">
  216. <DataGridTextColumn.HeaderTemplate >
  217. <DataTemplate>
  218. <TextBlock Text=" Content" TextWrapping="Wrap" VerticalAlignment="Center" TextAlignment="Center"/>
  219. </DataTemplate>
  220. </DataGridTextColumn.HeaderTemplate>
  221. </DataGridTextColumn>
  222. </DataGrid.Columns>
  223. </DataGrid>
  224. </Grid>
  225. </Grid>
  226. </Grid>
  227. </UserControl>