Пример #1
0
 internal static bool HasAccessibilityObjectsOrBelow(WindowCache wc, MainForm mf, Process proc, ProcessThread thread, SystemWindow sw, bool visibleOnly)
 {
     if (!mf.DisplayAccObjs)
     {
         return(false);
     }
     if (sw != null)
     {
         return(true);
     }
     else
     {
         IList <SystemWindow> windows;
         if (thread != null)
         {
             windows = wc.WindowsByThread(thread, visibleOnly);
         }
         else if (proc != null)
         {
             windows = wc.WindowsByProcess(proc, visibleOnly);
         }
         else
         {
             return(true);
         }
         return(windows.Count > 0);
     }
 }
Пример #2
0
        private static IList <TreeNodeData> GetWindows(WindowCache wc, MainForm mf, Process proc, ProcessThread thread, bool visibleOnly)
        {
            IList <SystemWindow> windows;

            if (thread != null)
            {
                windows = wc.WindowsByThread(thread, visibleOnly);
            }
            else if (proc != null)
            {
                windows = wc.WindowsByProcess(proc, visibleOnly);
            }
            else if (visibleOnly)
            {
                windows = wc.AllVisibleWindows;
            }
            else
            {
                windows = wc.AllWindows;
            }
            List <TreeNodeData> result = new List <TreeNodeData>();

            foreach (SystemWindow w in windows)
            {
                result.Add(new WindowData(mf, w));
            }
            return(result);
        }
Пример #3
0
 internal static bool HasWindowsOrBelow(WindowCache wc, MainForm mf, Process proc, ProcessThread thread, bool visibleOnly)
 {
     if (mf.DisplayWindows > 0)
     {
         if (proc == null)
         {
             return(true);
         }
         if (thread == null)
         {
             return(wc.WindowsByProcess(proc, visibleOnly).Count > 0);
         }
         return(wc.WindowsByThread(thread, visibleOnly).Count > 0);
     }
     else
     {
         return(AccessibilityData.HasAccessibilityObjectsOrBelow(wc, mf, proc, thread, null, visibleOnly));
     }
 }
Пример #4
0
        public static IList <TreeNodeData> GetAccessibilityObjectsOrBelow(WindowCache wc, MainForm mf, Process proc, ProcessThread thread, SystemWindow sw, bool visibleOnly)
        {
            List <TreeNodeData> result = new List <TreeNodeData>();

            if (mf.DisplayAccObjs)
            {
                if (sw != null)
                {
                    AddAccessibleObjects(result, mf, sw, visibleOnly);
                }
                else
                {
                    IList <SystemWindow> windows;
                    if (thread != null)
                    {
                        windows = wc.WindowsByThread(thread, visibleOnly);
                    }
                    else if (proc != null)
                    {
                        windows = wc.WindowsByProcess(proc, visibleOnly);
                    }
                    else if (visibleOnly)
                    {
                        windows = wc.AllVisibleWindows;
                    }
                    else
                    {
                        windows = wc.AllWindows;
                    }
                    foreach (SystemWindow w in windows)
                    {
                        AddAccessibleObjects(result, mf, w, visibleOnly);
                    }
                }
            }
            return(result);
        }