123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- <Window x:Class="NEIntelligentControl2.Windows.Alarm.RealTimeAlarmWindow"
- 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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:NEIntelligentControl2.Windows"
- xmlns:alarm="clr-namespace:NEIntelligentControl2.Views.Alarm"
- xmlns:ib="clr-namespace:NEIntelligentControl2.Views.Basic"
- mc:Ignorable="d"
- Title="实时报警" Height="662" Width="1200" Background="#FFE3E3E3" WindowStyle="None" WindowStartupLocation="CenterOwner" Loaded="Window_Loaded">
- <WindowChrome.WindowChrome>
- <WindowChrome/>
- </WindowChrome.WindowChrome>
- <Window.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/Res/Alarm.xaml"/>
- </ResourceDictionary.MergedDictionaries>
- <Style x:Key="TagStackPanelStyle" TargetType="StackPanel">
- <Setter Property="Orientation" Value="Horizontal"/>
- <Setter Property="Margin" Value="10"/>
- </Style>
- <Style x:Key="TagTextBlockStyle" TargetType="TextBlock">
- <Setter Property="VerticalAlignment" Value="Center"/>
- </Style>
- <Style x:Key="TagComboBoxStyle" TargetType="ComboBox">
- <Setter Property="MinWidth" Value="100"/>
- </Style>
- <Style x:Key="TagTextBoxStyle" TargetType="TextBox">
- <Setter Property="MinWidth" Value="120"/>
- </Style>
- <Style TargetType="{x:Type ScrollBar}">
- <Setter Property="Background" Value="#77F0F8FF"/>
- <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
- <Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
- <!--滚动条宽度-->
- <Setter Property="Width" Value="8"/>
- <Setter Property="MinWidth" Value="6"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ScrollBar}">
- <!--滚动条背景色-->
- <Grid x:Name="Bg" Background="#77DDDDDD" SnapsToDevicePixels="true" Width="8">
- <Grid.RowDefinitions>
- <RowDefinition />
- </Grid.RowDefinitions>
- <Track x:Name="PART_Track" IsDirectionReversed="true" IsEnabled="{TemplateBinding IsMouseOver}">
- <Track.DecreaseRepeatButton>
- <RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource VerticalScrollBarPageButton}"/>
- </Track.DecreaseRepeatButton>
- <Track.IncreaseRepeatButton>
- <RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource VerticalScrollBarPageButton}"/>
- </Track.IncreaseRepeatButton>
- <Track.Thumb>
- <Thumb Style="{StaticResource ScrollBarThumb}"/>
- </Track.Thumb>
- </Track>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Background" TargetName="Bg" Value="{StaticResource ScrollBarDisabledBackground}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="Orientation" Value="Horizontal">
- <Setter Property="Width" Value="Auto"/>
- <Setter Property="MinWidth" Value="0"/>
- <Setter Property="Height" Value="6"/>
- <Setter Property="MinHeight" Value="6"/>
- <Setter Property="Background" Value="#77F0F8FF"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ScrollBar}">
- <Grid x:Name="Bg" Background="#77DDDDDD" SnapsToDevicePixels="true">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Track x:Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}">
- <Track.DecreaseRepeatButton>
- <RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}" Style="{StaticResource HorizontalScrollBarPageButton}"/>
- </Track.DecreaseRepeatButton>
- <Track.IncreaseRepeatButton>
- <RepeatButton Command="{x:Static ScrollBar.PageRightCommand}" Style="{StaticResource HorizontalScrollBarPageButton}"/>
- </Track.IncreaseRepeatButton>
- <Track.Thumb>
- <Thumb Style="{StaticResource ScrollBarThumb}" />
- </Track.Thumb>
- </Track>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Background" TargetName="Bg" Value="{StaticResource ScrollBarDisabledBackground}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Trigger>
- </Style.Triggers>
- </Style>
- </ResourceDictionary>
- </Window.Resources>
- <Grid Margin="5">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <Border Background="#FF3A4E66" CornerRadius="9,0,0,0">
- <Grid Margin="0,10">
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
- <ContentControl Template="{StaticResource title_icon}" Width="24" Height="24" Margin="5,5,0,5"/>
- <TextBlock x:Name="_TBTitle" Text="实时报警查询" FontSize="16" Foreground="WhiteSmoke" Margin="5"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
- <ContentControl Width="24" Height="24" Margin="5" MouseLeftButtonUp="ContentControl_MouseLeftButtonUp" Tag="maximized" ToolTip="最大最小化" WindowChrome.IsHitTestVisibleInChrome="True">
- <ContentControl.Style>
- <Style TargetType="ContentControl">
- <Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=WindowState}" Value="Maximized">
- <Setter Property="Template" Value="{StaticResource unmaximize}"/>
- </DataTrigger>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=WindowState}" Value="Normal">
- <Setter Property="Template" Value="{StaticResource maximize}"/>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ContentControl.Style>
- </ContentControl>
- <ContentControl Width="24" Height="24" Template="{StaticResource close}" Background="WhiteSmoke" Margin="5" MouseLeftButtonUp="ContentControl_MouseLeftButtonUp" Tag="close" ToolTip="关闭" WindowChrome.IsHitTestVisibleInChrome="True"/>
- </StackPanel>
- </Grid>
- </Border>
-
- <WrapPanel Grid.Row="1" Background="#FFDDE6EF">
- <StackPanel Style="{StaticResource TagStackPanelStyle}">
- <TextBlock Text="场站:" Style="{StaticResource TagTextBlockStyle}"/>
- <ComboBox x:Name="_CBStation" DisplayMemberPath="FullName" Style="{StaticResource TagComboBoxStyle}" SelectionChanged="_CBStation_SelectionChanged" SelectedIndex="0"/>
- </StackPanel>
- <StackPanel Style="{StaticResource TagStackPanelStyle}">
- <TextBlock Text="级别:" Style="{StaticResource TagTextBlockStyle}"/>
- <ComboBox x:Name="_CBClass" DisplayMemberPath="Name" Style="{StaticResource TagComboBoxStyle}" SelectedIndex="0" SelectionChanged="_CBClass_SelectionChanged"/>
- </StackPanel>
- <StackPanel Style="{StaticResource TagStackPanelStyle}">
- <TextBlock Text="类型:" Style="{StaticResource TagTextBlockStyle}"/>
- <ComboBox x:Name="_CBType" DisplayMemberPath="Name" Style="{StaticResource TagComboBoxStyle}" SelectedIndex="0" SelectionChanged="_CBType_SelectionChanged"/>
- </StackPanel>
- <StackPanel Style="{StaticResource TagStackPanelStyle}">
- <TextBlock Text="子类型:" Style="{StaticResource TagTextBlockStyle}"/>
- <ComboBox x:Name="_CBSType" Style="{StaticResource TagComboBoxStyle}" DisplayMemberPath="Name" SelectionChanged="_CBSType_SelectionChanged"/>
- </StackPanel>
- <StackPanel Style="{StaticResource TagStackPanelStyle}">
- <TextBlock Text="风机:" Style="{StaticResource TagTextBlockStyle}"/>
- <ComboBox x:Name="_CBWindturbine" Style="{StaticResource TagComboBoxStyle}" SelectionChanged="_CBWindturbine_SelectionChanged"/>
- </StackPanel>
- <StackPanel Style="{StaticResource TagStackPanelStyle}">
- <TextBlock Text="关键字:" Style="{StaticResource TagTextBlockStyle}"/>
- <TextBox x:Name="_CBKeyString" Style="{StaticResource TagTextBoxStyle}" LostFocus="_CBKeyString_LostFocus"/>
- </StackPanel>
- <Button Content="开始查询" VerticalAlignment="Center" Margin="10" Padding="12,3" Click="Button_Click" Tag="search" Style="{StaticResource ConfirmButtonStyle}"/>
- </WrapPanel>
- <DataGrid x:Name="_DGMain" FontSize="14" ColumnWidth="*" Grid.Row="2" Background="#FFABABAB" IsReadOnly="True" AutoGenerateColumns="False" HorizontalGridLinesBrush="#FF9E9E9E" VerticalGridLinesBrush="#FF9E9E9E">
- <DataGrid.Columns>
- <DataGridTextColumn Header="时间" Binding="{Binding LatestUpdateTimeString}" Width="150"/>
- <DataGridTextColumn Header="设备" Binding="{Binding ObjectName}"/>
- <DataGridTextColumn Header="报警信息" Binding="{Binding AlertText}" MinWidth="300"/>
- <DataGridTextColumn Header="级别" Binding="{Binding RankString}"/>
- <DataGridTextColumn Header="报警类型" Binding="{Binding Category1String}"/>
- <DataGridTextColumn Header="停机类型"/>
- <DataGridTextColumn Header="故障类型"/>
- <DataGridTextColumn Header="故障原因"/>
- </DataGrid.Columns>
- </DataGrid>
- <ib:InfoBar x:Name="_IBMain" Grid.Row="3" IsPagination="False"/>
- </Grid>
- </Window>
|