From 771a0e7b6b1276087515bbe94de28358cb92963b Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期四, 04 六月 2026 10:32:27 +0800
Subject: [PATCH] 优化老化;

---
 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