Sic.Framework/MECF.Framework.UI.Client/TrayThickness/HistoryData/HistoryDataView.xaml

495 lines
30 KiB
XML

<UserControl x:Class="MECF.Framework.UI.Client.TrayThickness.HistoryData.HistoryDataView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:MECF.Framework.UI.Client.TrayThickness.HistoryData"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:forms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:micro="clr-namespace:Caliburn.Micro"
xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:controls="clr-namespace:OpenSEMI.Ctrlib.Controls"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="1200">
<UserControl.Resources>
<local:ColorConverter x:Key="ColorConverter_Current"/>
<local:BoolToVisibilityConverter x:Key="BoolToVisibility_Converter"/>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<!--右侧操作面板-->
<StackPanel Orientation="Vertical" Background="#FFDBE5F1" Margin="10" Height="340" VerticalAlignment="Top" >
<StackPanel Width="260" Margin="10">
<StackPanel.Resources>
<Style TargetType="xctk:DateTimeUpDown">
<Setter Property="Width" Value="180" />
<Setter Property="Format" Value="Custom" />
<Setter Property="FormatString" Value="yyyy/MM/dd HH:mm:ss" />
</Style>
</StackPanel.Resources>
<StackPanel Orientation="Horizontal" Margin="3,0">
<TextBlock
Width="70"
VerticalAlignment="Center"
FontFamily="Arial"
FontSize="14"
Text="Start Time" />
<WindowsFormsHost
Width="170"
Height="22"
Margin="5,0,0,0"
VerticalAlignment="Center"
FontFamily="Arial"
FontSize="14">
<forms:DateTimePicker
x:Name="wfTimeFrom"
CustomFormat="yyyy/MM/dd HH:mm:ss"
Format="Custom"
Value="2011-8-1" />
</WindowsFormsHost>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="3,0">
<TextBlock
Width="70"
VerticalAlignment="Center"
FontFamily="Arial"
FontSize="14"
Text="End Time" />
<WindowsFormsHost
Width="170"
Height="22"
Margin="5,0,0,0"
VerticalAlignment="Center"
FontFamily="Arial"
FontSize="14">
<forms:DateTimePicker
x:Name="wfTimeTo"
CustomFormat="yyyy/MM/dd HH:mm:ss"
Format="Custom"
Value="2011-8-1" />
</WindowsFormsHost>
</StackPanel>
</StackPanel>
<StackPanel Margin="5" Orientation="Horizontal" HorizontalAlignment="Right">
<RadioButton Margin="5" VerticalAlignment="Center" IsChecked="{Binding IsQueryTray}" ToolTip="选中时间段内查询">查询Tray</RadioButton>
<RadioButton Margin="5" VerticalAlignment="Center" IsChecked="{Binding IsQueryPM}" ToolTip="选中时间段内查询">查询PM腔体</RadioButton>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="10">
<Button
Width="100"
Height="30"
Margin="10"
ToolTip="查询所有记录"
HorizontalAlignment="Right"
Content="Query All">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<micro:ActionMessage MethodName="QueryAll"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
<Button
Width="100"
Height="30"
Margin="10"
HorizontalAlignment="Left"
ToolTip="选择的时间段内查询"
Content="Query Time">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<micro:ActionMessage MethodName="QueryTime"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</StackPanel>
<StackPanel Visibility="{Binding IsQueryTray,Converter={StaticResource BoolToVisibility_Converter}}">
<StackPanel Margin="10,30,0,0" Orientation="Horizontal">
<TextBlock
Width="50"
VerticalAlignment="Center"
FontFamily="Arial"
FontSize="14"
Text="Name" />
<TextBox
Width="170"
Name="txt_TrayName"
Height="22"
Margin="5,0,0,0"
VerticalAlignment="Center"
FontFamily="Arial"
FontSize="14">
</TextBox>
</StackPanel >
<StackPanel Margin="10" Orientation="Horizontal" HorizontalAlignment="Right">
<RadioButton Margin="5" VerticalAlignment="Center" IsChecked="{Binding Unit}" ToolTip="选中时间段内查询">单环记录</RadioButton>
<RadioButton Margin="5" VerticalAlignment="Center" IsChecked="{Binding Entirety}" ToolTip="选中时间段内查询">整体记录</RadioButton>
</StackPanel>
<Button
Width="110"
Height="30"
Margin="10"
ToolTip="选中时间段内查询"
HorizontalAlignment="Right"
Content="Query Name">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<micro:ActionMessage MethodName="QueryName">
<micro:ActionMessage.Parameters>
<micro:Parameter Value="{Binding Path=Text,ElementName=txt_TrayName}" />
</micro:ActionMessage.Parameters>
</micro:ActionMessage>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</StackPanel>
</StackPanel>
<ScrollViewer Grid.Column="1" Margin="10" Width="900" HorizontalAlignment="Left">
<StackPanel>
<!--Tray信息展示控件包含整体Tray和单环信息两种控件-->
<StackPanel Visibility="{Binding IsQueryTray,Converter={StaticResource BoolToVisibility_Converter}}">
<!--单行信息展示-->
<ListView
ItemsSource="{Binding CoatingData}"
AlternationCount="2"
VerticalAlignment="Top"
Visibility="{Binding Unit,Converter={StaticResource BoolToVisibility_Converter}}">
<ListView.View>
<GridView>
<GridViewColumn Width="80" Header="Index">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Index}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="120" Header="Label">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Caption}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="200" Header="Name">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding SerialNumber}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="100" Header="Max(um)">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding MAX}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="100" Header="Current(um)">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Current,StringFormat=N2}" >
<TextBlock.Foreground>
<MultiBinding Converter="{StaticResource ColorConverter_Current}" StringFormat="{}{0}:{1}">
<Binding Path="Current" />
<Binding Path="MAX" />
</MultiBinding>
</TextBlock.Foreground>
</TextBlock>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="80" Header="PM_Numberl">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding PmOwned}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="200" Header="CreatTime">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding CreatTime}"/>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
<!--Tray整体信息展示-->
<ListView
Background="White"
FontSize="12"
HorizontalAlignment="Left"
ItemsSource="{Binding TrayCoatingList}"
Visibility="{Binding IsNotUnit,Converter={StaticResource BoolToVisibility_Converter}}">
<ListView.Resources>
<Style TargetType="ListViewItem">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="White"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Background" Value="White"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="Label">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="LightSkyBlue"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Background" Value="White"/>
</Trigger>
</Style.Triggers>
</Style>
</ListView.Resources>
<ListView.View>
<GridView>
<GridViewColumn Header="Tray Coating History Data" Width="900">
<GridViewColumn.CellTemplate>
<DataTemplate>
<Grid Width="850" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border BorderBrush="Gray" BorderThickness="1,1,0,1" >
<Label Content="{Binding Tray.PmOwned}" FontSize="18" FontFamily="Bold" HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<StackPanel Grid.Column="1" >
<Border BorderBrush="Gray" BorderThickness="1">
<StackPanel Orientation="Horizontal">
<Label >Caption:</Label>
<Label Width="80" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding Tray.Caption}" />
<Label >Name:</Label>
<Label Width="150" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding Tray.SerialNumber}" />
<Label >Max:</Label>
<Label Width="60" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding Tray.MAX}" />
<Label >Thickness:</Label>
<Label Width="60" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding Tray.Current}" >
<Label.Foreground>
<MultiBinding Converter="{StaticResource ColorConverter_Current}" StringFormat="{}{0}:{1}">
<Binding Path="Tray.Current" />
<Binding Path="Tray.MAX" />
</MultiBinding>
</Label.Foreground>
</Label>
<Label >Time:</Label>
<Label Width="120" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding Tray.CreatTime}" />
</StackPanel>
</Border>
<Border BorderBrush="Gray" BorderThickness="1,0,1,1">
<StackPanel Orientation="Horizontal">
<Label >Caption:</Label>
<Label Width="80" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding TrayInner.Caption}" />
<Label >Name:</Label>
<Label Width="150" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding TrayInner.SerialNumber}" />
<Label >Max:</Label>
<Label Width="60" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding TrayInner.MAX}" />
<Label >Thickness:</Label>
<Label Width="60" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding TrayInner.Current}" >
<Label.Foreground>
<MultiBinding Converter="{StaticResource ColorConverter_Current}" StringFormat="{}{0}:{1}">
<Binding Path="TrayInner.Current" />
<Binding Path="TrayInner.MAX" />
</MultiBinding>
</Label.Foreground>
</Label>
<Label >Time:</Label>
<Label Width="120" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding TrayInner.CreatTime}" />
</StackPanel>
</Border>
<Border BorderBrush="Gray" BorderThickness="1,0,1,1">
<StackPanel Orientation="Horizontal">
<Label >Caption:</Label>
<Label Width="80" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding RingInner.Caption}" />
<Label >Name:</Label>
<Label Width="150" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding RingInner.SerialNumber}" />
<Label >Max:</Label>
<Label Width="60" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding RingInner.MAX}" />
<Label >Thickness:</Label>
<Label Width="60" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding RingInner.Current}" >
<Label.Foreground>
<MultiBinding Converter="{StaticResource ColorConverter_Current}" StringFormat="{}{0}:{1}">
<Binding Path="RingInner.Current" />
<Binding Path="RingInner.MAX" />
</MultiBinding>
</Label.Foreground>
</Label>
<Label >Time:</Label>
<Label Width="120" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding RingInner.CreatTime}" />
</StackPanel>
</Border>
<Border BorderBrush="Gray" BorderThickness="1,0,1,1">
<StackPanel Orientation="Horizontal">
<Label >Caption:</Label>
<Label Width="80" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding RingOuter.Caption}" />
<Label >Name:</Label>
<Label Width="150" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding RingOuter.SerialNumber}" />
<Label >Max:</Label>
<Label Width="60" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding RingOuter.MAX}" />
<Label >Thickness:</Label>
<Label Width="60" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding RingOuter.Current}" >
<Label.Foreground>
<MultiBinding Converter="{StaticResource ColorConverter_Current}" StringFormat="{}{0}:{1}">
<Binding Path="RingOuter.Current" />
<Binding Path="RingOuter.MAX" />
</MultiBinding>
</Label.Foreground>
</Label>
<Label >Time:</Label>
<Label Width="120" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding RingOuter.CreatTime}" />
</StackPanel>
</Border>
</StackPanel>
</Grid>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
</StackPanel>
<!--PM信息展示控件-->
<ListView
Background="White"
FontSize="12"
HorizontalAlignment="Left"
ItemsSource="{Binding PMCoatingList}"
Visibility="{Binding IsQueryPM,Converter={StaticResource BoolToVisibility_Converter}}">
<ListView.Resources>
<Style TargetType="ListViewItem">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="White"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Background" Value="White"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="Label">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="LightSkyBlue"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Background" Value="White"/>
</Trigger>
</Style.Triggers>
</Style>
</ListView.Resources>
<ListView.View>
<GridView>
<GridViewColumn Header="PM Coating History Data" Width="900">
<GridViewColumn.CellTemplate>
<DataTemplate>
<Grid Width="850" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border BorderBrush="Gray" BorderThickness="1,1,0,1" >
<Label Content="{Binding MinorCycle.PmOwned}" FontSize="18" FontFamily="Bold" HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<StackPanel Grid.Column="1" >
<Border BorderBrush="Gray" BorderThickness="1">
<StackPanel Orientation="Horizontal">
<Label >Caption:</Label>
<Label Width="80" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding MinorCycle.Caption}" />
<Label >Name:</Label>
<Label Width="150" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding MinorCycle.SerialNumber}" />
<Label >Max:</Label>
<Label Width="60" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding MinorCycle.MAX}" />
<Label >Thickness:</Label>
<Label Width="60" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding MinorCycle.Current}" />
<Label >Time:</Label>
<Label Width="120" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding MinorCycle.CreatTime}" />
</StackPanel>
</Border>
<Border BorderBrush="Gray" BorderThickness="1,0,1,1">
<StackPanel Orientation="Horizontal">
<Label >Caption:</Label>
<Label Width="80" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding MajorCycle.Caption}" />
<Label >Name:</Label>
<Label Width="150" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding MajorCycle.SerialNumber}" />
<Label >Max:</Label>
<Label Width="60" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding MajorCycle.MAX}" />
<Label >Thickness:</Label>
<Label Width="60" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding MajorCycle.Current}" />
<Label >Time:</Label>
<Label Width="120" Margin="0,0,5,0" HorizontalAlignment="Left" Content="{Binding MajorCycle.CreatTime}" />
</StackPanel>
</Border>
</StackPanel>
</Grid>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
</StackPanel>
</ScrollViewer>
</Grid>
</UserControl>