From fe2aa4880d5c9fd88088ad0ed81ebaca05629f5f Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 02 十一月 2026 17:59:45 +0800
Subject: [PATCH] feat: 集成CAN驱动/模拟器 + 仪器仪表注册/硬件调试模块

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