123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- <UserControl x:Class="CyberX8_MainPages.Views.EventView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:CyberX8_MainPages.Views"
- xmlns:wfi ="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
- xmlns:wf ="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
- xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
- xmlns:prism="http://prismlibrary.com/"
- xmlns:converters="clr-namespace:CyberX8_Themes.Converters;assembly=CyberX8_Themes"
- prism:ViewModelLocator.AutoWireViewModel="True"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800" x:Name="eventView">
- <UserControl.Resources>
- <converters:BoolToBool x:Key="BoolToBool"/>
- </UserControl.Resources>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Loaded">
- <i:InvokeCommandAction Command="{Binding LoadCommand}" CommandParameter="{Binding ElementName=eventView}"/>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- <Grid HorizontalAlignment="Left">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="260" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid Grid.Column="0">
- <Grid.RowDefinitions>
- <RowDefinition Height="34"/>
- <RowDefinition Height="24"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,1,1,0" Background="{DynamicResource Table_BG_Title}">
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
- <RadioButton Content="Manual" IsChecked="{Binding IsAuto,Converter={StaticResource BoolToBool}}" FontSize="18"/>
- <RadioButton Content="Auto" IsChecked="{Binding IsAuto}" FontSize="18" Margin="5,0,0,0"/>
- </StackPanel>
- </Border>
- <Border Grid.Row="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
- <TextBlock Text="Query Condition" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- <Border Grid.Row="2" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
- <StackPanel Margin="0,5">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Start Time" Width="70" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center"/>
- <wfi:WindowsFormsHost Margin="5,0,0,0" FontSize="14" FontFamily="Arial" Width="170" Height="22" VerticalAlignment="Center">
- <wf:DateTimePicker x:Name="wfTimeFrom" Value="2011-8-1" CustomFormat="yyyy/MM/dd HH:mm:ss" Format="Custom"></wf:DateTimePicker>
- </wfi:WindowsFormsHost>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
- <TextBlock Text="End Time" Width="70" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center"/>
- <wfi:WindowsFormsHost Margin="5,0,0,0" FontSize="14" FontFamily="Arial" Width="170" Height="22" VerticalAlignment="Center">
- <wf:DateTimePicker x:Name="wfTimeTo" Value="2013-8-1" CustomFormat="yyyy/MM/dd HH:mm:ss" Format="Custom"></wf:DateTimePicker>
- </wfi:WindowsFormsHost>
- </StackPanel>
- </StackPanel>
- </Border>
- <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">
- <TextBlock Text="Query Option" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- <Border Grid.Row="4" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
- <UniformGrid Columns="2" Margin="0,5">
- <CheckBox Content="Alarm" IsChecked="{Binding SearchAlarmEvent}" FontSize="14"/>
- <CheckBox Content="Warning" IsChecked="{Binding SearchWarningEvent}" FontSize="14"/>
- <CheckBox Content="Information" IsChecked="{Binding SearchInfoEvent}" FontSize="14"/>
- <!--<CheckBox Content="Operation" Height="Auto" IsChecked="{Binding SearchOpeLog}" FontSize="14" />-->
- </UniformGrid>
- </Border>
- <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">
- <TextBlock Text="Extra Condition" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- <Border Grid.Row="6" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
- <StackPanel Orientation="Horizontal" Margin="0,5">
- <TextBlock Text="Key Words" Name="checkBox3" Tag="ReactorC" FontFamily="Arial" FontSize="14" VerticalAlignment="Center"/>
- <TextBox Margin="5,0,0,0" FontSize="14" Text="{Binding SearchKeyWords,UpdateSourceTrigger=PropertyChanged}" Width="170"/>
- </StackPanel>
- </Border>
- <StackPanel Grid.Row="7" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,20">
- <Button Width="100" Height="30" FontFamily="Arial" Content="Query" Command="{Binding SearchCommand}" IsEnabled="{Binding IsAuto,Converter={StaticResource BoolToBool}}">
- <!--<i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="Search">
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>-->
- </Button>
- <Button Width="100" Height="30" Margin="0,5,0,0" FontFamily="Arial" Content="Export" Command="{Binding ExportCommand}" IsEnabled="{Binding IsAuto,Converter={StaticResource BoolToBool}}">
- <!--<i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="Export">
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>-->
- </Button>
- </StackPanel>
- </Grid>
- <Grid Grid.Column="1" Margin="10,0,0,0">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <StackPanel Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Horizontal">
- <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Width="70" Height="24">
- <TextBlock Text="Total:" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center"/>
- </Border>
- <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1" Width="130" Height="24">
- <TextBlock Text="{Binding SearchedResult.Count}" FlowDirection="LeftToRight" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center"/>
- </Border>
- <!--<Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Width="70" Height="24">
- <TextBlock Text="Records" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center"/>
- </Border>-->
- <!--<Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1" Width="150" Height="24">
- <TextBlock Text="" FlowDirection="LeftToRight" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center"/>
- </Border>-->
- </StackPanel>
- <DataGrid Grid.Row="1" Margin="0,5,0,0"
-
- AlternationCount="2"
- ScrollViewer.CanContentScroll="True"
- ScrollViewer.VerticalScrollBarVisibility="Auto"
- ScrollViewer.HorizontalScrollBarVisibility="Auto"
- HorizontalAlignment="Left"
- AutoGenerateColumns="False" Name="dataGrid1" ItemsSource="{Binding SearchedResult,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
- FontFamily="Arial,SimSun"
- CanUserReorderColumns="False" CanUserAddRows="False"
- CanUserSortColumns="False"
- IsReadOnly="True" FontSize="14">
- <DataGrid.Columns>
- <DataGridTemplateColumn Width="40" CanUserSort="True" SortMemberPath="Icon">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Image Width="20" Height="20" HorizontalAlignment="Center" Stretch="Fill" VerticalAlignment="Center" Source="{Binding Icon}" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTextColumn Width="50" Binding="{Binding ID,Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False">
- <DataGridTextColumn.HeaderTemplate >
- <DataTemplate>
- <TextBlock Text="ID" VerticalAlignment="Center" TextAlignment="Center"/>
- </DataTemplate>
- </DataGridTextColumn.HeaderTemplate>
- </DataGridTextColumn>
- <DataGridTextColumn Width="70" Binding="{Binding LogType,Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False">
- <DataGridTextColumn.HeaderTemplate >
- <DataTemplate>
- <TextBlock Text="Type" VerticalAlignment="Center" TextAlignment="Center"/>
- </DataTemplate>
- </DataGridTextColumn.HeaderTemplate>
- </DataGridTextColumn>
- <DataGridTextColumn Width="170" Binding="{Binding Time,Mode=OneWay}" CanUserSort="True" CanUserReorder="True" IsReadOnly="True" CanUserResize="False">
- <DataGridTextColumn.HeaderTemplate >
- <DataTemplate>
- <TextBlock Text="Time" VerticalAlignment="Center" TextAlignment="Center"/>
- </DataTemplate>
- </DataGridTextColumn.HeaderTemplate>
- </DataGridTextColumn>
- <DataGridTextColumn Width="100" Binding="{Binding TargetChamber,Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False" >
- <DataGridTextColumn.HeaderTemplate >
- <DataTemplate>
- <TextBlock Text="System" VerticalAlignment="Center" TextAlignment="Center"/>
- </DataTemplate>
- </DataGridTextColumn.HeaderTemplate>
- </DataGridTextColumn>
- <DataGridTextColumn Width="*" Binding="{Binding Detail,Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False">
- <DataGridTextColumn.HeaderTemplate >
- <DataTemplate>
- <TextBlock Text=" Content" TextWrapping="Wrap" VerticalAlignment="Center" TextAlignment="Center"/>
- </DataTemplate>
- </DataGridTextColumn.HeaderTemplate>
- </DataGridTextColumn>
- </DataGrid.Columns>
- </DataGrid>
- </Grid>
- </Grid>
- </Grid>
- </UserControl>
|