From b544d5cccd76735e034c8055918a50927b437474 Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期二, 10 十一月 2026 08:29:04 +0800
Subject: [PATCH] fix: 维护模式重复进入失败与按钮灰死 + Broker 并发验证用例
---
HMI.ParameterManage/ParameterModal.xaml.cs | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/HMI.ParameterManage/ParameterModal.xaml.cs b/HMI.ParameterManage/ParameterModal.xaml.cs
index 854380e..c89f0ea 100644
--- a/HMI.ParameterManage/ParameterModal.xaml.cs
+++ b/HMI.ParameterManage/ParameterModal.xaml.cs
@@ -73,43 +73,48 @@
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;
Data.Type = CbType.Text;
+ Data.IsArray = CbIsArray.IsChecked == true;
Data.Value = GetTargetValue();
Data.Unit = TbUnit.Text;
Data.Description = TbDescription.Text;
Data.ProductName = TbProductName.Text;
- Data.PGroup = TbPGroup.Text;
+ Data.PGroup = CbGroup.Text;
}
return flag;
}
- public bool? Open(string productName, ParameterData data)
+ public bool? Open(string productName, ParameterData data, List<string> groups)
{
Data = data;
TbName.Text = Data.Name;
CbType.SelectedValue = Data.Type;
+ CbIsArray.IsChecked = Data.IsArray;
+ CbGroup.ItemsSource = groups;
UpdateWindow(Data.Type);
UpdateForm(Data);
TbUnit.Text = Data.Unit;
TbProductName.Text = productName;
TbDescription.Text = Data.Description;
- TbPGroup.Text = Data.PGroup;
+ CbGroup.Text = Data.PGroup;
return this.ShowDialog();
}
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