<Window x:Class="XHandler.View.ManualCoating.CoatingSetting"
|
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:XHandler.View.ManualCoating"
|
xmlns:str="clr-namespace:XHandler.Properties"
|
mc:Ignorable="d" WindowStartupLocation = "CenterOwner"
|
d:DesignHeight="450" d:DesignWidth="800" WindowStyle="None" AllowsTransparency="True" ResizeMode="NoResize" Background="#00FFFFFF"
|
Loaded="Window_Loaded" >
|
<Window.Resources>
|
<Style x:Key="linkRadioButtonSytle" TargetType="{x:Type RadioButton}">
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
<Setter Property="Foreground" Value="{DynamicResource blueBrush}"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type RadioButton}">
|
<Grid Height="26">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="2"/>
|
</Grid.RowDefinitions>
|
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}"
|
ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False"
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="0,0,0,0"
|
RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
<Rectangle Grid.Row="1" Height="2" x:Name="rect" Fill="{DynamicResource blueBrush}"/>
|
</Grid>
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
</Trigger>
|
<Trigger Property="IsEnabled" Value="False">
|
</Trigger>
|
<Trigger Property="IsChecked" Value="True">
|
<Setter Property="Foreground" Value="Gray"/>
|
<Setter Property="Opacity" TargetName="rect" Value="0"/>
|
</Trigger>
|
<Trigger Property="IsChecked" Value="{x:Null}">
|
<Setter Property="Opacity" TargetName="rect" Value="1"/>
|
<Setter Property="Foreground" Value="{DynamicResource blueBrush}"/>
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<Style x:Key="cellStyle" TargetType="DataGridCell">
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="DataGridCell">
|
<Border BorderBrush="LightGray" BorderThickness="0 0 0 1" Background="{TemplateBinding Background}">
|
<Grid>
|
<TextBlock TextAlignment="Center" VerticalAlignment="Center" >
|
<ContentPresenter />
|
</TextBlock>
|
<!--<Path Fill="LightGray" Data="M8,0 L8,8 0,8z" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>-->
|
</Grid>
|
</Border>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
<Style.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
<Setter Property="Background" Value="{DynamicResource lightBlueBrush}"/>
|
<Setter Property="Foreground" Value="Black"/>
|
</Trigger>
|
<Trigger Property="IsSelected" Value="True">
|
<Setter Property="Background" Value="{DynamicResource blueBrush}"/>
|
<Setter Property="Foreground" Value="White"/>
|
</Trigger>
|
<Trigger Property="IsKeyboardFocusWithin" Value="True">
|
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static DataGrid.FocusBorderBrushKey}}"/>
|
</Trigger>
|
<MultiTrigger>
|
<MultiTrigger.Conditions>
|
<Condition Property="IsSelected" Value="true"/>
|
<Condition Property="Selector.IsSelectionActive" Value="false"/>
|
</MultiTrigger.Conditions>
|
<Setter Property="Background" Value="{DynamicResource blueBrush}"/>
|
<Setter Property="Foreground" Value="White"/>
|
</MultiTrigger>
|
<Trigger Property="IsEnabled" Value="false">
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
</Trigger>
|
</Style.Triggers>
|
</Style>
|
|
<Style TargetType="DataGridRow">
|
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
<Setter Property="Background" Value="White" />
|
<Setter Property="Height" Value="40"/>
|
<Setter Property="FontSize" Value="16" />
|
<Setter Property="Foreground" Value="Black" />
|
</Style>
|
|
<Style x:Key="DataGridCellStyle" TargetType="{x:Type DataGridCell}">
|
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="Height" Value="40"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type DataGridCell}">
|
<Border BorderBrush="LightGray" BorderThickness="0 0 0 1" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
<Grid>
|
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
<Path Fill="LightGray" Data="M12,0 L12,8 0,8z" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
|
</Grid>
|
</Border>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
<EventSetter Event="PreviewMouseMove" Handler="DataGridCell_PreviewMouseMove"/>
|
<EventSetter Event="PreviewMouseLeftButtonDown" Handler="DataGridCell_PreviewMouseLeftButtonDown"/>
|
<EventSetter Event="PreviewMouseDoubleClick" Handler="DataGridCell_PreviewMouseDoubleClick"/>
|
<Style.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
<Setter Property="Background" Value="{DynamicResource lightBlueBrush}"/>
|
<Setter Property="Foreground" Value="Black"/>
|
</Trigger>
|
<Trigger Property="IsSelected" Value="True">
|
<Setter Property="Background" Value="{DynamicResource blueBrush}"/>
|
<Setter Property="Foreground" Value="White"/>
|
</Trigger>
|
<Trigger Property="IsKeyboardFocusWithin" Value="True">
|
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static DataGrid.FocusBorderBrushKey}}"/>
|
</Trigger>
|
<MultiTrigger>
|
<MultiTrigger.Conditions>
|
<Condition Property="IsSelected" Value="true"/>
|
<Condition Property="Selector.IsSelectionActive" Value="false"/>
|
</MultiTrigger.Conditions>
|
<Setter Property="Background" Value="{DynamicResource blueBrush}"/>
|
<Setter Property="Foreground" Value="White"/>
|
</MultiTrigger>
|
<Trigger Property="IsEnabled" Value="false">
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
</Trigger>
|
</Style.Triggers>
|
</Style>
|
|
<Style x:Key="eidtTextBoxStyle" TargetType="TextBox">
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate >
|
<Grid>
|
<Border x:Name="BackBorder" SnapsToDevicePixels="true" Background="{TemplateBinding Background}"
|
BorderThickness="0" BorderBrush="{TemplateBinding BorderBrush}" Height="40">
|
<ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
</Border>
|
</Grid>
|
<ControlTemplate.Triggers>
|
<!--<Trigger Property="IsFocused" Value="True" >
|
<Setter Property="Background" TargetName="BackBorder" Value="#FFE5E6EB"/>
|
</Trigger>-->
|
<Trigger Property="IsEnabled" Value="False">
|
<Setter Property="TextBox.Foreground" Value="Gray"/>
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
</Window.Resources>
|
|
<Grid>
|
<Grid Background="White">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="50"/>
|
<RowDefinition Height="*"/>
|
</Grid.RowDefinitions>
|
<Grid Grid.Row="0" >
|
<TextBlock Text="{x:Static str:Resources.strCoatingSetting}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="20 0" FontSize="20"
|
FontWeight="Bold"/>
|
</Grid>
|
|
<Border Grid.Row="1" Background="White" CornerRadius="0 0 10 10" BorderThickness="0">
|
<Grid Margin="50 0">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="50"/>
|
<RowDefinition Height="auto"/>
|
<RowDefinition Height="*"/>
|
</Grid.RowDefinitions>
|
<StackPanel Orientation="Horizontal">
|
<TextBlock Text="{x:Static str:Resources.strCoatingTimes}" FontSize="16" VerticalAlignment="Center"/>
|
<RadioButton x:Name="radioBtnTimes1" Content="1" FontSize="16" VerticalAlignment="Center" Margin="20 0"
|
Checked="radioBtnTimes1_Checked" IsEnabled="False"/>
|
<RadioButton x:Name="radioBtnTimes2" Content="2" FontSize="16" VerticalAlignment="Center" Checked="radioBtnTimes2_Checked" IsEnabled="False"/>
|
</StackPanel>
|
<StackPanel Orientation="Horizontal" x:Name="stackPanel" Grid.Row="1" Visibility="Collapsed">
|
</StackPanel>
|
<Button x:Name="btnOK" Content="{x:Static str:Resources.btnOK}" Style="{DynamicResource BlueButtonStyle}" Background="{DynamicResource blueBrush}"
|
Width="100" Height="40" FontSize="16" HorizontalAlignment="Right" Click="btnOK_Click" Margin="50 0"/>
|
|
<DataGrid x:Name="dgCoatingData" Grid.Row="2" AutoGenerateColumns="False" BorderThickness="0" FontSize="14"
|
RowHeaderWidth="0" BorderBrush="LightGray" CanUserResizeColumns="False" CanUserResizeRows="False" Margin="0 10" Background="White"
|
CanUserSortColumns="False" CanUserReorderColumns="False" CanUserAddRows="False" ColumnHeaderStyle="{DynamicResource dataGridColumnHeaderStyle}"
|
GridLinesVisibility="None" SelectionUnit="Cell" SelectionMode="Extended"
|
BeginningEdit="dgCoatingData_BeginningEdit" CellEditEnding="dgCoatingData_CellEditEnding"
|
PreviewMouseMove="dgCoatingData_PreviewMouseMove" SelectedCellsChanged="dgCoatingData_SelectedCellsChanged"
|
PreviewMouseLeftButtonUp="dgCoatingData_PreviewMouseLeftButtonUp">
|
<DataGrid.Columns>
|
<DataGridTextColumn Width="80" Binding="{Binding choice_id}" Header="{x:Static str:Resources.strNo}" CellStyle="{StaticResource cellStyle}" IsReadOnly="True"/>
|
<DataGridTextColumn Width="*" Binding="{Binding sourceplate}" Header="{x:Static str:Resources.strSourceDish}" CellStyle="{StaticResource cellStyle}"
|
EditingElementStyle="{StaticResource eidtTextBoxStyle}" IsReadOnly="True"/>
|
<DataGridTextColumn Width="*" Binding="{Binding sourceplate_num}" Header="{x:Static str:Resources.strSourceDishBarcode}" CellStyle="{StaticResource DataGridCellStyle}"
|
EditingElementStyle="{StaticResource eidtTextBoxStyle}" IsReadOnly="True"/>
|
<DataGridTextColumn Width="*" Binding="{Binding machine_coordinate}" Header="{x:Static str:Resources.strMachinePosition}" CellStyle="{StaticResource cellStyle}"
|
EditingElementStyle="{StaticResource eidtTextBoxStyle}" IsReadOnly="True"/>
|
<DataGridTextColumn Width="*" Binding="{Binding pixel_coordinate}" Header="{x:Static str:Resources.strPixelPosition}" CellStyle="{StaticResource cellStyle}"
|
EditingElementStyle="{StaticResource eidtTextBoxStyle}" IsReadOnly="True"/>
|
<DataGridTextColumn Width="*" Binding="{Binding targetplate}" Header="{x:Static str:Resources.strTargetBoard}" CellStyle="{StaticResource cellStyle}"
|
EditingElementStyle="{StaticResource eidtTextBoxStyle}" IsReadOnly="True"/>
|
<DataGridTextColumn Width="*" Binding="{Binding targetplate_num}" Header="{x:Static str:Resources.strDestBoardBarcode}" CellStyle="{StaticResource DataGridCellStyle}"
|
EditingElementStyle="{StaticResource eidtTextBoxStyle}" IsReadOnly="True"/>
|
<DataGridTextColumn Width="*" Binding="{Binding targetplate_well}" Header="{x:Static str:Resources.strTargetWell}" CellStyle="{StaticResource cellStyle}"
|
EditingElementStyle="{StaticResource eidtTextBoxStyle}" IsReadOnly="True"/>
|
<DataGridTextColumn Width="*" Binding="{Binding is_new_plate_batch}" Header="is_new_plate_batch" CellStyle="{StaticResource DataGridCellStyle}" IsReadOnly="True" Visibility="Collapsed"/>
|
</DataGrid.Columns>
|
|
</DataGrid>
|
</Grid>
|
</Border>
|
</Grid>
|
</Grid>
|
</Window>
|