Sic08/SicUI/Models/PMs/PMMfcRorView.xaml

507 lines
22 KiB
XML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<UserControl
x:Class="SicUI.Models.PMs.PMMfcRorView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cal="http://www.caliburn.org"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:forms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:local="clr-namespace:SicUI.Models.PMs"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="800"
d:DesignWidth="1800"
mc:Ignorable="d">
<UserControl.Resources>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="15" />
<Setter Property="TextAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="TextWrapping" Value="Wrap" />
<Setter Property="Margin" Value="3" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
<Style TargetType="Border">
<Setter Property="Background" Value="#FFD0DEEB" />
<Setter Property="BorderBrush" Value="Gray" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="BorderThickness" Value="1,0,1,1" />
</Style>
<Style x:Key="InfBorder" TargetType="Border">
<Setter Property="Background" Value="White" />
<Setter Property="BorderBrush" Value="Gray" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="BorderThickness" Value="0,0,1,1" />
</Style>
<Style TargetType="TextBox">
<Setter Property="BorderThickness" Value="0" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontSize" Value="15" />
<Setter Property="Margin" Value="3" />
</Style>
<Style TargetType="DataGridCell">
<Setter Property="TextBlock.TextAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="350" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="300" />
<RowDefinition Height="200" />
<RowDefinition Height="90" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel
Width="320"
Margin="5"
HorizontalAlignment="Left"
Orientation="Vertical">
<Border
Grid.Row="0"
Height="30"
Background="#FF243664"
BorderThickness="0"
CornerRadius="8,8,0,0">
<TextBlock
Padding="8,0,0,0"
HorizontalAlignment="Center"
FontSize="13"
Foreground="White"
Text="基准MFC" />
</Border>
<StackPanel Orientation="Horizontal">
<StackPanel Width="200" HorizontalAlignment="Left">
<Border BorderThickness="1,0,1,1">
<TextBlock Text="基准MFC" />
</Border>
<Border BorderThickness="1,0,1,1">
<TextBlock Text="腔体压差(mbar)" />
</Border>
<Border>
<TextBlock Text="压力P1(mbar)" />
</Border>
<Border>
<TextBlock Text="压力P2(mbar)" />
</Border>
<Border>
<TextBlock Text="压力P3(mbar)" />
</Border>
<Border>
<TextBlock Text="压力P4(mbar)" />
</Border>
<Border>
<TextBlock Text="腔体平均压差(mbar)" />
</Border>
<Border>
<TextBlock Text="MFC实际流量(sccm)" />
</Border>
<Border>
<TextBlock Text="MFC设定流量(sccm)" />
</Border>
<Border>
<TextBlock Text="腔体体积(ml)" />
</Border>
</StackPanel>
<StackPanel Width="120" HorizontalAlignment="Left">
<Border Background="#FFD6D6D6" BorderThickness="0,0,1,1">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding StandardMfcRorData.Name, StringFormat=0.00}"
TextAlignment="Center" />
</Border>
<Border Background="#FFD6D6D6" BorderThickness="0,0,1,1">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding StandardMfcRorData.MaintainPressureDifference, StringFormat=0.00}"
TextAlignment="Center" />
</Border>
<Border Background="#FFD6D6D6" Style="{StaticResource InfBorder}">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding StandardMfcRorData.Pressure1, StringFormat=0.00}"
TextAlignment="Center" />
</Border>
<Border Background="#FFD6D6D6" Style="{StaticResource InfBorder}">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding StandardMfcRorData.Pressure2, StringFormat=0.00}"
TextAlignment="Center" />
</Border>
<Border Background="#FFD6D6D6" Style="{StaticResource InfBorder}">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding StandardMfcRorData.Pressure3, StringFormat=0.00}"
TextAlignment="Center" />
</Border>
<Border Background="#FFD6D6D6" Style="{StaticResource InfBorder}">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding StandardMfcRorData.Pressure4, StringFormat=0.00}"
TextAlignment="Center" />
</Border>
<Border Background="#FFD6D6D6" Style="{StaticResource InfBorder}">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding StandardMfcRorData.MeanDifferencePressure, StringFormat=0.00}"
TextAlignment="Center" />
</Border>
<Border Background="#FFD6D6D6" Style="{StaticResource InfBorder}">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding StandardMfcRorData.ActualFlow, StringFormat=0.00}"
TextAlignment="Center" />
</Border>
<Border Background="#FFD6D6D6" Style="{StaticResource InfBorder}">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding StandardMfcRorData.SetFlow, StringFormat=0.00}"
TextAlignment="Center" />
</Border>
<Border Background="#FFD6D6D6" Style="{StaticResource InfBorder}">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding StandardMfcRorData.Volume, StringFormat=0.00}"
TextAlignment="Center" />
</Border>
</StackPanel>
</StackPanel>
</StackPanel>
<StackPanel
Grid.Row="1"
Width="320"
Margin="5"
HorizontalAlignment="Left"
Orientation="Vertical">
<Border
Height="30"
Background="#FF243664"
BorderThickness="0"
CornerRadius="8,8,0,0">
<TextBlock
Padding="8,0,0,0"
HorizontalAlignment="Center"
FontSize="13"
Foreground="White"
Text="Set" />
</Border>
<StackPanel Orientation="Horizontal">
<StackPanel Width="200" HorizontalAlignment="Left">
<Border>
<TextBlock Text="反应腔温度(K)" />
</Border>
<Border>
<TextBlock Text="压力记录时间间隔(s)" />
</Border>
<Border>
<TextBlock Text="设定流量(sccm‹‹)" />
</Border>
<Border>
<TextBlock Text="压力‹(mbar‹‹)" />
</Border>
<Border>
<TextBlock Text="设定为标准MFC" />
</Border>
<Border>
<TextBlock Text="MFC量程(sccm)" />
</Border>
</StackPanel>
<StackPanel Width="120">
<Border Style="{StaticResource InfBorder}">
<TextBox Text="{Binding SelectedMfcRorData.Temperature, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</Border>
<Border Style="{StaticResource InfBorder}">
<TextBox Text="{Binding SelectedMfcRorData.Interval, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</Border>
<Border Style="{StaticResource InfBorder}">
<TextBox Text="{Binding SelectedMfcRorData.SetFlow, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</Border>
<Border Style="{StaticResource InfBorder}">
<TextBox Text="{Binding SelectedMfcRorData.BasePressure, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</Border>
<Border>
<CheckBox
Margin="5"
VerticalContentAlignment="Center"
IsChecked="{Binding SelectedMfcRorData.IsStandardMfc, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</Border>
<Border Background="#FFD6D6D6" Style="{StaticResource InfBorder}">
<TextBlock Text="{Binding SelectedMfcRorData.Scale}" />
</Border>
</StackPanel>
</StackPanel>
<StackPanel Height="20" />
</StackPanel>
<StackPanel
Grid.Row="2"
Margin="5"
Orientation="Vertical">
<Border
Width="320"
Margin="0,0,0,10"
HorizontalAlignment="Left"
BorderThickness="0"
CornerRadius="8,8,0,0">
<StackPanel Orientation="Vertical">
<Border
Background="#FF243664"
BorderThickness="0"
CornerRadius="8,8,0,0">
<TextBlock
HorizontalAlignment="Center"
FontSize="13"
Foreground="White"
Text="Set" />
</Border>
<StackPanel Grid.Row="1" Orientation="Horizontal">
<ComboBox
Width="160"
Height="30"
Margin="10,5,0,5"
FontSize="15"
ItemsSource="{Binding MfcList}"
SelectedItem="{Binding SelectedMfcRorData.Name}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<cal:ActionMessage MethodName="MfcSelectionChanged" />
</i:EventTrigger>
</i:Interaction.Triggers>
</ComboBox>
<Button
Width="80"
Height="30"
Margin="35,5,0,5"
Content="Start">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<cal:ActionMessage MethodName="StartMfcRor" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</StackPanel>
</StackPanel>
</Border>
</StackPanel>
<StackPanel
Grid.Row="3"
Margin="5"
Orientation="Vertical">
<Border
Width="320"
Margin="0,10,0,0"
HorizontalAlignment="Left"
BorderThickness="1,0,1,1"
CornerRadius="8,8,0,0">
<StackPanel Width="302" Orientation="Horizontal">
<StackPanel Margin="0,15">
<StackPanel Height="40" Orientation="Horizontal">
<TextBlock Width="75" Text="Start Time" />
<WindowsFormsHost
Width="170"
Height="22"
Margin="20,0,0,0"
VerticalAlignment="Center"
FontFamily="Arial"
FontSize="14">
<forms:DateTimePicker
x:Name="wfTimeFrom"
CustomFormat="yyyy/MM/dd HH:mm:ss"
Format="Custom"
Value="2023-1-1" />
</WindowsFormsHost>
</StackPanel>
<StackPanel
Height="40"
Margin="0,5,0,0"
Orientation="Horizontal">
<TextBlock Width="75" Text="End Time" />
<WindowsFormsHost
Width="170"
Height="22"
Margin="20,0,0,0"
VerticalAlignment="Center"
FontFamily="Arial"
FontSize="14">
<forms:DateTimePicker
x:Name="wfTimeTo"
CustomFormat="yyyy/MM/dd HH:mm:ss"
Format="Custom"
Value="2023-1-1" />
</WindowsFormsHost>
</StackPanel>
<StackPanel
Margin="5"
HorizontalAlignment="Center"
Orientation="Horizontal">
<Button
Width="100"
Height="30"
Margin="5,0,5,0"
HorizontalAlignment="Center"
Content="Query">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<cal:ActionMessage MethodName="QueryData">
<cal:Parameter Value="{Binding ElementName=wfTimeFrom, Path=Value}" />
<cal:Parameter Value="{Binding ElementName=wfTimeTo, Path=Value}" />
</cal:ActionMessage>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</StackPanel>
</StackPanel>
</StackPanel>
</Border>
</StackPanel>
<DataGrid
Grid.RowSpan="3"
Grid.Column="1"
Width="1293"
HorizontalAlignment="Left"
AlternationCount="2"
AutoGenerateColumns="False"
CanUserAddRows="False"
ItemsSource="{Binding MfcRorDataList}"
LoadingRow="DataGrid_LoadingRow"
ScrollViewer.CanContentScroll="True">
<DataGrid.Columns>
<DataGridTextColumn
Width="50"
Binding="{Binding Path=Header, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type DataGridRow}}}"
Header="No" />
<DataGridTextColumn
Width="100"
Binding="{Binding Name}"
Header="MFCName"
IsReadOnly="True" />
<DataGridTextColumn
Width="130"
Binding="{Binding StartTime, StringFormat='yyyy-MM-dd HH:mm:ss'}"
Header="开始时间"
IsReadOnly="True" />
<DataGridTextColumn
Width="130"
Binding="{Binding EndTime, StringFormat='yyyy-MM-dd HH:mm:ss'}"
Header="结束时间"
IsReadOnly="True" />
<DataGridTextColumn
Width="100"
Binding="{Binding Pressure1, StringFormat=0.00}"
Header="P1"
IsReadOnly="True" />
<DataGridTextColumn
Width="100"
Binding="{Binding Pressure2, StringFormat=0.00}"
Header="P2"
IsReadOnly="True" />
<DataGridTextColumn
Width="100"
Binding="{Binding Pressure3, StringFormat=0.00}"
Header="P3"
IsReadOnly="True" />
<DataGridTextColumn
Width="100"
Binding="{Binding Pressure4, StringFormat=0.00}"
Header="P4"
IsReadOnly="True" />
<DataGridTextColumn
Width="100"
Binding="{Binding MeanDifferencePressure, StringFormat=0.00}"
Header="腔体平均压差"
IsReadOnly="True" />
<DataGridTextColumn
Width="100"
Binding="{Binding ActualFlow, StringFormat=0.00}"
Header="实际流量"
IsReadOnly="True" />
<DataGridTextColumn
Width="100"
Binding="{Binding SetFlow, StringFormat=0.00}"
Header="设定流量"
IsReadOnly="True" />
<DataGridTextColumn
Width="100"
Binding="{Binding Deviation, StringFormat={}{0:F2}%}"
Header="偏差"
IsReadOnly="True">
<DataGridTextColumn.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="TextBlock.TextAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Style.Triggers>
<DataTrigger Binding="{Binding IsOverStandard}" Value="True">
<Setter Property="Background" Value="Red" />
</DataTrigger>
</Style.Triggers>
</Style>
</DataGridTextColumn.CellStyle>
</DataGridTextColumn>
<DataGridTemplateColumn Width="80" Header="基准MFC">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox
HorizontalAlignment="Center"
IsChecked="{Binding IsStandardMfc}"
IsEnabled="False" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</UserControl>