alielie
2026-03-02 12e606635c42ea20f4b7c2bdda5204237a4b4c96
HMI.ParameterManage/ParameterSetting.xaml.cs
@@ -1,6 +1,7 @@
using 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;
            }
        }
    }
}