Beispiel #1
0
        public static DesktopWindow GetDesktopWindow(IntPtr windowHandle)
        {
            var knownWindow = knownWindows.SingleOrDefault(w => w.Handle == windowHandle);
            if (knownWindow == null)
            {
                knownWindow = new DesktopWindow(windowHandle);
                knownWindows.Add(knownWindow);
            }

            return knownWindow;
        }
Beispiel #2
0
 public static void RemoveDesktopWindowFromCache(DesktopWindow window)
 {
     knownWindows.Remove(window);
 }