示例#1
0
 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);
     }
 }
示例#2
0
        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();
        }
示例#3
0
        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();
        }
示例#4
0
        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);
            }
        }
示例#5
0
 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();
 }
示例#6
0
 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();
 }
示例#7
0
 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);
     }
 }
示例#8
0
 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);
     }
 }