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/ParameterSetting.xaml.cs |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/HMI.ParameterManage/ParameterSetting.xaml.cs b/HMI.ParameterManage/ParameterSetting.xaml.cs
index 4039bf7..643bd8b 100644
--- a/HMI.ParameterManage/ParameterSetting.xaml.cs
+++ b/HMI.ParameterManage/ParameterSetting.xaml.cs
@@ -1,6 +1,7 @@
 锘縰sing HMI.Base;
 using HMI.Core.Entity;
 using HMI.Core.Manager;
+using HMI.Core.Setting;
 using HMI.Core.Util;
 using HMI.UI.Util;
 using HMI.Util;
@@ -9,7 +10,6 @@
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.Linq;
-using System.Text.RegularExpressions;
 using System.Windows;
 using System.Windows.Controls;
 
@@ -248,5 +248,21 @@
             Loaded -= UserControl_Loaded;
         }
 
+        public override bool CanActive()
+        {
+            if (ParamSetting.IsOptRequirePassword)
+            {
+                var win = new RequirePasswordWindow
+                {
+                    Owner = Window.GetWindow(this),
+                    WindowStartupLocation = WindowStartupLocation.CenterScreen
+                };
+                return win.ShowDialog() == true;
+            }
+            else
+            {
+                return true;
+            }
+        }
     }
 }

--
Gitblit v1.9.1