Exemplo n.º 1
0
        private bool RefreshCallback(IntPtr hwnd, Action <WindowHandle> addHandler)
        {
            if (BlacklistedWindows.Contains(hwnd))
            {
                return(true);
            }

            if (SkipNotVisibleWindows && !WindowManagerMethods.IsWindowVisible(hwnd))
            {
                return(true);
            }

            var handle = new WindowHandle(hwnd);

            return(InspectWindow(handle, addHandler));
        }
Exemplo n.º 2
0
        private bool RefreshCallback(IntPtr hwnd, IntPtr lParam)
        {
            //Skip owner
            if (hwnd == OwnerHandle)
            {
                return(true);
            }

            if (SkipNotVisibleWindows && !WindowManagerMethods.IsWindowVisible(hwnd))
            {
                return(true);
            }

            //Extract basic properties
            string title  = WindowMethods.GetWindowText(hwnd);
            var    handle = new WindowHandle(hwnd, title);

            return(InspectWindow(handle));
        }
Exemplo n.º 3
0
        private bool LocatingWndProc(IntPtr handle, IntPtr lParam)
        {
            //Skip non visible windows
            if (!WindowManagerMethods.IsWindowVisible(handle))
            {
                return(true);
            }

            //Class name check
            string cl = WindowMethods.GetWindowClass(handle);

            System.Diagnostics.Trace.WriteLine(string.Format("Child window, class {0}", cl));

            if (_pluginClassNames.Contains(cl))
            {
                //Found plugin window, stop now
                _selectedHandle = new WindowHandle(handle);
                return(false);
            }

            return(true);
        }