From ef52fd6fd07508883dce4eb002acda59f0169e59 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期四, 23 四月 2026 10:19:33 +0800
Subject: [PATCH] 优化;

---
 HMI.Base/PluginMaskControl.cs |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/HMI.Base/PluginMaskControl.cs b/HMI.Base/PluginMaskControl.cs
index 21be635..0835e19 100644
--- a/HMI.Base/PluginMaskControl.cs
+++ b/HMI.Base/PluginMaskControl.cs
@@ -1,6 +1,7 @@
 锘縰sing System;
 using System.ComponentModel;
 using System.Runtime.CompilerServices;
+using System.Windows;
 using System.Windows.Controls;
 using HMI.Core.Api;
 using HMI.UI;
@@ -8,7 +9,11 @@
 
 namespace HMI.Base
 {
-    public class PluginMaskControl : UserControl, IPlugin, INotifyPropertyChanged
+
+    /// <summary>
+    /// PluginMaskControl.xaml 鐨勪氦浜掗�昏緫
+    /// </summary>
+    public partial class PluginMaskControl : UserControl, IPlugin, INotifyPropertyChanged
     {
         #region ...
         public event PropertyChangedEventHandler PropertyChanged;
@@ -28,6 +33,12 @@
             }
         }
         #endregion
+
+        static PluginMaskControl()
+        {
+            DefaultStyleKeyProperty.OverrideMetadata(typeof(PluginMaskControl),
+                new FrameworkPropertyMetadata(typeof(PluginMaskControl)));
+        }
 
         protected ILog log;
         protected string BaseFolder;
@@ -85,5 +96,15 @@
                 mask.ShowMask(this, action, reject, title, content);
             }
         }
+
+        public virtual bool CanActive()
+        {
+            return true;
+        }
+
+        public virtual bool CanDeActive()
+        {
+            return true;
+        }
     }
 }

--
Gitblit v1.9.1