From c4a3f8db90530a727ffab77c3bb5bb7d782792bf Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期一, 25 八月 2025 15:50:27 +0800
Subject: [PATCH] 上传代码;
---
Plugin.TestResult/ViewControl.xaml | 99 +++++++++++++------------------------------------
1 files changed, 26 insertions(+), 73 deletions(-)
diff --git a/Plugin.TestResult/ViewControl.xaml b/Plugin.TestResult/ViewControl.xaml
index 8ddfc37..48d2036 100644
--- a/Plugin.TestResult/ViewControl.xaml
+++ b/Plugin.TestResult/ViewControl.xaml
@@ -1,4 +1,4 @@
-锘�<hb:PluginControl x:Class="Plugin.TestResult_WPF.ViewControl"
+锘�<hb:PluginMaskControl x:Class="Plugin.TestResult_WPF.ViewControl"
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"
@@ -11,13 +11,14 @@
xmlns:pu="https://opensource.panuon.com/wpf-ui"
xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI"
mc:Ignorable="d"
+ Style="{StaticResource pluginMaskControl}"
Loaded="UserControl_Loaded"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<local:FontSizeConverter x:Key="FontSizeConverter"/>
<Style TargetType="GroupBox">
<Setter Property="FontSize" Value="{Binding ActualWidth,RelativeSource={RelativeSource AncestorType=UserControl},
-Converter={StaticResource FontSizeConverter}, ConverterParameter='30,1920'}" />
+Converter={StaticResource FontSizeConverter}, ConverterParameter='20,1920'}" />
</Style>
<Style TargetType="Button">
@@ -39,10 +40,12 @@
</Grid.ColumnDefinitions>
<local:TestResultView x:Name="testResultView" Grid.Column="0" Loaded="testResultView_Loaded" />
<StackPanel Grid.Column="1" Background="#FFF">
- <GroupBox Header="浜у搧淇℃伅">
- <ComboBox x:Name="modelSelect" SelectionChanged="modelSelect_SelectionChanged"></ComboBox>
+ <GroupBox Header="{DynamicResource Tr.ProductInfo}">
+ <ComboBox x:Name="modelSelect" Style="{StaticResource FormComboxStyle}"
+ pu:ComboBoxHelper.ClearButtonVisibility="Collapsed"
+ SelectionChanged="modelSelect_SelectionChanged"/>
</GroupBox>
- <GroupBox Header="鐢熶骇缁熻">
+ <GroupBox Header="{DynamicResource Tr.Status}">
<StackPanel>
<Label HorizontalContentAlignment="Center" HorizontalAlignment="Stretch">
<Label.Style>
@@ -53,12 +56,12 @@
<Style.Triggers>
<DataTrigger Binding="{Binding mesStatus}" Value="true">
<Setter Property="Background" Value="Green"/>
- <Setter Property="Content" Value="MES寮�"/>
+ <Setter Property="Content" Value="{DynamicResource Tr.MES_OPEN}"/>
<Setter Property="Foreground" Value="White"/>
</DataTrigger>
<DataTrigger Binding="{Binding mesStatus}" Value="false">
<Setter Property="Background" Value="Red"/>
- <Setter Property="Content" Value="MES鍏�"/>
+ <Setter Property="Content" Value="{DynamicResource Tr.MES_CLOSE}"/>
<Setter Property="Foreground" Value="White"/>
</DataTrigger>
</Style.Triggers>
@@ -92,76 +95,26 @@
</StackPanel>
</GroupBox>
<GroupBox Header="鎿嶄綔">
- <StackPanel>
- <Button x:Name="btnStart" Click="Start_Click">
- <Button.Content>鍚姩</Button.Content>
- <Button.Style>
- <Style TargetType="Button">
- <Setter Property="Background" Value="Green"/>
- <Setter Property="Foreground" Value="White"/>
- <Setter Property="Margin" Value="0,10"/>
- <Setter Property="Padding" Value="5"/>
- <Style.Triggers>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Foreground" Value="Gray"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- </Button.Style>
- </Button>
+ <StackPanel dp:StackPanelHelper.ChildSpace="20">
+ <Button x:Name="btnStart" Click="Start_Click" Style="{StaticResource SuccessButton}"
+ Content="{DynamicResource App.Start}"/>
- <Button x:Name="btnStop" Click="Stop_Click">
- <Button.Content>鍋滄</Button.Content>
- <Button.Style>
- <Style TargetType="Button">
- <Setter Property="Background" Value="Red"/>
- <Setter Property="Foreground" Value="White"/>
- <Setter Property="Margin" Value="0,10"/>
- <Setter Property="Padding" Value="5"/>
- <Style.Triggers>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Foreground" Value="Gray"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- </Button.Style>
- </Button>
+ <Button x:Name="btnStop" Click="Stop_Click" Style="{StaticResource DangerButton}"
+ Content="{DynamicResource App.Stop}"/>
- <Button x:Name="btnScan1" Click="Scan_Click_1">
- <Button.Content>涓�鍖烘壂鐮�</Button.Content>
- <Button.Style>
- <Style TargetType="Button">
- <Setter Property="Margin" Value="0,10"/>
- <Setter Property="Padding" Value="5"/>
- <Style.Triggers>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Foreground" Value="Gray"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- </Button.Style>
- </Button>
+ <Button x:Name="btnClear" Click="BtnClear_Click" Style="{StaticResource PrimaryButton}"
+ Content="{DynamicResource Ts.BtnClearNum}"/>
- <Button x:Name="btnScan2" Click="Scan_Click_2">
- <Button.Content>浜屽尯鎵爜</Button.Content>
- <Button.Style>
- <Style TargetType="Button">
- <Setter Property="Margin" Value="0,10"/>
- <Setter Property="Padding" Value="5"/>
- <Style.Triggers>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Foreground" Value="Gray"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- </Button.Style>
- </Button>
- <!-- <Button Content="璁℃暟娓呴浂"/>
- <Button Content="鎵爜"/>
- <Button Content="涓�鍖烘墜鍔�"/>
- <Button Content="浜屽尯鎵嬪姩"/>-->
+ <Button x:Name="scannerSetting" Click="ScannerSetting_Click" Style="{StaticResource PrimaryButton}"
+ Content="鎵爜鏋缃�"/>
+
+ <!--<Button x:Name="btnScan1" Click="Scan_Click_1" Style="{StaticResource PrimaryButton}"
+ Content="{DynamicResource Tr.Zone1Scan}"/>
+
+ <Button x:Name="btnScan2" Click="Scan_Click_2" Style="{StaticResource PrimaryButton}"
+ Content="{DynamicResource Tr.Zone2Scan}"/>-->
</StackPanel>
</GroupBox>
</StackPanel>
</Grid>
-</hb:PluginControl>
+</hb:PluginMaskControl>
--
Gitblit v1.9.1