139 lines
6.4 KiB
XML
139 lines
6.4 KiB
XML
<UserControl
|
|
x:Class="MECF.Framework.UI.Client.CenterViews.Alarms.Alarm.AlarmView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:lex="http://wpflocalizeextension.codeplex.com"
|
|
xmlns:local="clr-namespace:MECF.Framework.UI.Client.CenterViews.Alarms.Alarm"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
d:DesignHeight="325"
|
|
d:DesignWidth="1200"
|
|
lex:LocalizeDictionary.DesignCulture="zh"
|
|
lex:ResxLocalizationProvider.DefaultAssembly="Sicentury.Localization"
|
|
lex:ResxLocalizationProvider.DefaultDictionary="lang_common"
|
|
mc:Ignorable="d">
|
|
|
|
<UserControl.Resources>
|
|
<local:EventLevelToBackgroundConverter x:Key="EventLevelToBackgroundConverter" />
|
|
</UserControl.Resources>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="7*" />
|
|
<ColumnDefinition Width="5*" />
|
|
</Grid.ColumnDefinitions>
|
|
<GroupBox Margin="5,0,12,5" Header="{lex:Loc ID_TXT_Alarm}">
|
|
<DataGrid
|
|
Name="eventList"
|
|
Margin="5"
|
|
AutoGenerateColumns="False"
|
|
Background="White"
|
|
BorderThickness="0.1"
|
|
CanUserAddRows="False"
|
|
CanUserDeleteRows="False"
|
|
FontFamily="Arial,SimSun"
|
|
FontSize="13"
|
|
IsReadOnly="True"
|
|
ItemsSource="{Binding AlarmEvents, Mode=OneWay}"
|
|
SelectionChanged="listView1_SelectionChanged"
|
|
SelectionMode="Single"
|
|
SelectionUnit="FullRow">
|
|
<DataGrid.Columns>
|
|
<DataGridTemplateColumn
|
|
Width="75"
|
|
CanUserSort="True"
|
|
Header="Type"
|
|
SortMemberPath="Type">
|
|
<DataGridTemplateColumn.HeaderTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{lex:Loc ID_TXT_Type}" />
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.HeaderTemplate>
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<Border Margin="-2" Background="{Binding Level, Converter={StaticResource EventLevelToBackgroundConverter}}">
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
FontSize="12"
|
|
Text="{Binding LevelString}" />
|
|
</Border>
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>
|
|
|
|
<!--<DataGridTemplateColumn Header="Ack" Width="40" CanUserSort="True" SortMemberPath="Type">
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<CheckBox IsChecked="{Binding IsAcknowledged, Mode=OneWay}"
|
|
IsHitTestVisible="False"/>
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>-->
|
|
|
|
<DataGridTextColumn
|
|
Width="75"
|
|
Binding="{Binding Source, Mode=OneWay}"
|
|
CanUserSort="True"
|
|
Header="{lex:Loc ID_TXT_Source}"
|
|
IsReadOnly="True">
|
|
<DataGridTextColumn.ElementStyle>
|
|
<Style TargetType="TextBlock">
|
|
<Setter Property="TextAlignment" Value="Center" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
</Style>
|
|
</DataGridTextColumn.ElementStyle>
|
|
</DataGridTextColumn>
|
|
|
|
|
|
<DataGridTextColumn
|
|
Width="150"
|
|
Binding="{Binding OccuringTime, Mode=OneWay}"
|
|
CanUserSort="True"
|
|
Header="Time"
|
|
IsReadOnly="True">
|
|
<DataGridTextColumn.HeaderTemplate>
|
|
<DataTemplate>
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Text="{lex:Loc ID_TXT_Date}"
|
|
TextAlignment="Center" />
|
|
</DataTemplate>
|
|
</DataGridTextColumn.HeaderTemplate>
|
|
<DataGridTextColumn.ElementStyle>
|
|
<Style TargetType="TextBlock">
|
|
<Setter Property="TextAlignment" Value="Left" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
</Style>
|
|
</DataGridTextColumn.ElementStyle>
|
|
</DataGridTextColumn>
|
|
|
|
<DataGridTextColumn
|
|
Width="*"
|
|
Binding="{Binding Description, Mode=OneWay}"
|
|
CanUserSort="True"
|
|
Header="Description"
|
|
IsReadOnly="True">
|
|
<DataGridTextColumn.HeaderTemplate>
|
|
<DataTemplate>
|
|
<TextBlock VerticalAlignment="Center" Text="{lex:Loc ID_TXT_Description}" />
|
|
</DataTemplate>
|
|
</DataGridTextColumn.HeaderTemplate>
|
|
</DataGridTextColumn>
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</GroupBox>
|
|
<GroupBox
|
|
Grid.Column="1"
|
|
Margin="0,0,5,5"
|
|
Header="{lex:Loc ID_TXT_Detail}">
|
|
<TextBlock
|
|
x:Name="AnalysisText"
|
|
Margin="5"
|
|
Background="White"
|
|
FontSize="14"
|
|
Style="{x:Null}"
|
|
TextWrapping="Wrap" />
|
|
</GroupBox>
|
|
</Grid>
|
|
</UserControl>
|