From 12e606635c42ea20f4b7c2bdda5204237a4b4c96 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期一, 02 三月 2026 16:14:49 +0800
Subject: [PATCH] 优化

---
 HMI.ParameterManage/ProductModal.xaml |   40 +++++++++++++---------------------------
 1 files changed, 13 insertions(+), 27 deletions(-)

diff --git a/HMI.ParameterManage/ProductModal.xaml b/HMI.ParameterManage/ProductModal.xaml
index dd216e1..c91057b 100644
--- a/HMI.ParameterManage/ProductModal.xaml
+++ b/HMI.ParameterManage/ProductModal.xaml
@@ -7,6 +7,7 @@
             xmlns:pw="https://opensource.panuon.com/wpf"
             xmlns:pu="https://opensource.panuon.com/wpf-ui"
             xmlns:uic="clr-namespace:HMI.UI.Converter;assembly=HMI.UI"
+            xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI"
             mc:Ignorable="d"
             Title="Form"
             SizeToContent="Height"
@@ -15,42 +16,27 @@
             BorderBrush="#3E3E45"
             BorderThickness="1"
             Foreground="Black"
-            pu:WindowXCaption.Background="{StaticResource PrimaryColor}"
-            pu:WindowXModalDialog.ButtonStyle="{StaticResource ModalButton}"
-            pu:WindowXCaption.Foreground="#FFF"
-            pu:WindowXCaption.Buttons="Close"
-            pu:WindowXModalDialog.Buttons="OKCancel"
-            pu:WindowXModalDialog.CancelButtonContent="鍙栨秷"
-            pu:WindowXModalDialog.OKButtonContent="淇濆瓨"
-            pu:WindowXModalDialog.ButtonPanelMargin="0,30,10,10">
-    <Window.Resources>
-        <ResourceDictionary>
-            <ResourceDictionary.MergedDictionaries>
-                <pu:StyleDictionary Includes="TreeView" />
-                <ResourceDictionary Source="/HMI.UI;component/Style/PanuonResource.xaml"/>
-                <ResourceDictionary Source="/HMI.UI;component/Resources/Font/Font.xaml"/>
-                <ResourceDictionary Source="/HMI.UI;component/Style/Colors.xaml"/>
-            </ResourceDictionary.MergedDictionaries>
-            <uic:PathImageConverter x:Key="path2Image"/>
-            <uic:DataGridRowNumberConverter x:Key="rowNumber"/>
-        </ResourceDictionary>
-    </Window.Resources>
-
+            Style="{StaticResource ModalWindow}">
     <Grid Margin="10">
-        <StackPanel>
+        <StackPanel x:Name="formPanel">
             <pu:FormGroup x:Name="FgName" Style="{StaticResource RequiredInputFormGroupStyle}" 
-                              Header="浜у搧鍚嶇О" GroupName="MyFormGroup">
+                              Header="{DynamicResource Pm.Product.Name}" GroupName="MyFormGroup"
+                          dp:FormGroupHelper.IsRequired="True"
+                          dp:FormGroupHelper.ValidateMethod="ValidateName"
+                          >
                 <TextBox x:Name="TbName" Style="{StaticResource EditorTextBoxStyle}" />
             </pu:FormGroup>
 
-            <pu:FormGroup x:Name="FgIsMaster" Style="{StaticResource InputFormGroupStyle}" 
-                          Header="鏄惁鏍蜂欢" GroupName="MyFormGroup">
+            <pu:FormGroup x:Name="FgIsMaster" Style="{StaticResource InputFormGroupStyle}" Visibility="Collapsed" 
+                          Header="{DynamicResource Pm.Product.IsSample}" GroupName="MyFormGroup">
                 <CheckBox x:Name="TbIsMaster"  />
             </pu:FormGroup>
 
             <pu:FormGroup x:Name="FgParentId" Style="{StaticResource InputFormGroupStyle}" 
-                  Header="缁ф壙" GroupName="MyFormGroup">
-                <TextBox x:Name="TbParentId" Style="{StaticResource EditorTextBoxStyle}" />
+                  Header="{DynamicResource Pm.Product.Extend}" GroupName="MyFormGroup">
+                <!--<TextBox x:Name="TbParentId" Style="{StaticResource EditorTextBoxStyle}" />-->
+                <ComboBox x:Name="CbParent" Style="{StaticResource FormComboxStyle}"
+                          pu:ComboBoxHelper.ClearButtonVisibility="Visible"/>
             </pu:FormGroup>
         </StackPanel>
     </Grid>

--
Gitblit v1.9.1