Exemple #1
0
 private bool HasChildProcesses(WindowCache wc, MainForm mf, bool visibleOnly)
 {
     if (visibleOnly)
     {
         foreach (Process p in wc.ChildProcesses(this.process.Id))
         {
             if (wc.IsProcessVisible(p))
             {
                 return(true);
             }
         }
         return(false);
     }
     else
     {
         return(wc.ChildProcesses(this.process.Id).Count > 0);
     }
 }
Exemple #2
0
        private static IList <TreeNodeData> GetChildProcesses(WindowCache wc, MainForm mf, int pid, bool visibleOnly)
        {
            List <TreeNodeData> result = new List <TreeNodeData>();

            foreach (Process p in wc.ChildProcesses(pid))
            {
                if (!visibleOnly || wc.IsProcessVisible(p))
                {
                    result.Add(new ProcessData(mf, p));
                }
            }
            sortProcesses(result);
            return(result);
        }