From b544d5cccd76735e034c8055918a50927b437474 Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期二, 10 十一月 2026 08:29:04 +0800
Subject: [PATCH] fix: 维护模式重复进入失败与按钮灰死 + Broker 并发验证用例
---
Plugin.TsExecution/TsExecution.xaml | 80 +++++++++++++++++++++++++++------------
1 files changed, 55 insertions(+), 25 deletions(-)
diff --git a/Plugin.TsExecution/TsExecution.xaml b/Plugin.TsExecution/TsExecution.xaml
index 72fd7e1..ee28281 100644
--- a/Plugin.TsExecution/TsExecution.xaml
+++ b/Plugin.TsExecution/TsExecution.xaml
@@ -1,22 +1,32 @@
-锘�<hb:PluginControl x:Class="Plugin.TsExecution.TsExecution"
+锘�<hb:PluginMaskControl x:Class="Plugin.TsExecution.TsExecution"
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:Plugin.TsExecution"
- xmlns:hb="clr-namespace:HMI.Base;assembly=HMI.Base"
- xmlns:uic="clr-namespace:HMI.UI.Converter;assembly=HMI.UI"
- xmlns:pw="https://opensource.panuon.com/wpf"
- xmlns:pu="https://opensource.panuon.com/wpf-ui"
- 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"
+ xmlns:hb="clr-namespace:HMI.Base;assembly=HMI.Base"
+ xmlns:uic="clr-namespace:HMI.UI.Converter;assembly=HMI.UI"
+ xmlns:pw="https://opensource.panuon.com/wpf"
+ xmlns:pu="https://opensource.panuon.com/wpf-ui"
+ xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI"
+ xmlns:ScottPlot="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"
+ xmlns:sys="clr-namespace:System;assembly=mscorlib"
+ xmlns:ui="clr-namespace:HMI.UI;assembly=HMI.UI"
+ Padding="2,5,2,5"
Loaded="PluginControl_Loaded"
SizeChanged="PluginControl_SizeChanged"
- Background="{StaticResource WorkspaceBackground}"
+ Background="{DynamicResource WorkspaceBackground}"
d:DesignHeight="450" d:DesignWidth="800">
+ <UserControl.Resources>
+ <ResourceDictionary>
+ <sys:Double x:Key="tableFontSize">20</sys:Double>
+ <Style x:Key="FormComboxStyle" TargetType="ComboBox" BasedOn="{StaticResource FormComboxStyle}">
+ <Setter Property="Height" Value="28"/>
+ </Style>
+ </ResourceDictionary>
+ </UserControl.Resources>
+
<Grid>
<Grid>
<Grid.ColumnDefinitions>
@@ -30,7 +40,7 @@
</Grid.RowDefinitions>
<WindowsFormsHost x:Name="host" Visibility="Collapsed"></WindowsFormsHost>
- <DockPanel Grid.Row="0" Grid.ColumnSpan="2" LastChildFill="False">
+ <DockPanel Grid.Row="0" Grid.ColumnSpan="2" Margin="5,0,5,0" LastChildFill="False">
<DockPanel.Resources>
<Style TargetType="CheckBox">
<Setter Property="FontSize" Value="20"/>
@@ -38,14 +48,21 @@
</Style>
</DockPanel.Resources>
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center" dp:StackPanelHelper.ChildSpace="20">
- <pu:FormGroup HeaderHeight="Auto" HeaderPadding="0">
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" dp:StackPanelHelper.ChildSpace="10">
+ <pu:FormGroup HeaderHeight="Auto" HeaderPadding="0" x:Name="selectModelPanel">
<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>
+
+ <pu:FormGroup HeaderHeight="Auto" HeaderPadding="0" x:Name="autoModelPanel" Visibility="Collapsed">
+ <pu:FormGroup.Header>
+ <TextBlock FontSize="20" Foreground="#000" Text="褰撳墠浜у搧"/>
+ </pu:FormGroup.Header>
+ <TextBox Style="{StaticResource EditorTextBoxStyle}" IsReadOnly="True" MinWidth="180" Text="{Binding CurrentProductModel}"/>
</pu:FormGroup>
<CheckBox x:Name="CbEnableMes"
@@ -62,7 +79,7 @@
<CheckBox x:Name="CbDisableScanner"
IsChecked="{Binding DisableScanner,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
-Content="灞忚斀鎵爜"/>
+Content="{DynamicResource Ts.BlockScanner}"/>
<CheckBox x:Name="CbEnableSimpleMode"
IsChecked="{Binding EnableSimpleMode,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
@@ -72,6 +89,10 @@
IsChecked="{Binding UI_ShowInfoDock,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
Content="{DynamicResource Ts.UI_ShowInfoDock}"/>
+ <CheckBox FontSize="20" x:Name="Cb_ManualDebug" Visibility="Collapsed"
+ IsChecked="{Binding EnableManualDebug,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+ VerticalContentAlignment="Center" Content="鎵嬪姩璋冭瘯" />
+
<StackPanel Orientation="Horizontal" dp:StackPanelHelper.ChildSpace="5">
<Label FontSize="20" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Padding="0"
Content="{DynamicResource HMI.User.Code}" />
@@ -80,21 +101,30 @@
</StackPanel>
- <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"
+ <Label x:Name="workorderPanel" VerticalContentAlignment="Center" Visibility="Collapsed" Padding="0" Margin="0" MouseDoubleClick="Label_MouseDoubleClick">
+ <StackPanel Orientation="Horizontal"
+ dp:StackPanelHelper.ChildSpace="5">
+ <Label FontSize="20" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Padding="0"
+ Content="{DynamicResource Ts.WorkOrder}"/>
+ <TextBlock x:Name="TbWorkOrder" FontSize="20" MinWidth="50" Text="{Binding CurrentWorkorder}"/>
+ <!--<ui:EditBox FontSize="20" x:Name="workOrderEditor" MinWidth="50"
CanEdit="True"
ShowEmpty="True"
PreEditing="RequirePassword"
- Value="{Binding CurrentWorkorder,Mode=TwoWay}"/>
- </StackPanel>
+ Value="{Binding CurrentWorkorder,Mode=TwoWay}"/>-->
+ </StackPanel>
+ </Label>
+
+ <!--<StackPanel Orientation="Horizontal" dp:StackPanelHelper.ChildSpace="5">
+ <Label FontSize="20" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Padding="0" Content="瀛椾綋澶у皬"/>
+ <ComboBox Name="CbFontSize" Width="60" ItemsSource="{Binding FontSizeSource}"
+ SelectionChanged="CbFontSize_SelectionChanged"/>
+ </StackPanel>-->
</StackPanel>
- <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" dp:StackPanelHelper.ChildSpace="20">
+ <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" dp:StackPanelHelper.ChildSpace="10">
<Button Style="{StaticResource SuccessButton}"
x:Name="BtnStartSeq" Click="Button_Click"
Content="{DynamicResource Ts.BtnStartSeq}"/>
@@ -248,7 +278,7 @@
</Button>
<pu:Switch Grid.Row="3" BoxWidth="120"
- CheckedBackground="{StaticResource PrimaryColor}"
+ CheckedBackground="{DynamicResource PrimaryColor}"
CheckedBorderBrush="#36abff"
ToggleBrush="#030303"
CheckedForeground="White"
@@ -267,7 +297,7 @@
Value="True">
<Setter TargetName="text" Property="Text"
Value="{Binding Converter={StaticResource lc},ConverterParameter='Ts.BtnIsSample'}"/>
- <Setter TargetName="text" Property="Foreground" Value="{StaticResource PrimaryColorContract}"/>
+ <Setter TargetName="text" Property="Foreground" Value="{DynamicResource PrimaryColorContract}"/>
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
@@ -278,4 +308,4 @@
</Grid>
</Grid>
</Grid>
-</hb:PluginControl>
+</hb:PluginMaskControl>
--
Gitblit v1.9.1