EventView.xaml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <UserControl x:Class="Aitex.Core.UI.View.Common.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:wfi ="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
  6. xmlns:wf ="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. mc:Ignorable="d"
  9. d:DesignHeight="425" d:DesignWidth="1200">
  10. <Grid>
  11. <Grid.ColumnDefinitions>
  12. <ColumnDefinition Width="240" />
  13. <ColumnDefinition Width="*" />
  14. </Grid.ColumnDefinitions>
  15. <Grid Grid.Column="0">
  16. <GroupBox Header="{DynamicResource GlobalLableEventViewQueryOption}" FontSize="15" Height="96" Name="groupBox2" Margin="3,121,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="229">
  17. <Grid>
  18. <CheckBox Content="{DynamicResource GlobalLableEventViewAlarm}" HorizontalAlignment="Left" Margin="6,12,0,0" Height="Auto" VerticalAlignment="Top" IsChecked="{Binding SearchAlarmEvent}" FontSize="14" />
  19. <CheckBox Content="{DynamicResource GlobalLableEventViewWarning}" Height="Auto" HorizontalAlignment="Left" Margin="121,12,0,0" VerticalAlignment="Top" IsChecked="{Binding SearchWarningEvent}" FontSize="14" />
  20. <CheckBox Content="{DynamicResource GlobalLableEventViewInformation}" Height="Auto" HorizontalAlignment="Left" Margin="6,38,0,0" VerticalAlignment="Top" IsChecked="{Binding SearchInfoEvent}" FontSize="14" />
  21. <!--<CheckBox Content="Operation" Height="Auto" HorizontalAlignment="Left" Margin="121,38,0,0" VerticalAlignment="Top" IsChecked="{Binding SearchOpeLog}" FontSize="14" />-->
  22. </Grid>
  23. </GroupBox>
  24. <GroupBox FontSize="15" Header="{DynamicResource GlobalLableEventViewExtraCondition}" Name="groupBox4" Margin="3,225,0,0" Height="100" VerticalAlignment="Top" HorizontalAlignment="Left" Width="229">
  25. <Grid>
  26. <!--<ComboBox Margin="72,17,0,0" Height="23" VerticalAlignment="Top" HorizontalAlignment="Left" Width="132" ItemsSource="{Binding EventList}" SelectedItem="{Binding SelectedEvent,UpdateSourceTrigger=PropertyChanged}" FontSize="13" />
  27. <TextBlock Text="Event" Height="16" HorizontalAlignment="Left" Margin="3,20,0,0" Name="checkBox1" Tag="ReactorA" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="14" />-->
  28. <TextBlock Text="{DynamicResource GlobalLableEventViewKeyWords}" Height="23" HorizontalAlignment="Left" Margin="3,21,0,0" Name="checkBox3" Tag="ReactorC" VerticalAlignment="Top" FontFamily="Arial,SimSun" FontSize="14" />
  29. <TextBox FontSize="14" Height="22" Margin="72,21,0,0" Text="{Binding SearchKeyWords,UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Width="132" VerticalAlignment="Top" />
  30. </Grid>
  31. </GroupBox>
  32. <Button FontSize="15" Canvas.Left="26" Canvas.Top="503" Margin="38,352,102,0" Height="29" VerticalAlignment="Top" FontFamily="Arial,SimSun" Click="Button_Click" Content="{DynamicResource GlobalLableEventViewButtonQuery}"/>
  33. <Button FontSize="15" Canvas.Left="26" Canvas.Top="503" Margin="38,386,102,0" Height="29" VerticalAlignment="Top" FontFamily="Arial,SimSun" Command="{Binding ExportCommand}" Content="{DynamicResource GlobalLableEventViewButtonExport}"/>
  34. <Label Style="{StaticResource MiddleLabel}" Height="30" Width="126" FontSize="14" Canvas.Left="-6" Canvas.Top="3" Content="{DynamicResource GlobalLableEventViewQueryCondition}" Margin="54,5,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" FontFamily="Arial,SimSun"></Label>
  35. <Label Style="{StaticResource MiddleLabel}" Height="28" Name="label4" Width="76" FontSize="14" Canvas.Left="-6" Canvas.Top="3" Content="{DynamicResource GlobalLableEventViewStartTime}" Margin="9,46,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" FontFamily="Arial,SimSun"></Label>
  36. <Label Style="{StaticResource MiddleLabel}" Height="28" Name="label5" Width="76" FontSize="14" Canvas.Left="-6" Canvas.Top="26" Content="{DynamicResource GlobalLableEventViewEndTime}" Margin="8,80,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" FontFamily="Arial,SimSun"></Label>
  37. <wfi:WindowsFormsHost Height="25" FontSize="13" FontFamily="Arial,SimSun" Margin="81,80,0,0" HorizontalAlignment="Left" Width="145" VerticalAlignment="Top">
  38. <wf:DateTimePicker x:Name="wfTimeTo" Value="2013-8-1" CustomFormat="yyyy/MM/dd HH:mm:ss" Format="Custom"></wf:DateTimePicker>
  39. </wfi:WindowsFormsHost>
  40. <wfi:WindowsFormsHost Height="25" FontSize="13" FontFamily="Arial,SimSun" Margin="81,47,0,0" HorizontalAlignment="Left" Width="145" VerticalAlignment="Top">
  41. <wf:DateTimePicker x:Name="wfTimeFrom" Value="2011-8-1" CustomFormat="yyyy/MM/dd HH:mm:ss" Format="Custom"></wf:DateTimePicker>
  42. </wfi:WindowsFormsHost>
  43. </Grid>
  44. <Grid Grid.Column="1">
  45. <Grid>
  46. <Grid.RowDefinitions>
  47. <RowDefinition Height="35"/>
  48. <RowDefinition Height="*"/>
  49. </Grid.RowDefinitions>
  50. <StackPanel Grid.Row="0" Width="300" HorizontalAlignment="Left" Margin="100,10,30,0" VerticalAlignment="Top" Orientation="Horizontal" >
  51. <TextBlock Height="23" Text="{DynamicResource GlobalLableEventViewResult}" VerticalAlignment="Top" />
  52. <TextBlock Height="23" TextAlignment="Center" Text="{Binding SearchedResult.Count}" Width="51" FlowDirection="RightToLeft" />
  53. <TextBlock Height="23" Text="{DynamicResource GlobalLableEventViewRecords}" />
  54. </StackPanel>
  55. <DataGrid Grid.Row="1"
  56. Margin="10"
  57. Width="900"
  58. ScrollViewer.CanContentScroll="True"
  59. ScrollViewer.VerticalScrollBarVisibility="Visible"
  60. ScrollViewer.HorizontalScrollBarVisibility="Auto"
  61. HorizontalAlignment="Left"
  62. AutoGenerateColumns="False" Name="dataGrid1" ItemsSource="{Binding SearchedResult,Mode=OneWay}"
  63. SelectionUnit="FullRow" FontFamily="Arial,SimSun"
  64. HorizontalGridLinesBrush="Gray" VerticalGridLinesBrush="#A0808080"
  65. AlternatingRowBackground="#74C7F7FF" BorderThickness="1" SelectionMode="Single"
  66. CanUserReorderColumns="False" CanUserAddRows="False" BorderBrush="#5C000000"
  67. ColumnHeaderHeight="25" ClipboardCopyMode="IncludeHeader" CanUserSortColumns="False"
  68. IsReadOnly="True" RowBackground="#FFAFD5D5" FontSize="12.5">
  69. <DataGrid.Style>
  70. <Style TargetType="ItemsControl">
  71. <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
  72. <Style.Resources>
  73. <!-- Background of selected item when focussed -->
  74. <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Blue" />
  75. </Style.Resources>
  76. </Style>
  77. </DataGrid.Style>
  78. <DataGrid.Columns>
  79. <DataGridTemplateColumn Width="30" CanUserSort="True" SortMemberPath="Icon">
  80. <DataGridTemplateColumn.CellTemplate>
  81. <DataTemplate>
  82. <Image Width="20" Height="20" HorizontalAlignment="Center" Stretch="Fill" VerticalAlignment="Center" Source="{Binding Icon}" />
  83. </DataTemplate>
  84. </DataGridTemplateColumn.CellTemplate>
  85. <DataGridTemplateColumn.CellStyle>
  86. <Style TargetType="DataGridCell">
  87. <Setter Property="ToolTip" Value="{Binding LogType}" />
  88. </Style>
  89. </DataGridTemplateColumn.CellStyle>
  90. </DataGridTemplateColumn>
  91. <DataGridTextColumn Width="70" Binding="{Binding LogType,Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False">
  92. <DataGridTextColumn.CellStyle>
  93. <Style TargetType="DataGridCell">
  94. <Setter Property="ToolTip" Value="{Binding LogType}" />
  95. </Style>
  96. </DataGridTextColumn.CellStyle>
  97. <DataGridTextColumn.HeaderTemplate >
  98. <DataTemplate>
  99. <TextBlock Text="{DynamicResource GlobalLableEventViewType}" />
  100. </DataTemplate>
  101. </DataGridTextColumn.HeaderTemplate>
  102. </DataGridTextColumn>
  103. <DataGridTextColumn Width="145" Binding="{Binding Time,Mode=OneWay}" CanUserSort="True" CanUserReorder="True" IsReadOnly="True" CanUserResize="False">
  104. <DataGridTextColumn.CellStyle>
  105. <Style TargetType="DataGridCell">
  106. <Setter Property="ToolTip" Value="{Binding Time}" />
  107. </Style>
  108. </DataGridTextColumn.CellStyle>
  109. <DataGridTextColumn.HeaderTemplate >
  110. <DataTemplate>
  111. <TextBlock Text="{DynamicResource GlobalLableEventViewTime}" />
  112. </DataTemplate>
  113. </DataGridTextColumn.HeaderTemplate>
  114. </DataGridTextColumn>
  115. <DataGridTextColumn Width="60" Binding="{Binding TargetChamber,Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False" >
  116. <DataGridTextColumn.CellStyle>
  117. <Style TargetType="DataGridCell">
  118. <Setter Property="ToolTip" Value="{Binding TargetChamber}" />
  119. </Style>
  120. </DataGridTextColumn.CellStyle>
  121. <DataGridTextColumn.HeaderTemplate >
  122. <DataTemplate>
  123. <TextBlock Text="{DynamicResource GlobalLableEventViewSystem}" />
  124. </DataTemplate>
  125. </DataGridTextColumn.HeaderTemplate>
  126. </DataGridTextColumn>
  127. <DataGridTextColumn Width="*" Binding="{Binding Detail,Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False">
  128. <DataGridTextColumn.CellStyle>
  129. <Style TargetType="DataGridCell">
  130. <Setter Property="ToolTip" Value="{Binding Detail}" />
  131. </Style>
  132. </DataGridTextColumn.CellStyle>
  133. <DataGridTextColumn.HeaderTemplate >
  134. <DataTemplate>
  135. <TextBlock Text="{DynamicResource GlobalLableEventViewContent}" />
  136. </DataTemplate>
  137. </DataGridTextColumn.HeaderTemplate>
  138. </DataGridTextColumn>
  139. </DataGrid.Columns>
  140. <DataGrid.Background>
  141. <SolidColorBrush />
  142. </DataGrid.Background>
  143. </DataGrid>
  144. </Grid>
  145. </Grid>
  146. </Grid>
  147. </UserControl>