EventView.xaml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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. prism:ViewModelLocator.AutoWireViewModel="True"
  13. xmlns:customeControl="clr-namespace:Venus_Themes.CustomControls;assembly=Venus_Themes"
  14. mc:Ignorable="d"
  15. d:DesignHeight="450" d:DesignWidth="800" x:Name="eventView">
  16. <UserControl.Resources>
  17. <converters:BoolToBool x:Key="BoolToBool"/>
  18. </UserControl.Resources>
  19. <i:Interaction.Triggers>
  20. <i:EventTrigger EventName="Loaded">
  21. <i:InvokeCommandAction Command="{Binding LoadCommand}" CommandParameter="{Binding ElementName=eventView}"/>
  22. </i:EventTrigger>
  23. </i:Interaction.Triggers>
  24. <Grid HorizontalAlignment="Left">
  25. <Grid.ColumnDefinitions>
  26. <ColumnDefinition Width="260" />
  27. <ColumnDefinition Width="*" />
  28. </Grid.ColumnDefinitions>
  29. <Grid Grid.Column="0">
  30. <Grid.RowDefinitions>
  31. <RowDefinition Height="34"/>
  32. <RowDefinition Height="24"/>
  33. <RowDefinition Height="Auto"/>
  34. <RowDefinition Height="Auto"/>
  35. <RowDefinition Height="Auto"/>
  36. <RowDefinition Height="Auto"/>
  37. <RowDefinition Height="Auto"/>
  38. <RowDefinition Height="Auto"/>
  39. </Grid.RowDefinitions>
  40. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,1,1,0" Background="{DynamicResource Table_BG_Title}">
  41. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
  42. <RadioButton Content="Manual" IsChecked="{Binding IsAuto,Converter={StaticResource BoolToBool}}" FontSize="18"/>
  43. <RadioButton Content="Auto" IsChecked="{Binding IsAuto}" FontSize="18" Margin="5,0,0,0"/>
  44. </StackPanel>
  45. </Border>
  46. <Border Grid.Row="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
  47. <TextBlock Text="Query Condition" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  48. </Border>
  49. <Border Grid.Row="2" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
  50. <StackPanel Margin="0,5">
  51. <StackPanel Orientation="Horizontal">
  52. <TextBlock Text="Start Time" Width="70" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center"/>
  53. <wfi:WindowsFormsHost Margin="5,0,0,0" FontSize="14" FontFamily="Arial" Width="170" Height="22" VerticalAlignment="Center">
  54. <wf:DateTimePicker x:Name="wfTimeFrom" Value="2011-8-1" CustomFormat="yyyy/MM/dd HH:mm:ss" Format="Custom"></wf:DateTimePicker>
  55. </wfi:WindowsFormsHost>
  56. </StackPanel>
  57. <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
  58. <TextBlock Text="End Time" Width="70" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center"/>
  59. <wfi:WindowsFormsHost Margin="5,0,0,0" FontSize="14" FontFamily="Arial" Width="170" Height="22" VerticalAlignment="Center">
  60. <wf:DateTimePicker x:Name="wfTimeTo" Value="2013-8-1" CustomFormat="yyyy/MM/dd HH:mm:ss" Format="Custom"></wf:DateTimePicker>
  61. </wfi:WindowsFormsHost>
  62. </StackPanel>
  63. </StackPanel>
  64. </Border>
  65. <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">
  66. <TextBlock Text="Query Option" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  67. </Border>
  68. <Border Grid.Row="4" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
  69. <UniformGrid Columns="2" Margin="0,5">
  70. <CheckBox Content="Alarm" IsChecked="{Binding SearchAlarmEvent}" FontSize="14"/>
  71. <CheckBox Content="Warning" IsChecked="{Binding SearchWarningEvent}" FontSize="14"/>
  72. <CheckBox Content="Information" IsChecked="{Binding SearchInfoEvent}" FontSize="14"/>
  73. <!--<CheckBox Content="Operation" Height="Auto" IsChecked="{Binding SearchOpeLog}" FontSize="14" />-->
  74. </UniformGrid>
  75. </Border>
  76. <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">
  77. <TextBlock Text="Extra Condition" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  78. </Border>
  79. <Border Grid.Row="6" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
  80. <StackPanel Orientation="Horizontal" Margin="0,5">
  81. <TextBlock Text="Key Words" Name="checkBox3" Tag="ReactorC" FontFamily="Arial" FontSize="14" VerticalAlignment="Center"/>
  82. <TextBox Margin="5,0,0,0" FontSize="14" Text="{Binding SearchKeyWords,UpdateSourceTrigger=PropertyChanged}" Width="170"/>
  83. </StackPanel>
  84. </Border>
  85. <StackPanel Grid.Row="7" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,20">
  86. <customeControl:PathButton Width="110" Height="33" FontFamily="Arial" Content="Query" Command="{Binding SearchCommand}" IsEnabled="{Binding IsAuto,Converter={StaticResource BoolToBool}}">
  87. <!--<i:Interaction.Triggers>
  88. <i:EventTrigger EventName="Click">
  89. <cal:ActionMessage MethodName="Search">
  90. </cal:ActionMessage>
  91. </i:EventTrigger>
  92. </i:Interaction.Triggers>-->
  93. </customeControl:PathButton>
  94. <customeControl:PathButton Width="110" Height="33" Margin="0,5,0,0" FontFamily="Arial" Content="Export" Command="{Binding ExportCommand}" IsEnabled="{Binding IsAuto,Converter={StaticResource BoolToBool}}">
  95. <!--<i:Interaction.Triggers>
  96. <i:EventTrigger EventName="Click">
  97. <cal:ActionMessage MethodName="Export">
  98. </cal:ActionMessage>
  99. </i:EventTrigger>
  100. </i:Interaction.Triggers>-->
  101. </customeControl:PathButton>
  102. </StackPanel>
  103. </Grid>
  104. <Grid Grid.Column="1" Margin="10,0,0,0">
  105. <Grid>
  106. <Grid.RowDefinitions>
  107. <RowDefinition Height="Auto"/>
  108. <RowDefinition Height="*"/>
  109. </Grid.RowDefinitions>
  110. <StackPanel Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Horizontal">
  111. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Width="70" Height="24">
  112. <TextBlock Text="Total:" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center"/>
  113. </Border>
  114. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1" Width="130" Height="24">
  115. <TextBlock Text="{Binding Total}" FlowDirection="LeftToRight" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center"/>
  116. </Border>
  117. <!--<Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Width="70" Height="24">
  118. <TextBlock Text="Records" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center"/>
  119. </Border>-->
  120. <!--<Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1" Width="150" Height="24">
  121. <TextBlock Text="" FlowDirection="LeftToRight" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center"/>
  122. </Border>-->
  123. <customeControl:Pagination Grid.Row="2" PageCount="{Binding PageCount,UpdateSourceTrigger=PropertyChanged}" Height="30" x:Name="pageControl"/>
  124. </StackPanel>
  125. <DataGrid Grid.Row="1" Margin="0,5,0,0"
  126. AlternationCount="2"
  127. ScrollViewer.CanContentScroll="True"
  128. ScrollViewer.VerticalScrollBarVisibility="Auto"
  129. ScrollViewer.HorizontalScrollBarVisibility="Auto"
  130. HorizontalAlignment="Left"
  131. AutoGenerateColumns="False" Name="dataGrid1" ItemsSource="{Binding SearchedResult,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
  132. FontFamily="Arial,SimSun"
  133. CanUserReorderColumns="False" CanUserAddRows="False"
  134. CanUserSortColumns="False"
  135. IsReadOnly="True" FontSize="14">
  136. <DataGrid.Columns>
  137. <DataGridTemplateColumn Width="40" CanUserSort="True" SortMemberPath="Icon">
  138. <DataGridTemplateColumn.CellTemplate>
  139. <DataTemplate>
  140. <Image Width="20" Height="20" HorizontalAlignment="Center" Stretch="Fill" VerticalAlignment="Center" Source="{Binding Icon}" />
  141. </DataTemplate>
  142. </DataGridTemplateColumn.CellTemplate>
  143. </DataGridTemplateColumn>
  144. <DataGridTextColumn Width="50" Binding="{Binding ID,Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False">
  145. <DataGridTextColumn.HeaderTemplate >
  146. <DataTemplate>
  147. <TextBlock Text="ID" VerticalAlignment="Center" TextAlignment="Center"/>
  148. </DataTemplate>
  149. </DataGridTextColumn.HeaderTemplate>
  150. </DataGridTextColumn>
  151. <DataGridTextColumn Width="70" Binding="{Binding LogType,Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False">
  152. <DataGridTextColumn.HeaderTemplate >
  153. <DataTemplate>
  154. <TextBlock Text="Type" VerticalAlignment="Center" TextAlignment="Center"/>
  155. </DataTemplate>
  156. </DataGridTextColumn.HeaderTemplate>
  157. </DataGridTextColumn>
  158. <DataGridTextColumn Width="170" Binding="{Binding Time,Mode=OneWay}" CanUserSort="True" CanUserReorder="True" IsReadOnly="True" CanUserResize="False">
  159. <DataGridTextColumn.HeaderTemplate >
  160. <DataTemplate>
  161. <TextBlock Text="Time" VerticalAlignment="Center" TextAlignment="Center"/>
  162. </DataTemplate>
  163. </DataGridTextColumn.HeaderTemplate>
  164. </DataGridTextColumn>
  165. <DataGridTextColumn Width="100" Binding="{Binding TargetChamber,Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False" >
  166. <DataGridTextColumn.HeaderTemplate >
  167. <DataTemplate>
  168. <TextBlock Text="System" VerticalAlignment="Center" TextAlignment="Center"/>
  169. </DataTemplate>
  170. </DataGridTextColumn.HeaderTemplate>
  171. </DataGridTextColumn>
  172. <DataGridTextColumn Width="*" Binding="{Binding Detail,Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False">
  173. <DataGridTextColumn.HeaderTemplate >
  174. <DataTemplate>
  175. <TextBlock Text=" Content" TextWrapping="Wrap" VerticalAlignment="Center" TextAlignment="Center"/>
  176. </DataTemplate>
  177. </DataGridTextColumn.HeaderTemplate>
  178. </DataGridTextColumn>
  179. </DataGrid.Columns>
  180. </DataGrid>
  181. </Grid>
  182. </Grid>
  183. </Grid>
  184. </UserControl>