From c4a3f8db90530a727ffab77c3bb5bb7d782792bf Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期一, 25 八月 2025 15:50:27 +0800
Subject: [PATCH] 上传代码;

---
 Plugin.TsExecution/TsExecution.xaml |  305 ++++++++++++++++++++++++++------------------------
 1 files changed, 160 insertions(+), 145 deletions(-)

diff --git a/Plugin.TsExecution/TsExecution.xaml b/Plugin.TsExecution/TsExecution.xaml
index e2dbdfe..07384b6 100644
--- a/Plugin.TsExecution/TsExecution.xaml
+++ b/Plugin.TsExecution/TsExecution.xaml
@@ -11,127 +11,142 @@
          xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI"
          xmlns:ScottPlot="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"
          mc:Ignorable="d" 
+                  xmlns:ui="clr-namespace:HMI.UI;assembly=HMI.UI"
          Padding="10"
          Loaded="PluginControl_Loaded"
          SizeChanged="PluginControl_SizeChanged"
          Background="{StaticResource WorkspaceBackground}"
          d:DesignHeight="450" d:DesignWidth="800">
     <Grid>
-        <Grid.ColumnDefinitions>
-            <ColumnDefinition />
-            <ColumnDefinition Width="Auto"/>
-        </Grid.ColumnDefinitions>
+        <Grid>
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition />
+                <ColumnDefinition Width="Auto"/>
+            </Grid.ColumnDefinitions>
 
-        <Grid.RowDefinitions>
-            <RowDefinition Height="Auto"/>
-            <RowDefinition/>
-        </Grid.RowDefinitions>
-        <WindowsFormsHost x:Name="host" Visibility="Collapsed"></WindowsFormsHost>
-
-        <DockPanel Grid.Row="0" Grid.ColumnSpan="2" LastChildFill="False">
-            <DockPanel.Resources>
-                <Style TargetType="CheckBox">
-                    <Setter Property="FontSize" Value="20"/>
-                    <Setter Property="VerticalContentAlignment" Value="Center"/>
-                </Style>
-            </DockPanel.Resources>
-
-            <StackPanel Orientation="Horizontal" VerticalAlignment="Center" dp:StackPanelHelper.ChildSpace="20">
-                <pu:FormGroup HeaderHeight="Auto" HeaderPadding="0">
-                    <pu:FormGroup.Header>
-                        <TextBlock FontSize="20" Foreground="#000" Text="{DynamicResource Ts.SelectProductModel}"/>
-                    </pu:FormGroup.Header>
-                    <ComboBox Style="{StaticResource FormComboxStyle}" MinWidth="180" ItemsSource="{Binding Products}"
-DisplayMemberPath="Name" SelectedValuePath="Name"
-SelectedItem="{Binding SelectedProduct}" x:Name="CbProduct"/>
-                </pu:FormGroup>
-
-                <CheckBox Grid.Column="1"
-        IsChecked="{Binding EnableMes,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
-        Content="{DynamicResource Ts.EnableMes}"
-        />
-                <CheckBox Grid.Column="2" 
-              IsChecked="{Binding EnableNGPause,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
-              Content="{DynamicResource Ts.EnableNGPause}"
-              />
-                <CheckBox Grid.Column="3" 
-              IsChecked="{Binding EnableDebugMode,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
-              Content="{DynamicResource Ts.DebugMode}"/>
-                <CheckBox Grid.Column="4" 
-IsChecked="{Binding EnableSimpleMode,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
-Content="{DynamicResource Ts.EnableSimpleMode}"/>
-
-                <CheckBox Grid.Column="4" 
-IsChecked="{Binding UI_ShowInfoDock,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
-Content="{DynamicResource Ts.UI_ShowInfoDock}"/>
-
-                <Label FontSize="20" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Padding="0"
-                       Content="{DynamicResource HMI.User.Code}"
-                       />
-                <Label FontSize="20" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Padding="0" 
-                       Content="{Binding CurrentUserCode}" />
-            </StackPanel>
-
-
-
-            <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" dp:StackPanelHelper.ChildSpace="20">
-                <Button Style="{StaticResource SuccessButton}" 
-x:Name="BtnStartSeq" Click="Button_Click" 
-Content="{DynamicResource Ts.BtnStartSeq}"/>
-                <Button Grid.Row="1" Style="{StaticResource DangerButton}" IsEnabled="False"
-x:Name="BtnStopSeq" Click="Button_Click"
-Content="{DynamicResource Ts.BtnStopSeq}"/>
-                <Button Grid.Row="2" Style="{StaticResource PrimaryButton}" 
-x:Name="BtnClearNum" Click="Button_Click"
-Content="{DynamicResource Ts.BtnClearNum}"/>
-                <Button Grid.Row="3"
-x:Name="BtnSample" Click="Button_Click">
-                    <Button.Style>
-                        <Style TargetType="Button" BasedOn="{StaticResource PrimaryButton}">
-                            <Style.Triggers>
-                                <DataTrigger Binding="{Binding SampleStatus}" Value="True">
-                                    <Setter Property="Content" Value="{DynamicResource Ts.BtnIsSample}"/>
-                                </DataTrigger>
-                                <DataTrigger Binding="{Binding SampleStatus}" Value="False">
-                                    <Setter Property="Content" Value="{DynamicResource Ts.BtnNotSample}"/>
-                                </DataTrigger>
-                            </Style.Triggers>
-                        </Style>
-                    </Button.Style>
-                </Button>
-            </StackPanel>
-        </DockPanel>
-
-        <Grid dp:GridHelper.Space="5" Grid.Row="1">
             <Grid.RowDefinitions>
                 <RowDefinition Height="Auto"/>
                 <RowDefinition/>
-                <RowDefinition Height="Auto"/>
             </Grid.RowDefinitions>
+            <WindowsFormsHost x:Name="host" Visibility="Collapsed"></WindowsFormsHost>
+
+            <DockPanel Grid.Row="0" Grid.ColumnSpan="2" LastChildFill="False">
+                <DockPanel.Resources>
+                    <Style TargetType="CheckBox">
+                        <Setter Property="FontSize" Value="20"/>
+                        <Setter Property="VerticalContentAlignment" Value="Center"/>
+                    </Style>
+                </DockPanel.Resources>
+
+                <StackPanel Orientation="Horizontal" VerticalAlignment="Center" dp:StackPanelHelper.ChildSpace="20">
+                    <pu:FormGroup HeaderHeight="Auto" HeaderPadding="0">
+                        <pu:FormGroup.Header>
+                            <TextBlock FontSize="20" Foreground="#000" Text="{DynamicResource Ts.SelectProductModel}"/>
+                        </pu:FormGroup.Header>
+                        <ComboBox Style="{StaticResource FormComboxStyle}" MinWidth="180" ItemsSource="{Binding Products}"
+DisplayMemberPath="Name" SelectedValuePath="Name"
+SelectedItem="{Binding SelectedProduct}" x:Name="CbProduct"/>
+                    </pu:FormGroup>
+
+                    <CheckBox Grid.Column="1"
+        IsChecked="{Binding EnableMes,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+        Content="{DynamicResource Ts.EnableMes}"
+        />
+                    <CheckBox Grid.Column="2" 
+              IsChecked="{Binding EnableNGPause,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+              Content="{DynamicResource Ts.EnableNGPause}"
+              />
+                    <CheckBox Grid.Column="3" 
+              IsChecked="{Binding EnableDebugMode,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+              Content="{DynamicResource Ts.DebugMode}"/>
+                    <CheckBox Grid.Column="4" 
+IsChecked="{Binding EnableSimpleMode,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+Content="{DynamicResource Ts.EnableSimpleMode}"/>
+
+                    <CheckBox Grid.Column="4" 
+IsChecked="{Binding UI_ShowInfoDock,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+Content="{DynamicResource Ts.UI_ShowInfoDock}"/>
+
+                    <StackPanel Orientation="Horizontal" dp:StackPanelHelper.ChildSpace="5">
+                        <Label FontSize="20" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Padding="0"
+                       Content="{DynamicResource HMI.User.Code}" />
+                        <Label FontSize="20" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Padding="0" 
+                       Content="{Binding CurrentUserCode}" />
+                    </StackPanel>
 
 
-            <UniformGrid x:Name="panel" Grid.Row="1" Columns="2" dp:UniformGridHelper.InnerBorder="1"
+                    <StackPanel x:Name="workorderPanel" Visibility="Collapsed" Orientation="Horizontal" dp:StackPanelHelper.ChildSpace="5">
+                        <Label FontSize="20" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Padding="0"
+Content="宸ュ崟鍙�"
+/>
+                        <ui:EditBox FontSize="20" x:Name="workOrderEditor" MinWidth="50"
+                                CanEdit="True"
+                                ShowEmpty="True"
+                                PreEditing="RequirePassword"
+                                Value="{Binding CurrentWorkorder,Mode=TwoWay}"/>
+                    </StackPanel>
+                </StackPanel>
+
+
+
+                <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" dp:StackPanelHelper.ChildSpace="20">
+                    <Button Style="{StaticResource SuccessButton}" 
+x:Name="BtnStartSeq" Click="Button_Click" 
+Content="{DynamicResource Ts.BtnStartSeq}"/>
+                    <Button Grid.Row="1" Style="{StaticResource DangerButton}" IsEnabled="False"
+x:Name="BtnStopSeq" Click="Button_Click"
+Content="{DynamicResource Ts.BtnStopSeq}"/>
+                    <Button Grid.Row="2" Style="{StaticResource PrimaryButton}" 
+x:Name="BtnClearNum" Click="Button_Click"
+Content="{DynamicResource Ts.BtnClearNum}"/>
+                    <Button Grid.Row="3"
+x:Name="BtnSample" Click="Button_Click">
+                        <Button.Style>
+                            <Style TargetType="Button" BasedOn="{StaticResource PrimaryButton}">
+                                <Style.Triggers>
+                                    <DataTrigger Binding="{Binding SampleStatus}" Value="True">
+                                        <Setter Property="Content" Value="{DynamicResource Ts.BtnIsSample}"/>
+                                    </DataTrigger>
+                                    <DataTrigger Binding="{Binding SampleStatus}" Value="False">
+                                        <Setter Property="Content" Value="{DynamicResource Ts.BtnNotSample}"/>
+                                    </DataTrigger>
+                                </Style.Triggers>
+                            </Style>
+                        </Button.Style>
+                    </Button>
+                </StackPanel>
+            </DockPanel>
+
+            <Grid dp:GridHelper.Space="5" Grid.Row="1">
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="Auto"/>
+                    <RowDefinition/>
+                    <RowDefinition Height="Auto"/>
+                </Grid.RowDefinitions>
+
+
+                <UniformGrid x:Name="panel" Grid.Row="1" Columns="2" dp:UniformGridHelper.InnerBorder="1"
                          dp:UniformGridHelper.InnerBorderBrush="#3a3a3a">
 
 
-            </UniformGrid>
-            <Border x:Name="alarmPanel" VerticalAlignment="Bottom" Visibility="Visible" Background="Red"/>
-            <!--<Border Grid.Row="1" x:Name="alarmPanel" Visibility="{Binding AlarmVisiable,Converter={StaticResource vbConverter}}" 
+                </UniformGrid>
+                <!--<Border x:Name="alarmPanel" Height="80" VerticalAlignment="Bottom" Visibility="Visible" Background="Red"/>
+                <Border Grid.Row="1" x:Name="alarmPanel" Visibility="{Binding AlarmVisiable,Converter={StaticResource vbConverter}}" 
                      Height="50" Background="Red"/>-->
-        </Grid>
+            </Grid>
 
 
 
-        <Grid Grid.Row="1" Grid.Column="1" x:Name="detailPanel">
-            <Grid.RowDefinitions>
-                <RowDefinition Height="Auto"/>
-                <RowDefinition Height="Auto"/>
-                <RowDefinition Height="Auto"/>
-                <RowDefinition />
-                <RowDefinition Height="Auto"/>
-            </Grid.RowDefinitions>
+            <Grid Grid.Row="1" Grid.Column="1" x:Name="detailPanel">
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="Auto"/>
+                    <RowDefinition Height="Auto"/>
+                    <RowDefinition Height="Auto"/>
+                    <RowDefinition />
+                    <RowDefinition Height="Auto"/>
+                </Grid.RowDefinitions>
 
-            <!--<GroupBox>
+                <!--<GroupBox>
                 <pu:FormGroup Orientation="Vertical" 
                               HeaderHeight="Auto"
                               HeaderPadding="0" Header="{DynamicResource Ts.SelectProductModel}">
@@ -143,57 +158,57 @@
                 </pu:FormGroup>
             </GroupBox>-->
 
-            <GroupBox Grid.Row="2">
-                <StackPanel>
-                    <pu:FormGroup Header="{DynamicResource Ts.MesStatus}" GroupName="Number">
-                        <Label Grid.Row="1">
-                            <Label.Style>
-                                <Style TargetType="Label">
-                                    <Setter Property="Foreground" Value="#FFF"/>
-                                    <Setter Property="HorizontalContentAlignment" Value="Center"/>
-                                    <Setter Property="FontSize" Value="16"/>
-                                    <Setter Property="FontWeight" Value="Bold"/>
-                                    <Style.Triggers>
-                                        <DataTrigger Binding="{Binding EnableMes}" Value="True">
-                                            <Setter Property="Background" Value="Green"/>
-                                            <Setter Property="Content" Value="{DynamicResource Ts.MesStatus.Enable}"/>
-                                        </DataTrigger>
-                                        <DataTrigger Binding="{Binding EnableMes}" Value="False">
-                                            <Setter Property="Background" Value="Red"/>
-                                            <Setter Property="Content" Value="{DynamicResource Ts.MesStatus.Disable}"/>
-                                        </DataTrigger>
-                                    </Style.Triggers>
-                                </Style>
-                            </Label.Style>
-                        </Label>
-                    </pu:FormGroup>
-                    <pu:FormGroup Header="{DynamicResource Ts.Total}" GroupName="Number">
-                        <TextBox Style="{StaticResource EditorTextBoxStyle}"  IsReadOnly="True"
+                <GroupBox Grid.Row="2">
+                    <StackPanel>
+                        <pu:FormGroup Header="{DynamicResource Ts.MesStatus}" GroupName="Number">
+                            <Label Grid.Row="1">
+                                <Label.Style>
+                                    <Style TargetType="Label">
+                                        <Setter Property="Foreground" Value="#FFF"/>
+                                        <Setter Property="HorizontalContentAlignment" Value="Center"/>
+                                        <Setter Property="FontSize" Value="16"/>
+                                        <Setter Property="FontWeight" Value="Bold"/>
+                                        <Style.Triggers>
+                                            <DataTrigger Binding="{Binding EnableMes}" Value="True">
+                                                <Setter Property="Background" Value="Green"/>
+                                                <Setter Property="Content" Value="{DynamicResource Ts.MesStatus.Enable}"/>
+                                            </DataTrigger>
+                                            <DataTrigger Binding="{Binding EnableMes}" Value="False">
+                                                <Setter Property="Background" Value="Red"/>
+                                                <Setter Property="Content" Value="{DynamicResource Ts.MesStatus.Disable}"/>
+                                            </DataTrigger>
+                                        </Style.Triggers>
+                                    </Style>
+                                </Label.Style>
+                            </Label>
+                        </pu:FormGroup>
+                        <pu:FormGroup Header="{DynamicResource Ts.Total}" GroupName="Number">
+                            <TextBox Style="{StaticResource EditorTextBoxStyle}"  IsReadOnly="True"
                  x:Name="TbTotal"/>
-                    </pu:FormGroup>
-                    <pu:FormGroup Header="{DynamicResource Ts.Pass}" GroupName="Number">
-                        <TextBox Style="{StaticResource EditorTextBoxStyle}" IsReadOnly="True"
+                        </pu:FormGroup>
+                        <pu:FormGroup Header="{DynamicResource Ts.Pass}" GroupName="Number">
+                            <TextBox Style="{StaticResource EditorTextBoxStyle}" IsReadOnly="True"
                  x:Name="TbPass"/>
-                    </pu:FormGroup>
-                    <pu:FormGroup Header="{DynamicResource Ts.Fail}" GroupName="Number">
-                        <TextBox Style="{StaticResource EditorTextBoxStyle}" IsReadOnly="True"
+                        </pu:FormGroup>
+                        <pu:FormGroup Header="{DynamicResource Ts.Fail}" GroupName="Number">
+                            <TextBox Style="{StaticResource EditorTextBoxStyle}" IsReadOnly="True"
                  x:Name="TbFail"/>
-                    </pu:FormGroup>
-                    <pu:FormGroup Header="{DynamicResource Ts.PassRate}" GroupName="Number">
-                        <TextBox Style="{StaticResource EditorTextBoxStyle}" IsReadOnly="True"
+                        </pu:FormGroup>
+                        <pu:FormGroup Header="{DynamicResource Ts.PassRate}" GroupName="Number">
+                            <TextBox Style="{StaticResource EditorTextBoxStyle}" IsReadOnly="True"
                  x:Name="TbPassRate"/>
-                    </pu:FormGroup>
-                </StackPanel>
-            </GroupBox>
+                        </pu:FormGroup>
+                    </StackPanel>
+                </GroupBox>
 
-            <GroupBox Grid.Row="3">
-                <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
-                    <ScottPlot:WpfPlot Background="Transparent" x:Name="pieChart" MinWidth="300" MinHeight="300"
+                <GroupBox Grid.Row="3">
+                    <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
+                        <ScottPlot:WpfPlot Background="Transparent" x:Name="pieChart" MinWidth="300" MinHeight="300"
                    SizeChanged="PluginControl_SizeChanged"/>
-                </ScrollViewer>
-            </GroupBox>
+                    </ScrollViewer>
+                </GroupBox>
 
-            <!-- <GroupBox Grid.Row="4">
+                <!-- <GroupBox Grid.Row="4">
                 <Grid dp:GridHelper.Space="20">
                     <Grid.RowDefinitions>
                         <RowDefinition/>
@@ -255,7 +270,7 @@
                     </pu:Switch>
                 </Grid>
         </GroupBox> -->
+            </Grid>
         </Grid>
-
     </Grid>
 </hb:PluginControl>

--
Gitblit v1.9.1