增加报警
This commit is contained in:
@@ -8,14 +8,14 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
Width="1920"
|
||||
Height="980"
|
||||
Height="960"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="220" />
|
||||
<RowDefinition Height="160" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<GroupBox Margin="5,10,5,10" Header="日志查询条件">
|
||||
<GroupBox Margin="3,5,3,3" Header="日志/历史报警查询">
|
||||
<StackPanel Margin="0,0,0,0" Orientation="Vertical">
|
||||
<StackPanel.Resources>
|
||||
<Style TargetType="StackPanel">
|
||||
@@ -35,23 +35,20 @@
|
||||
</StackPanel.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="9*" />
|
||||
<RowDefinition Height="3*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel
|
||||
Grid.Column="0"
|
||||
Margin="0,0,0,20"
|
||||
HorizontalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<StackPanel
|
||||
Margin="20"
|
||||
Margin="20,5"
|
||||
HorizontalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
HorizontalAlignment="Center"
|
||||
HorizontalContentAlignment="Center"
|
||||
Content="分类:" />
|
||||
Content="分类:"
|
||||
FontSize="20" />
|
||||
<DockPanel x:Name="Combbox1">
|
||||
<StackPanel>
|
||||
<!--<ComboBox Width="200" HorizontalAlignment="Left" ItemsSource="{Binding CombboxList}" SelectedItem="{Binding CombboxItem}" DisplayMemberPath="Text" SelectedValuePath="Key" ></ComboBox>-->
|
||||
@@ -59,18 +56,23 @@
|
||||
Width="120"
|
||||
materialDesign:HintAssist.Hint="分类"
|
||||
DisplayMemberPath="Text"
|
||||
FontSize="18"
|
||||
ItemsSource="{Binding CategoryComboBoxList}"
|
||||
SelectedValue="{Binding SearchCategory}"
|
||||
SelectedValuePath="Text" />
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="20">
|
||||
<Label HorizontalContentAlignment="Center" Content="创建时间:" />
|
||||
<StackPanel Margin="20,5">
|
||||
<Label
|
||||
HorizontalContentAlignment="Center"
|
||||
Content="创建时间:"
|
||||
FontSize="20" />
|
||||
<DatePicker
|
||||
Width="120"
|
||||
Margin="0,0,10,0"
|
||||
materialDesign:HintAssist.Hint="开始时间"
|
||||
FontSize="16"
|
||||
Language="zh-CN"
|
||||
SelectedDate="{Binding SearchStartDate, Mode=TwoWay}"
|
||||
Style="{StaticResource MaterialDesignFloatingHintDatePicker}" />
|
||||
@@ -78,78 +80,95 @@
|
||||
Width="120"
|
||||
Margin="10,0,10,0"
|
||||
materialDesign:HintAssist.Hint="结束时间"
|
||||
FontSize="16"
|
||||
Language="zh-CN"
|
||||
SelectedDate="{Binding SearchEndDate, Mode=TwoWay}"
|
||||
Style="{StaticResource MaterialDesignFloatingHintDatePicker}" />
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Background=" AliceBlue"
|
||||
Orientation="Horizontal">
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal">
|
||||
<Button
|
||||
Width="120"
|
||||
Height="30"
|
||||
Margin="10,10,10,10"
|
||||
HorizontalAlignment="Center"
|
||||
Background="Green"
|
||||
Command="{Binding SearchCmd}"
|
||||
Content="搜索"
|
||||
Foreground="White" />
|
||||
<Button
|
||||
Foreground="White">
|
||||
<StackPanel
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="0,0,5,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="/Assets/Fonts/#iconfont"
|
||||
FontSize="18"
|
||||
Text="" />
|
||||
<TextBlock
|
||||
Margin="0,0,5,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="18"
|
||||
Text="搜索" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<!--<Button
|
||||
Width="120"
|
||||
Height="30"
|
||||
Margin="10,10,10,10"
|
||||
HorizontalAlignment="Center"
|
||||
Background="Orange"
|
||||
Command="{Binding OutputDataCmd}"
|
||||
Content="导出数据"
|
||||
Foreground="White" />
|
||||
Foreground="White" />-->
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<Grid Grid.Row="1" Margin="8">
|
||||
<DataGrid
|
||||
x:Name="dg1"
|
||||
Grid.ColumnSpan="2"
|
||||
AutoGenerateColumns="False"
|
||||
IsReadOnly="True"
|
||||
ItemsSource="{Binding ListModelDto}"
|
||||
SelectionMode="Single"
|
||||
SelectionUnit="Cell">
|
||||
<!--<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<i:InvokeCommandAction Command="{Binding SelectedItemsCmd}" CommandParameter="{Binding ElementName=dg1}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>-->
|
||||
<DataGrid.Columns>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Margin="2"
|
||||
BorderBrush="Gray"
|
||||
BorderThickness="1"
|
||||
CornerRadius="3">
|
||||
<Grid>
|
||||
<DataGrid
|
||||
x:Name="dg1"
|
||||
VerticalAlignment="Stretch"
|
||||
AutoGenerateColumns="True"
|
||||
AutoGeneratingColumn="dg1_AutoGeneratingColumn"
|
||||
IsReadOnly="True"
|
||||
ItemsSource="{Binding ListModelDto}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
SelectionMode="Extended">
|
||||
<!--<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<i:InvokeCommandAction Command="{Binding SelectedItemsCmd}" CommandParameter="{Binding ElementName=dg1}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>-->
|
||||
<!--<DataGrid.Columns>
|
||||
|
||||
<DataGridTextColumn
|
||||
Width="100"
|
||||
Binding="{Binding Level}"
|
||||
Header="等级" />
|
||||
<DataGridTextColumn
|
||||
Width="100"
|
||||
Binding="{Binding Level}"
|
||||
Header="等级" />
|
||||
|
||||
|
||||
<DataGridTextColumn
|
||||
Width="200"
|
||||
Binding="{Binding Category}"
|
||||
Header="分类" />
|
||||
<DataGridTextColumn
|
||||
Width="200"
|
||||
Binding="{Binding Category}"
|
||||
Header="分类" />
|
||||
|
||||
<DataGridTextColumn
|
||||
Width="1200"
|
||||
Binding="{Binding Content}"
|
||||
Header="内容" />
|
||||
<DataGridTextColumn
|
||||
Width="1200"
|
||||
Binding="{Binding Content}"
|
||||
Header="内容" />
|
||||
|
||||
<DataGridTextColumn
|
||||
Width="180"
|
||||
Binding="{Binding CreateTime, StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}"
|
||||
Header="创建时间" />
|
||||
</DataGrid.Columns>-->
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<DataGridTextColumn
|
||||
Width="180"
|
||||
Binding="{Binding CreateTime, StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}"
|
||||
Header="创建时间" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Microsoft.VisualBasic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -24,5 +25,17 @@ namespace CapMachine.Wpf.Views
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void dg1_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty((e.PropertyDescriptor as System.ComponentModel.PropertyDescriptor).Description))
|
||||
{
|
||||
e.Column.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Column.Header = (e.PropertyDescriptor as System.ComponentModel.PropertyDescriptor).Description;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
<Grid>
|
||||
<Grid.Resources>
|
||||
<Style x:Key="TitelStyle" TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="32" />
|
||||
<Setter Property="FontSize" Value="26" />
|
||||
<Setter Property="Margin" Value="10,0" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
@@ -195,6 +195,7 @@
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
@@ -216,12 +217,12 @@
|
||||
Margin="10,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="/Assets/Fonts/#iconfont"
|
||||
FontSize="30"
|
||||
FontSize="26"
|
||||
Text="" />
|
||||
<TextBlock Style="{StaticResource TitelStyle}" Text="试验名称:" />
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="30"
|
||||
FontSize="26"
|
||||
FontWeight="Bold"
|
||||
Text="{Binding ConfigService.CurExpInfo.Name}" />
|
||||
</StackPanel>
|
||||
@@ -239,7 +240,7 @@
|
||||
Margin="10,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="/Assets/Fonts/#iconfont"
|
||||
FontSize="30"
|
||||
FontSize="26"
|
||||
Text="" />
|
||||
<TextBlock Style="{StaticResource TitelStyle}" Text="当前进度:" />
|
||||
|
||||
@@ -264,7 +265,7 @@
|
||||
Margin="10,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="/Assets/Fonts/#iconfont"
|
||||
FontSize="30"
|
||||
FontSize="26"
|
||||
Text="" />
|
||||
<TextBlock Style="{StaticResource TitelStyle}" Text="总时间:" />
|
||||
<TextBlock
|
||||
@@ -288,7 +289,7 @@
|
||||
Margin="10,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="/Assets/Fonts/#iconfont"
|
||||
FontSize="30"
|
||||
FontSize="26"
|
||||
Text="" />
|
||||
<TextBlock Style="{StaticResource TitelStyle}" Text="剩余时间:" />
|
||||
<TextBlock
|
||||
@@ -312,12 +313,12 @@
|
||||
Margin="10,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="/Assets/Fonts/#iconfont"
|
||||
FontSize="30"
|
||||
FontSize="26"
|
||||
Text="" />
|
||||
<TextBlock Style="{StaticResource TitelStyle}" Text="当前步骤:" />
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="30"
|
||||
FontSize="26"
|
||||
FontWeight="Bold"
|
||||
Text="0" />
|
||||
</StackPanel>
|
||||
@@ -476,6 +477,71 @@
|
||||
|
||||
</StackPanel>
|
||||
</materialDesign:Card>
|
||||
<materialDesign:Card
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="6"
|
||||
Margin="3"
|
||||
Background="{DynamicResource MaterialDesignLightBackground}"
|
||||
Foreground="{DynamicResource PrimaryHueLightForegroundBrush}"
|
||||
UniformCornerRadius="5">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="10,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="/Assets/Fonts/#iconfont"
|
||||
FontSize="26"
|
||||
Foreground="OrangeRed"
|
||||
Text="" />
|
||||
<TextBlock
|
||||
Foreground="OrangeRed"
|
||||
Style="{StaticResource TitelStyle}"
|
||||
Text="报警:" />
|
||||
|
||||
<ItemsControl ItemsSource="{Binding AlarmService.ListAlarmRunCell}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<!-- HandValueParameter="{Binding MVValue}" -->
|
||||
<DataTemplate>
|
||||
<Border Margin="3,6" CornerRadius="2">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ActiveState}" Value="True">
|
||||
<Setter Property="Background" Value="Red" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ActiveState}" Value="false">
|
||||
<Setter Property="Background" Value="LightSlateGray" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock
|
||||
Margin="5,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="16"
|
||||
Foreground="WhiteSmoke"
|
||||
Text="{Binding CurAlarmConfig.Name}"
|
||||
ToolTip="{Binding CurAlarmConfig.Message}">
|
||||
<!--<TextBlock.ToolTip>
|
||||
<StackPanel>
|
||||
<TextBlock FontWeight="Bold" Text="官方网站" />
|
||||
<TextBlock Text="点击这个按钮,进入百度首页" />
|
||||
</StackPanel>
|
||||
</TextBlock.ToolTip>-->
|
||||
</TextBlock>
|
||||
</Border>
|
||||
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
</StackPanel>
|
||||
</materialDesign:Card>
|
||||
</Grid>
|
||||
</materialDesign:Card>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user