alielie
2026-04-23 ef52fd6fd07508883dce4eb002acda59f0169e59
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using Panuon.WPF.UI;
using System.Collections.Generic;
 
namespace HMI.UI.Util
{
    //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 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);
    //    }
    //}
}