private void searchWindows(SearchResultForm srf, SystemWindow sw, bool className) { srf.AddPossibleResult(new WindowData(this, sw), className ? sw.ClassName : sw.Title); foreach (SystemWindow cw in sw.AllChildWindows) { searchWindows(srf, cw, className); } }
private void searchOrphanWindows(SearchResultForm srf, SystemWindow sw) { string stolenOrphan = ""; if (sw.ParentSymmetric != null && sw.ParentSymmetric.HWnd != IntPtr.Zero) { if (sw.ParentSymmetric.Process.Id != sw.Process.Id) { stolenOrphan = "Stolen"; } } if (sw.Process.Id == 0) { stolenOrphan = "Orphan"; } srf.AddPossibleResult(new WindowData(this, sw), stolenOrphan); foreach (SystemWindow cw in sw.AllChildWindows) { searchOrphanWindows(srf, cw); } }
private void searchOrphanWindows(SearchResultForm srf, SystemWindow sw) { string stolenOrphan = ""; if (sw.ParentSymmetric != null && sw.ParentSymmetric.HWnd != IntPtr.Zero) { if (sw.ParentSymmetric.Process.Id != sw.Process.Id) { stolenOrphan = "Stolen"; } } if (sw.Process.Id == 0) stolenOrphan = "Orphan"; srf.AddPossibleResult(new WindowData(this, sw), stolenOrphan); foreach (SystemWindow cw in sw.AllChildWindows) { searchOrphanWindows(srf, cw); } }