From 9d1660270272180cd71147d6ddd53d1382643d2e Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 02 十一月 2026 18:00:14 +0800
Subject: [PATCH] merge: 并入远程 Initial commit 作为历史根节点
---
Plugin.StandardTest/StandardTestUI.xaml | 315 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 315 insertions(+), 0 deletions(-)
diff --git a/Plugin.StandardTest/StandardTestUI.xaml b/Plugin.StandardTest/StandardTestUI.xaml
new file mode 100644
index 0000000..2addbb8
--- /dev/null
+++ b/Plugin.StandardTest/StandardTestUI.xaml
@@ -0,0 +1,315 @@
+锘�<hb:PluginMaskControl x:Class="Plugin.StandardTest.StandardTestUI"
+ 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.StandardTest"
+ mc:Ignorable="d"
+ 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:lvc="clr-namespace:LiveChartsCore.SkiaSharpView.WPF;assembly=LiveChartsCore.SkiaSharpView.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="{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>
+ <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" Margin="5,0,5,0" 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="10">
+ <pu:FormGroup HeaderHeight="Auto" HeaderPadding="0" x:Name="selectModelPanel" Visibility="Collapsed">
+ <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"
+ IsChecked="{Binding EnableMes,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+ Content="{DynamicResource Ts.EnableMes}"
+ />
+ <CheckBox x:Name="CbEnableNGPause"
+ IsChecked="{Binding EnableNGPause,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+ Content="{DynamicResource Ts.EnableNGPause}"
+ />
+ <CheckBox x:Name="CbEnableDebugMode"
+ IsChecked="{Binding EnableDebugMode,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+ Content="{DynamicResource Ts.DebugMode}"/>
+
+ <CheckBox x:Name="CbDisableScanner"
+IsChecked="{Binding DisableScanner,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+Content="{DynamicResource Ts.BlockScanner}"/>
+
+ <CheckBox x:Name="CbEnableSimpleMode"
+IsChecked="{Binding EnableSimpleMode,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+Content="{DynamicResource Ts.EnableSimpleMode}"/>
+
+ <CheckBox x:Name="CbUI_ShowInfoDock"
+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}" />
+ <Label FontSize="20" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Padding="0"
+ Content="{Binding CurrentUserCode}" />
+ </StackPanel>
+
+
+ <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>
+ </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="10">
+ <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" 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.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>
+ <pu:FormGroup Orientation="Vertical"
+ HeaderHeight="Auto"
+ HeaderPadding="0" Header="{DynamicResource Ts.SelectProductModel}">
+ <ComboBox Style="{StaticResource FormComboxStyle}"
+ ItemsSource="{Binding Products}"
+ DisplayMemberPath="Name" SelectedValuePath="Name"
+ SelectedItem="{Binding SelectedProduct}"
+ x:Name="CbProduct"/>
+ </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"
+ x:Name="TbTotal"/>
+ </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"
+ x:Name="TbFail"/>
+ </pu:FormGroup>
+ <pu:FormGroup Header="{DynamicResource Ts.PassRate}" GroupName="Number">
+ <TextBox Style="{StaticResource EditorTextBoxStyle}" IsReadOnly="True"
+ x:Name="TbPassRate"/>
+ </pu:FormGroup>
+ </StackPanel>
+ </GroupBox>
+
+ <GroupBox Grid.Row="3">
+ <lvc:PieChart Grid.Row="3" x:Name="pie" Grid.Column="1" Background="#FFF" BorderThickness="1" BorderBrush="{DynamicResource CommonBoarder}"
+Title="{Binding Chart1Title}"
+TooltipTextPaint="{Binding TooltipTextPaint}"
+Padding="0"
+Margin="2"
+Series="{Binding Chart1_series}"
+LegendPosition="Top">
+ </lvc:PieChart>
+ </GroupBox>
+
+ <!-- <GroupBox Grid.Row="4">
+ <Grid dp:GridHelper.Space="20">
+ <Grid.RowDefinitions>
+ <RowDefinition/>
+ <RowDefinition/>
+ <RowDefinition/>
+ <RowDefinition/>
+ <RowDefinition/>
+ </Grid.RowDefinitions>
+ <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>
+
+ <pu:Switch Grid.Row="3" BoxWidth="120"
+ CheckedBackground="{DynamicResource PrimaryColor}"
+ CheckedBorderBrush="#36abff"
+ ToggleBrush="#030303"
+ CheckedForeground="White"
+ CheckedToggleBrush="#FFFFFF"
+ IsChecked="{Binding SampleStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+ ToggleSize="25" Cursor="Hand" >
+ <pu:Switch.BoxTemplate>
+ <DataTemplate>
+ <TextBlock x:Name="text"
+ Text="{Binding Converter={StaticResource lc},ConverterParameter='Ts.BtnNotSample'}"
+ Padding="30,0"
+ VerticalAlignment="Center" HorizontalAlignment="Center"/>
+ <DataTemplate.Triggers>
+ <DataTrigger Binding="{Binding IsChecked,
+ RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=pu:Switch,AncestorLevel=1}}"
+ Value="True">
+ <Setter TargetName="text" Property="Text"
+ Value="{Binding Converter={StaticResource lc},ConverterParameter='Ts.BtnIsSample'}"/>
+ <Setter TargetName="text" Property="Foreground" Value="{DynamicResource PrimaryColorContract}"/>
+ </DataTrigger>
+ </DataTemplate.Triggers>
+ </DataTemplate>
+ </pu:Switch.BoxTemplate>
+ </pu:Switch>
+ </Grid>
+ </GroupBox> -->
+ </Grid>
+ </Grid>
+ </Grid>
+</hb:PluginMaskControl>
--
Gitblit v1.9.1