123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188 |
- <UserControl x:Class="MECF.Framework.UI.Client.CenterViews.Alarms.ModuleAlarm.ModuleAlarmView"
- 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:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- xmlns:alarm="clr-namespace:MECF.Framework.UI.Client.CenterViews.Alarms.Alarm"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
- xmlns:micro="clr-namespace:Caliburn.Micro"
- xmlns:moduleAlarm="clr-namespace:MECF.Framework.UI.Client.CenterViews.Alarms.ModuleAlarm"
- mc:Ignorable="d"
- d:DesignHeight="625" d:DesignWidth="1200">
- <UserControl.Resources>
- <moduleAlarm:TypeColorConverter x:Key="TypeColorConverter"/>
- <Style x:Key="localListBoxItem" TargetType="{x:Type xctk:SelectorItem}">
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Margin" Value="0,0,20,0"/>
- <Setter Property="Padding" Value="0"/>
- <Setter Property="BorderThickness" Value="0"/>
- </Style>
- </UserControl.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="40"/>
- <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="40">
- <TextBlock Text="Modules:" 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="60" Height="40">
- <CheckBox Content="All" IsChecked="{Binding IsAllSelected,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
- HorizontalContentAlignment="Stretch"
- VerticalContentAlignment="Center"
- FontSize="14"
- Command="{Binding SelectAllChanged}"
- VerticalAlignment="Center">
- </CheckBox>
- </Border>
- <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1" Width="800" Height="40">
- <xctk:CheckListBox ItemsSource="{Binding AllModules}"
- DisplayMemberPath="ModuleName"
- SelectedMemberPath="IsSelected"
- HorizontalContentAlignment="Stretch"
- VerticalContentAlignment="Center"
- BorderThickness="0"
- FontSize="14"
- Command="{Binding SelectionChanged}"
- ItemContainerStyle="{DynamicResource localListBoxItem}"
- VerticalAlignment="Center"
- SelectedItemsOverride="{Binding SelectedModules,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" >
- <xctk:CheckListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel IsItemsHost="True" Orientation="Horizontal" Margin="1,1,0,0"/>
- </ItemsPanelTemplate>
- </xctk:CheckListBox.ItemsPanel>
- </xctk:CheckListBox>
- </Border>
- </StackPanel>
- <DataGrid Grid.Row="1" Margin="0,5,0,0"
- Width="Auto"
- ScrollViewer.CanContentScroll="True"
- ScrollViewer.VerticalScrollBarVisibility="Auto"
- ScrollViewer.HorizontalScrollBarVisibility="Auto"
- HorizontalAlignment="Left"
- AutoGenerateColumns="False" ItemsSource="{Binding FilteredAlarms}"
- CanUserReorderColumns="False" CanUserAddRows="False"
- CanUserSortColumns="False"
- IsReadOnly="True" FontSize="14">
- <DataGrid.Columns>
- <DataGridTemplateColumn Header="Type" Width="90" CanUserSort="True" SortMemberPath="Type">
- <DataGridTemplateColumn.HeaderTemplate >
- <DataTemplate>
- <TextBlock Text="Type" />
- </DataTemplate>
- </DataGridTemplateColumn.HeaderTemplate>
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Label Content="{Binding Type}" Background="{Binding Type, Converter={StaticResource TypeColorConverter}}" FontSize="12"/>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTextColumn Header="Time" Width="150" CanUserSort="True" IsReadOnly="True" Binding="{Binding OccuringTime,Mode=OneWay}">
- <DataGridTextColumn.HeaderTemplate >
- <DataTemplate>
- <TextBlock Text="Time" />
- </DataTemplate>
- </DataGridTextColumn.HeaderTemplate>
- </DataGridTextColumn>
- <DataGridTextColumn Header="Source" Width="150" CanUserSort="True" IsReadOnly="True" Binding="{Binding Source,Mode=OneWay}">
- <DataGridTextColumn.HeaderTemplate >
- <DataTemplate>
- <TextBlock Text="Source" />
- </DataTemplate>
- </DataGridTextColumn.HeaderTemplate>
- </DataGridTextColumn>
- <DataGridTemplateColumn Header="Description" Width="*" CanUserSort="True" SortMemberPath="Description">
- <DataGridTemplateColumn.HeaderTemplate >
- <DataTemplate>
- <TextBlock Text="Description" />
- </DataTemplate>
- </DataGridTemplateColumn.HeaderTemplate>
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Description}" TextWrapping="Wrap" FontSize="12"/>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Width="110">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Button Content="Reset" Width="100" Height="25" FontSize="14">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <micro:ActionMessage MethodName="ResetAlarm">
- <micro:Parameter Value="{Binding }" />
- </micro:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </DataGrid>
- </Grid>
- <!--<GroupBox Header="Alarm List" Margin="5,0,12,5">
- <DataGrid Grid.Row="1" Margin="0,5,0,0"
- Width="Auto"
-
- ScrollViewer.CanContentScroll="True"
- ScrollViewer.VerticalScrollBarVisibility="Auto"
- ScrollViewer.HorizontalScrollBarVisibility="Auto"
- HorizontalAlignment="Left"
- AutoGenerateColumns="False" Name="dataGrid1" ItemsSource="{Binding AlarmEvents,Mode=OneWay}"
- FontFamily="Arial,SimSun"
- CanUserReorderColumns="False" CanUserAddRows="False"
- CanUserSortColumns="False"
- IsReadOnly="True" FontSize="14">
- <DataGrid.Columns>
- <DataGridTemplateColumn Header="Type" Width="90" CanUserSort="True" SortMemberPath="Type">
- <DataGridTemplateColumn.HeaderTemplate >
- <DataTemplate>
- <TextBlock Text="Type" />
- </DataTemplate>
- </DataGridTemplateColumn.HeaderTemplate>
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Label Content="{Binding Type}" Background="{Binding TextColor}" FontSize="12"/>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTextColumn Header="Time" Width="150" CanUserSort="True" IsReadOnly="True" Binding="{Binding OccuringTime,Mode=OneWay}">
- <DataGridTextColumn.HeaderTemplate >
- <DataTemplate>
- <TextBlock Text="Time" />
- </DataTemplate>
- </DataGridTextColumn.HeaderTemplate>
- </DataGridTextColumn>
- <DataGridTextColumn Header="Description" Width="*" CanUserSort="True" IsReadOnly="True" Binding="{Binding Description,Mode=OneWay}">
- <DataGridTextColumn.HeaderTemplate >
- <DataTemplate>
- <TextBlock Text="Description" />
- </DataTemplate>
- </DataGridTextColumn.HeaderTemplate>
- </DataGridTextColumn>
- </DataGrid.Columns>
- </DataGrid>
- </GroupBox>-->
- <!--<GroupBox Grid.Column="1" Header="Detail" Margin="0,0,5,5">
- <TextBlock x:Name="AnalysisText" FontSize="14" Margin="5" Background="White" TextWrapping="Wrap" Style="{x:Null}"/>
- </GroupBox>-->
- </UserControl>
|