211 lines
11 KiB
XML
211 lines
11 KiB
XML
<UserControl
|
|
x:Class="SWS.WPF.Views.DialogSignalNotice"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:CustomControl="clr-namespace:SWS.CustomControl;assembly=SWS.CustomControl"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:SWS.WPF.Views"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
|
|
Width="1000"
|
|
Height="560"
|
|
d:DesignHeight="450"
|
|
d:DesignWidth="800"
|
|
mc:Ignorable="d">
|
|
<UserControl.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="pack://application:,,,/SWS.WPF;component/Style/CustomStyles.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
<Style x:Key="trueStatusStyle" TargetType="telerik:GridViewCell">
|
|
<Setter Property="Foreground" Value="#dadbde" />
|
|
<!-- 定义触发器 -->
|
|
<Style.Triggers>
|
|
<!-- 当按钮禁用时 -->
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Background" Value="Gray" />
|
|
<Setter Property="Foreground" Value="DarkGray" />
|
|
<Setter Property="BorderBrush" Value="Gray" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
<Style x:Key="falseStatusStyle" TargetType="telerik:GridViewCell">
|
|
<Setter Property="Foreground" Value="Red" />
|
|
</Style>
|
|
<CustomControl:SignalNoticeStyleSelector x:Key="selector">
|
|
<CustomControl:SignalNoticeStyleSelector.Rules>
|
|
<CustomControl:ConditionalStyleRule Style="{StaticResource trueStatusStyle}">
|
|
<CustomControl:ConditionalStyleRule.Value>
|
|
<sys:String>True</sys:String>
|
|
</CustomControl:ConditionalStyleRule.Value>
|
|
</CustomControl:ConditionalStyleRule>
|
|
<CustomControl:ConditionalStyleRule Style="{StaticResource falseStatusStyle}">
|
|
<CustomControl:ConditionalStyleRule.Value>
|
|
<sys:String>False</sys:String>
|
|
</CustomControl:ConditionalStyleRule.Value>
|
|
</CustomControl:ConditionalStyleRule>
|
|
</CustomControl:SignalNoticeStyleSelector.Rules>
|
|
</CustomControl:SignalNoticeStyleSelector>
|
|
|
|
</ResourceDictionary>
|
|
</UserControl.Resources>
|
|
<StackPanel Background="#5d6b99">
|
|
<CustomControl:customWindowTitleBar />
|
|
<Grid Margin="6">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="9*" />
|
|
<ColumnDefinition Width="auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel>
|
|
<TextBlock Foreground="White" Text="消息列表" />
|
|
<telerik:RadGridView
|
|
Name="RadGridView2"
|
|
Grid.Row="2"
|
|
Width="auto"
|
|
Height="500"
|
|
telerik:StyleManager.Theme="Office_Blue"
|
|
AutoGenerateColumns="False"
|
|
IsFilteringAllowed="False"
|
|
IsReadOnly="False"
|
|
ItemsSource="{Binding MySignalNotices, Mode=TwoWay}"
|
|
LeftFrozenColumnCount="2"
|
|
RowIndicatorVisibility="Collapsed"
|
|
SelectedItem="{Binding SelectedSignalNotice}"
|
|
SelectionMode="Single"
|
|
ShowGroupPanel="False">
|
|
<telerik:RadGridView.Columns>
|
|
<telerik:GridViewDataColumn DataMemberBinding="{Binding ID}" Header="序号">
|
|
<telerik:GridViewDataColumn.CellStyle>
|
|
<Style TargetType="{x:Type telerik:GridViewCell}">
|
|
<Setter Property="Background" Value="#5d6b99" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
</Style>
|
|
</telerik:GridViewDataColumn.CellStyle>
|
|
|
|
</telerik:GridViewDataColumn>
|
|
<telerik:GridViewDataColumn DataMemberBinding="{Binding Group_Name}" Header="CH.NO">
|
|
<telerik:GridViewDataColumn.CellStyle>
|
|
<Style TargetType="{x:Type telerik:GridViewCell}">
|
|
<Setter Property="Background" Value="#5d6b99" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
</Style>
|
|
</telerik:GridViewDataColumn.CellStyle>
|
|
</telerik:GridViewDataColumn>
|
|
<telerik:GridViewDataColumn
|
|
CellStyleSelector="{StaticResource selector}"
|
|
DataMemberBinding="{Binding Group_Desc_EN}"
|
|
Header="英文描述"
|
|
IsReadOnlyBinding="{Binding IsReadOnly}" />
|
|
<telerik:GridViewDataColumn
|
|
CellStyleSelector="{StaticResource selector}"
|
|
DataMemberBinding="{Binding Group_Desc}"
|
|
Header="中文描述"
|
|
IsReadOnlyBinding="{Binding IsReadOnly}" />
|
|
<telerik:GridViewDataColumn
|
|
CellStyleSelector="{StaticResource selector}"
|
|
DataMemberBinding="{Binding IO_Type}"
|
|
Header="信号类型"
|
|
IsReadOnlyBinding="{Binding IsReadOnly}" />
|
|
<telerik:GridViewDataColumn
|
|
CellStyleSelector="{StaticResource selector}"
|
|
DataMemberBinding="{Binding Action}"
|
|
Header="操作"
|
|
IsReadOnlyBinding="{Binding IsReadOnly}" />
|
|
<telerik:GridViewDataColumn
|
|
CellStyleSelector="{StaticResource selector}"
|
|
DataMemberBinding="{Binding CreateUserName}"
|
|
Header="发出者"
|
|
IsReadOnlyBinding="{Binding IsReadOnly}" />
|
|
<telerik:GridViewDataColumn
|
|
CellStyleSelector="{StaticResource selector}"
|
|
DataMemberBinding="{Binding CreateTime}"
|
|
Header="操作时间"
|
|
IsReadOnlyBinding="{Binding IsReadOnly}" />
|
|
<telerik:GridViewDataColumn
|
|
CellStyleSelector="{StaticResource selector}"
|
|
DataMemberBinding="{Binding UpdateUserName}"
|
|
Header="已阅人"
|
|
IsReadOnlyBinding="{Binding IsReadOnly}" />
|
|
<telerik:GridViewDataColumn
|
|
CellStyleSelector="{StaticResource selector}"
|
|
DataMemberBinding="{Binding UpdateTime}"
|
|
Header="已阅时间"
|
|
IsReadOnlyBinding="{Binding IsReadOnly}" />
|
|
<telerik:GridViewDataColumn
|
|
CellStyleSelector="{StaticResource selector}"
|
|
DataMemberBinding="{Binding Message}"
|
|
Header="操作信息"
|
|
IsReadOnlyBinding="{Binding IsReadOnly}" />
|
|
</telerik:RadGridView.Columns>
|
|
|
|
</telerik:RadGridView>
|
|
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="1">
|
|
<telerik:RadButton
|
|
Width="80"
|
|
Margin="0,0,0,6"
|
|
HorizontalAlignment="Right"
|
|
Command="{Binding ButtonCmd}"
|
|
CommandParameter="确定"
|
|
Content="确定" />
|
|
<telerik:RadButton
|
|
Width="80"
|
|
Margin="0,0,0,6"
|
|
HorizontalAlignment="Right"
|
|
Command="{Binding ButtonCmd}"
|
|
CommandParameter="取消"
|
|
Content="取消" />
|
|
<telerik:RadButton
|
|
Width="80"
|
|
Margin="0,20,0,6"
|
|
HorizontalAlignment="Right"
|
|
Command="{Binding ButtonCmd}"
|
|
CommandParameter="已阅"
|
|
Content="已阅" />
|
|
<telerik:RadButton
|
|
Width="80"
|
|
Margin="0,0,0,6"
|
|
HorizontalAlignment="Right"
|
|
Command="{Binding ButtonCmd}"
|
|
CommandParameter="全部已阅"
|
|
Content="全部已阅" />
|
|
<GroupBox
|
|
Margin="5,120,5,5"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Bottom"
|
|
Header="显示状态">
|
|
<StackPanel>
|
|
<telerik:RadButton
|
|
Width="65"
|
|
Margin="0,0,0,5"
|
|
HorizontalAlignment="Center"
|
|
Command="{Binding StatusButtonCmd}"
|
|
CommandParameter="True"
|
|
Content="已阅" />
|
|
<telerik:RadButton
|
|
Width="65"
|
|
Margin="0,0,0,5"
|
|
HorizontalAlignment="Center"
|
|
Command="{Binding StatusButtonCmd}"
|
|
CommandParameter="False"
|
|
Content="未阅" />
|
|
<telerik:RadButton
|
|
Width="65"
|
|
Margin="0,0,0,5"
|
|
HorizontalAlignment="Center"
|
|
Command="{Binding StatusButtonCmd}"
|
|
CommandParameter="All"
|
|
Content="全部" />
|
|
</StackPanel>
|
|
</GroupBox>
|
|
</StackPanel>
|
|
</Grid>
|
|
</StackPanel>
|
|
</UserControl>
|