|
|
|
<Window x:Class="DyeingComputer.MainWindow"
|
|
|
|
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:lang="clr-namespace:DyeingComputer.Properties"
|
|
|
|
xmlns:local="clr-namespace:DyeingComputer"
|
|
|
|
xmlns:viewmodel="clr-namespace:DyeingComputer.ViewModel"
|
|
|
|
d:DataContext="{d:DesignInstance Type=viewmodel:MainWindowViewModel}"
|
|
|
|
mc:Ignorable="d"
|
|
|
|
Title="SUNLIGHT838"
|
|
|
|
Height="720" Width="1280"
|
|
|
|
WindowState ="Maximized"
|
|
|
|
WindowStyle="None">
|
|
|
|
<Window.Resources>
|
|
|
|
<Style x:Key="RadioButtonStyle" TargetType="{x:Type RadioButton}">
|
|
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}"/>
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
|
|
|
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
|
|
|
<Setter Property="Padding" Value="6 0 0 0"/>
|
|
|
|
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
|
|
|
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"/>
|
|
|
|
<Setter Property="Template">
|
|
|
|
<Setter.Value>
|
|
|
|
<ControlTemplate TargetType="{x:Type RadioButton}">
|
|
|
|
<Grid>
|
|
|
|
<Border x:Name="border" Background="{TemplateBinding Background}">
|
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition>
|
|
|
|
</ColumnDefinition>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
|
|
|
Text="{TemplateBinding Tag}"
|
|
|
|
FontFamily="Fonts/#FontAwesome"
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
Width="30" FontSize="20" Margin="5,10,0,0"/>
|
|
|
|
<TextBlock Grid.Row="0" Grid.Column="1"
|
|
|
|
Text="{TemplateBinding Content}"
|
|
|
|
FontFamily="Fonts/#FontAwesome"
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
Width="NaN" FontSize="20" Margin="40,10,0,0"/>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
</Grid>
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
<Setter Property="Background" Value="#FFA0A0A0" TargetName="border"/>
|
|
|
|
</Trigger>
|
|
|
|
<Trigger Property="IsChecked" Value="True">
|
|
|
|
<Setter Property="Background" Value="#FFF5F5F5" TargetName="border"/>
|
|
|
|
</Trigger>
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
</ControlTemplate>
|
|
|
|
</Setter.Value>
|
|
|
|
</Setter>
|
|
|
|
</Style>
|
|
|
|
</Window.Resources>
|
|
|
|
|
|
|
|
<Grid>
|
|
|
|
<Rectangle Margin="0,0,0,0" Fill="#FFCCCCCC" VerticalAlignment="Bottom" Height="40"/>
|
|
|
|
<RadioButton Content="{x:Static lang:Resources.WorkOrder}"
|
|
|
|
x:Name="Work_Order" Tag=""
|
|
|
|
Style="{DynamicResource RadioButtonStyle}"
|
|
|
|
HorizontalAlignment="Left" Height="40" Margin="0,0,0,0"
|
|
|
|
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC"
|
|
|
|
Checked="RadioButton_Page"/>
|
|
|
|
<RadioButton Content="{x:Static lang:Resources.TechnologicalProcess}"
|
|
|
|
x:Name="Technological_Process" Tag=""
|
|
|
|
Style="{DynamicResource RadioButtonStyle}"
|
|
|
|
HorizontalAlignment="Left" Height="40" Margin="200,0,0,0"
|
|
|
|
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC"
|
|
|
|
Checked="RadioButton_Page"/>
|
|
|
|
<RadioButton Content="{x:Static lang:Resources.CurveDiagram}"
|
|
|
|
x:Name="Curve_Diagram" Tag=""
|
|
|
|
Style="{DynamicResource RadioButtonStyle}"
|
|
|
|
HorizontalAlignment="Left" Height="40" Margin="400,0,0,0"
|
|
|
|
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC"
|
|
|
|
Checked="RadioButton_Page"/>
|
|
|
|
<RadioButton Content="{x:Static lang:Resources.EquipmentSimulation}"
|
|
|
|
x:Name="Equipment_Simulation" Tag=""
|
|
|
|
Style="{DynamicResource RadioButtonStyle}"
|
|
|
|
HorizontalAlignment="Left" Height="40" Margin="600,0,0,0"
|
|
|
|
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC"
|
|
|
|
Checked="RadioButton_Page"/>
|
|
|
|
<RadioButton Content="{x:Static lang:Resources.HistoryRecords}"
|
|
|
|
x:Name="History_Records" Tag=""
|
|
|
|
Style="{DynamicResource RadioButtonStyle}"
|
|
|
|
HorizontalAlignment="Left" Height="40" Margin="800,0,0,0"
|
|
|
|
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC"
|
|
|
|
Checked="RadioButton_Page"/>
|
|
|
|
<RadioButton Content="{x:Static lang:Resources.Next}"
|
|
|
|
x:Name="Next" Tag=""
|
|
|
|
Style="{DynamicResource RadioButtonStyle}"
|
|
|
|
HorizontalAlignment="Right" Height="40" Margin="0,0,0,0"
|
|
|
|
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC"
|
|
|
|
Checked="RadioButton_toolbar" GroupName="toolbar"/>
|
|
|
|
|
|
|
|
<RadioButton Content="{x:Static lang:Resources.InOut}"
|
|
|
|
x:Name="In_Out" Tag=""
|
|
|
|
Style="{DynamicResource RadioButtonStyle}"
|
|
|
|
HorizontalAlignment="Left" Height="40" Margin="0,0,0,0"
|
|
|
|
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC"
|
|
|
|
Checked="RadioButton_Page" Visibility="Hidden"/>
|
|
|
|
<RadioButton Content="{x:Static lang:Resources.SysSet}"
|
|
|
|
x:Name="Sys_Set" Tag=""
|
|
|
|
Style="{DynamicResource RadioButtonStyle}"
|
|
|
|
HorizontalAlignment="Left" Height="40" Margin="200,0,0,0"
|
|
|
|
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC"
|
|
|
|
Checked="RadioButton_Page" Visibility="Hidden"/>
|
|
|
|
<RadioButton Content="{x:Static lang:Resources.ParameterSet}"
|
|
|
|
x:Name="Parameter_Set" Tag=""
|
|
|
|
Style="{DynamicResource RadioButtonStyle}"
|
|
|
|
HorizontalAlignment="Left" Height="40" Margin="400,0,0,0"
|
|
|
|
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC"
|
|
|
|
Checked="RadioButton_Page" Visibility="Hidden"/>
|
|
|
|
<RadioButton Content="{x:Static lang:Resources.Programgroup}"
|
|
|
|
x:Name="Program_group" Tag=""
|
|
|
|
Style="{DynamicResource RadioButtonStyle}"
|
|
|
|
HorizontalAlignment="Left" Height="40" Margin="600,0,0,0"
|
|
|
|
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC"
|
|
|
|
Checked="RadioButton_Page" Visibility="Hidden"/>
|
|
|
|
<RadioButton Content="{x:Static lang:Resources.EngineerSet}"
|
|
|
|
x:Name="Engineer_Set" Tag=""
|
|
|
|
Style="{DynamicResource RadioButtonStyle}"
|
|
|
|
HorizontalAlignment="Left" Height="40" Margin="800,0,0,0"
|
|
|
|
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC"
|
|
|
|
Checked="RadioButton_Page" Visibility="Hidden"/>
|
|
|
|
<RadioButton Content="{x:Static lang:Resources.Previous}"
|
|
|
|
x:Name="Previous" Tag=""
|
|
|
|
Style="{DynamicResource RadioButtonStyle}"
|
|
|
|
HorizontalAlignment="Right" Height="40" Margin="0,0,0,0"
|
|
|
|
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC"
|
|
|
|
Checked="RadioButton_toolbar" GroupName="toolbar" Visibility="Hidden"/>
|
|
|
|
|
|
|
|
<ContentControl x:Name="container" Margin="0,50,0,40"/>
|
|
|
|
|
|
|
|
<Grid Margin="0,0,0,0" VerticalAlignment="Top" Height="50" Background="#FFD2D2D2">
|
|
|
|
<TextBox Text="{x:Static lang:Resources.Temperature}"
|
|
|
|
HorizontalAlignment="Left" Height="20" Margin="0,0,0,0"
|
|
|
|
TextWrapping="Wrap" VerticalAlignment="Top" Width="100" FontSize="12"
|
|
|
|
Background="{x:Null}" BorderBrush="{x:Null}" SelectionBrush="{x:Null}"
|
|
|
|
IsReadOnly="True" IsUndoEnabled="False" MaxLines="1" IsEnabled="False"/>
|
|
|
|
<TextBox Text="{x:Static lang:Resources.WorkOrderNumder}"
|
|
|
|
HorizontalAlignment="Left" Height="20" Margin="100,0,5,0"
|
|
|
|
TextWrapping="Wrap" VerticalAlignment="Top" Width="100" FontSize="12"
|
|
|
|
Background="{x:Null}" BorderBrush="{x:Null}" SelectionBrush="{x:Null}"
|
|
|
|
IsReadOnly="True" IsUndoEnabled="False" MaxLines="1" IsEnabled="False"/>
|
|
|
|
<TextBox Text="{Binding Work_Temp}" HorizontalAlignment="Left" Height="30" Margin="0,20,0,0"
|
|
|
|
TextWrapping="Wrap" VerticalAlignment="Top" Width="100" FontSize="20"
|
|
|
|
Background="{x:Null}" BorderBrush="{x:Null}" SelectionBrush="{x:Null}"
|
|
|
|
IsReadOnly="True" IsUndoEnabled="False" MaxLines="1" IsEnabled="False"/>
|
|
|
|
<TextBox Text="{Binding Work_Numder}" HorizontalAlignment="Left" Height="30" Margin="100,20,5,0"
|
|
|
|
TextWrapping="Wrap" VerticalAlignment="Top" Width="200" FontSize="20"
|
|
|
|
Background="{x:Null}" BorderBrush="{x:Null}" SelectionBrush="{x:Null}"
|
|
|
|
IsReadOnly="True" IsUndoEnabled="False" MaxLines="1" IsEnabled="False"/>
|
|
|
|
<TextBox Text="{Binding Status_Str}" HorizontalAlignment="Center" Height="50" Margin="0,0,0,0"
|
|
|
|
TextWrapping="Wrap" VerticalAlignment="Top" Width="700" FontSize="35"
|
|
|
|
Background="{x:Null}" BorderBrush="{x:Null}" SelectionBrush="{x:Null}"
|
|
|
|
Foreground="{Binding Status_Str_coloer}"
|
|
|
|
IsReadOnly="True" IsUndoEnabled="False" MaxLines="1" IsEnabled="False"/>
|
|
|
|
<TextBox Text="{Binding Sys_Time}" HorizontalAlignment="Right" Height="50" Margin="0,0,5,0"
|
|
|
|
TextWrapping="Wrap" VerticalAlignment="Top" Width="150" FontSize="20"
|
|
|
|
Background="{x:Null}" BorderBrush="{x:Null}" SelectionBrush="{x:Null}"
|
|
|
|
IsReadOnly="True" IsUndoEnabled="False" MaxLines="1" IsEnabled="False"/>
|
|
|
|
|
|
|
|
<StackPanel Margin="0,0,170,0" HorizontalAlignment="Right"
|
|
|
|
Orientation="Horizontal" FlowDirection="RightToLeft">
|
|
|
|
<Image Height="40" Width="40" VerticalAlignment="Center" FlowDirection="LeftToRight">
|
|
|
|
<Image.Style>
|
|
|
|
<Style TargetType="Image">
|
|
|
|
<Setter Property="Source" Value="/Lmage/IconParkStopwatch.png"/>
|
|
|
|
<Style.Triggers>
|
|
|
|
<DataTrigger Binding="{Binding WORK_run}" Value="1">
|
|
|
|
<Setter Property="Source" Value="/Lmage/IconParkPauseOne.png"/>
|
|
|
|
</DataTrigger>
|
|
|
|
<DataTrigger Binding="{Binding WORK_run}" Value="2">
|
|
|
|
<Setter Property="Source" Value="/Lmage/IconParkPlay.png"/>
|
|
|
|
</DataTrigger>
|
|
|
|
</Style.Triggers>
|
|
|
|
</Style>
|
|
|
|
</Image.Style>
|
|
|
|
</Image>
|
|
|
|
<Image Height="40" VerticalAlignment="Center" Width="40" Visibility="{Binding EX_bool}">
|
|
|
|
<Image.Style>
|
|
|
|
<Style TargetType="Image">
|
|
|
|
<Setter Property="Source" Value="/Lmage/IconParkExtend.png"/>
|
|
|
|
<Style.Triggers>
|
|
|
|
<DataTrigger Binding="{Binding EX_str}" Value="309">
|
|
|
|
<Setter Property="Source" Value="/Lmage/IconParkExtendR.png"/>
|
|
|
|
</DataTrigger>
|
|
|
|
<DataTrigger Binding="{Binding EX_str}" Value="308">
|
|
|
|
<Setter Property="Source" Value="/Lmage/IconParkExtendY.png"/>
|
|
|
|
</DataTrigger>
|
|
|
|
</Style.Triggers>
|
|
|
|
</Style>
|
|
|
|
</Image.Style>
|
|
|
|
</Image>
|
|
|
|
<Image Height="40" VerticalAlignment="Center" Width="40" Source="/Lmage/link.png"
|
|
|
|
Visibility="{Binding Link_bool}"/>
|
|
|
|
<Image Height="40" Width="40" Source="/Lmage/IconParkLock.png"
|
|
|
|
Visibility="{Binding Lock_bool}" MouseLeftButtonDown="Image_MouseLeftButtonDown"
|
|
|
|
MouseLeftButtonUp="Image_MouseLeftButtonUp" VerticalAlignment="Center"/>
|
|
|
|
<Image Height="40" Width="40" VerticalAlignment="Center" FlowDirection="LeftToRight"
|
|
|
|
MouseLeftButtonDown="Image_MouseLeftButtonDown_1"
|
|
|
|
MouseLeftButtonUp="Image_MouseLeftButtonUp_1">
|
|
|
|
<Image.Style>
|
|
|
|
<Style TargetType="Image">
|
|
|
|
<Setter Property="Source" Value="/Lmage/IconParkAutoFocus.png"/>
|
|
|
|
<Style.Triggers>
|
|
|
|
<DataTrigger Binding="{Binding AUTO_bool}" Value="false">
|
|
|
|
<Setter Property="Source" Value="/Lmage/IconParkAutoFocus.png"/>
|
|
|
|
</DataTrigger>
|
|
|
|
<DataTrigger Binding="{Binding AUTO_bool}" Value="true">
|
|
|
|
<Setter Property="Source" Value="/Lmage/Hand.png"/>
|
|
|
|
</DataTrigger>
|
|
|
|
</Style.Triggers>
|
|
|
|
</Style>
|
|
|
|
</Image.Style>
|
|
|
|
</Image>
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</Window>
|