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.UI/Util/MaskHolder.cs |   66 +++++++++++++++-----------------
 1 files changed, 31 insertions(+), 35 deletions(-)

diff --git a/HMI.UI/Util/MaskHolder.cs b/HMI.UI/Util/MaskHolder.cs
index 7303b97..0d57b18 100644
--- a/HMI.UI/Util/MaskHolder.cs
+++ b/HMI.UI/Util/MaskHolder.cs
@@ -1,43 +1,39 @@
 锘縰sing Panuon.WPF.UI;
-using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 
 namespace HMI.UI.Util
 {
-    public class MaskHolder
-    {
-        private static Dictionary<WindowX, List<object>> Container;
-        private static Dictionary<object, WindowX> ReverseContainer;
+    //public class MaskHolder
+    //{
+    //    private static Dictionary<WindowX, List<object>> Container;
+    //    private static Dictionary<object, WindowX> ReverseContainer;
 
-        public static void AddMask(WindowX window, object source)
-        {
-            if (Container.ContainsKey(window))
-            {
-                Container[window].Add(source);
-            }
-            else
-            {
-                Container[window] = new List<object> { source };
-            }
-            ReverseContainer.Add(source, window);
-            window.IsMaskVisible = true;
-        }
+    //    public static void AddMask(WindowX window, object source)
+    //    {
+    //        if (Container.ContainsKey(window))
+    //        {
+    //            Container[window].Add(source);
+    //        }
+    //        else
+    //        {
+    //            Container[window] = new List<object> { source };
+    //        }
+    //        ReverseContainer.Add(source, window);
+    //        window.IsMaskVisible = true;
+    //    }
 
-        public static void RemoveMask(object source)
-        {
-            if (!ReverseContainer.ContainsKey(source))
-            {
-                return;
-            }
-            WindowX win = ReverseContainer[source];
-            if (!Container.ContainsKey(win) || Container[win] == null || Container[win].Count <= 0)
-            {
-                win.IsMaskVisible = false;
-            }
-            ReverseContainer.Remove(source);
-        }
-    }
+    //    public static void RemoveMask(object source)
+    //    {
+    //        if (!ReverseContainer.ContainsKey(source))
+    //        {
+    //            return;
+    //        }
+    //        WindowX win = ReverseContainer[source];
+    //        if (!Container.ContainsKey(win) || Container[win] == null || Container[win].Count <= 0)
+    //        {
+    //            win.IsMaskVisible = false;
+    //        }
+    //        ReverseContainer.Remove(source);
+    //    }
+    //}
 }

--
Gitblit v1.9.1