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/ParameterModal.xaml.cs | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/HMI.ParameterManage/ParameterModal.xaml.cs b/HMI.ParameterManage/ParameterModal.xaml.cs
index ab9f77a..d7553d4 100644
--- a/HMI.ParameterManage/ParameterModal.xaml.cs
+++ b/HMI.ParameterManage/ParameterModal.xaml.cs
@@ -73,9 +73,10 @@
private bool ValidateForm()
{
- bool flag = FormGroupHelper.ValidateForm(formPanel, new Dictionary<string, object> {
+ var cache = new Dictionary<string, object> {
{ "FgValue",GetTargetValue()}
- });
+ };
+ bool flag = FormGroupHelper.ValidateForm(formPanel, cache);
if (flag)
{
Data.Name = TbName.Text;
@@ -106,11 +107,12 @@
private string GetTargetValue()
{
- if (CbType.Text == "Int" || Data.Type == "Double")
+ var type = CbType.Text;
+ if (type == "Int" || type == "Double")
{
return NiNumberValue.Text;
}
- else if (CbType.Text == "Bool")
+ else if (type == "Bool")
{
return CbBoolValue.Text;
}
--
Gitblit v1.9.1