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 stolenOrphanWindowsToolStripMenuItem_Click(object sender, EventArgs e) { SearchResultForm srf = new SearchResultForm(this, "Stolen/Orphan Windows", "{.}"); foreach (SystemWindow sw in SystemWindow.AllToplevelWindows) { searchOrphanWindows(srf, sw); } srf.Finish(); }
private void windowsByTitleToolStripMenuItem_Click(object sender, EventArgs e) { string prefix = InputBox.Show(this, "Find windows by title starting with:", ""); if (prefix == null) { return; } SearchResultForm srf = new SearchResultForm(this, "Windows by title starting with \"" + prefix + "\"", prefix); foreach (SystemWindow sw in SystemWindow.AllToplevelWindows) { searchWindows(srf, sw, false); } srf.Finish(); }
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 windowsByTitleToolStripMenuItem_Click(object sender, EventArgs e) { string prefix = InputBox.Show(this, "Find windows by title starting with:", ""); if (prefix == null) return; SearchResultForm srf = new SearchResultForm(this, "Windows by title starting with \"" + prefix + "\"", prefix); foreach (SystemWindow sw in SystemWindow.AllToplevelWindows) { searchWindows(srf, sw, false); } srf.Finish(); }
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); } }