From 2e54b439c64e0adbb7e010243c1f33aa5fc5f503 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期二, 11 三月 2025 14:08:57 +0800
Subject: [PATCH] 完善程序; Merge branch 'master' of http://58.211.88.246:3600/r/WPF/WPFProject
---
Plugin.TestResult/Scanner.xaml | 63 ++++++++++++++++++++-----------
1 files changed, 41 insertions(+), 22 deletions(-)
diff --git a/Plugin.TestResult/Scanner.xaml b/Plugin.TestResult/Scanner.xaml
index 3a7c2ad..a8a13e6 100644
--- a/Plugin.TestResult/Scanner.xaml
+++ b/Plugin.TestResult/Scanner.xaml
@@ -1,4 +1,4 @@
-锘�<Window x:Class="Plugin.TestResult_WPF.Scanner"
+锘�<pu:WindowX x:Class="Plugin.TestResult_WPF.Scanner"
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"
@@ -7,48 +7,67 @@
WindowStartupLocation="CenterScreen"
Closing="Window_Closing"
mc:Ignorable="d"
- Title="{Binding title}" Height="450" Width="800">
+ Style="{StaticResource ModalWindow}"
+
+ 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:cc="clr-namespace:HMI.Core;assembly=HMI.Core"
+ InteropOwnersMask="False"
+
+ pu:WindowXModalDialog.Buttons="{x:Null}"
+ Title="{Binding title}" Height="300" Width="600">
<Window.Resources>
<local:FontSizeConverter x:Key="FontSizeConverter"/>
<Style TargetType="Label">
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="FontSize" Value="{Binding ActualWidth,RelativeSource={RelativeSource AncestorType=Window},
-Converter={StaticResource FontSizeConverter}, ConverterParameter='100,1920'}" />
+Converter={StaticResource FontSizeConverter}, ConverterParameter='80,1920'}" />
</Style>
<Style TargetType="TextBox">
<Setter Property="FontSize" Value="{Binding ActualWidth,RelativeSource={RelativeSource AncestorType=Window},
Converter={StaticResource FontSizeConverter}, ConverterParameter='100,1920'}" />
</Style>
- <Style TargetType="Button">
+ <Style TargetType="Button" BasedOn="{StaticResource PrimaryButton}">
<Setter Property="FontSize" Value="{Binding ActualWidth,RelativeSource={RelativeSource AncestorType=Window},
Converter={StaticResource FontSizeConverter}, ConverterParameter='100,1920'}" />
</Style>
</Window.Resources>
- <Grid>
+ <Grid Margin="20">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition />
- <!--<RowDefinition />-->
- <RowDefinition />
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" HorizontalContentAlignment="Center" HorizontalAlignment="Stretch">璇蜂緷娆℃壂涓嬪垪鏉$爜</Label>
- <Label Grid.Row="1" Grid.Column="0">鍌ㄤ綅鏉$爜</Label>
- <!--<Label Grid.Row="2" Grid.Column="0">澶瑰叿鏉$爜</Label>-->
- <Label Grid.Row="2" Grid.Column="0">浜у搧鏉$爜</Label>
- <TextBox Grid.Row="1" Grid.Column="1" x:Name="positionText" TextWrapping="NoWrap"/>
- <!--<TextBox Grid.Row="2" Grid.Column="1"/>-->
- <TextBox Grid.Row="2" Grid.Column="1" x:Name="snrText"/>
+ <Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" Padding="0"
+ Content="{Binding Converter={StaticResource lc},ConverterParameter='Tr.PleaseScanSnr'}"
+ Margin="0,0,0,20"
+ />
+ <StackPanel Grid.Row="1">
+ <pu:FormGroup
+ dp:FormGroupHelper.IsRequired="True"
+ Header="{Binding Converter={StaticResource lc},ConverterParameter='Tr.PositionSnr'}">
+ <TextBox Style="{StaticResource EditorTextBoxStyle}" x:Name="positionText" TextWrapping="NoWrap"/>
+ </pu:FormGroup>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2">
- <Button Margin="20" Padding="15" Click="Con_Click">缁х画鎵弿</Button>
- <Button Margin="20" Padding="15" Click="Ok_Click">鎵弿瀹屾垚</Button>
+ <pu:FormGroup
+ dp:FormGroupHelper.IsRequired="True"
+ Header="{Binding Converter={StaticResource lc},ConverterParameter='Tr.ProductSnr'}">
+ <TextBox Style="{StaticResource EditorTextBoxStyle}" x:Name="snrText" TextWrapping="NoWrap"/>
+ </pu:FormGroup>
+ </StackPanel>
+
+ <StackPanel Style="{StaticResource ButtonGroup}"
+ dp:StackPanelHelper.ChildSpace="50"
+ HorizontalAlignment="Center" Grid.Row="2">
+ <Button Click="Con_Click"
+ Content="{Binding Converter={StaticResource lc},ConverterParameter='Tr.ContinueScan'}"/>
+ <Button Click="Ok_Click"
+ Content="{Binding Converter={StaticResource lc},ConverterParameter='Tr.FinishScan'}"/>
</StackPanel>
</Grid>
-</Window>
+</pu:WindowX>
--
Gitblit v1.9.1