Exemplo n.º 1
0
 public static System.Collections.ObjectModel.Collection<WindowInfo> GetWindows(WindowChooseDelegate windowChoose)
 {
     chooser = windowChoose;
     System.Collections.ObjectModel.Collection<WindowInfo> r = GetWindows();
     chooser = null;
     return r;
 }
Exemplo n.º 2
0
 public Collection<WindowInfo> GetChildWindows(WindowChooseDelegate selector)
 {
     children.Clear();
     childChooser = selector;
     if (User32.EnumChildWindows(hWnd, ListChildWindow, 0) == false)
         throw new Exception("Error enumerating child windows.");
     childChooser = null;
     return children;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Matches a collection of windows to a given matcher
 /// </summary>
 /// <param name="coll">The collection of windows that need to be matched</param>
 /// <param name="matcher">A WindowInfo.WindowChooseDelegate delegate</param>
 /// <returns>A collection of windowinfo that match the matcher</returns>
 protected Collection<WindowInfo> Match(Collection<WindowInfo> coll,WindowChooseDelegate matcher)
 {
     Collection<WindowInfo> ret = new Collection<WindowInfo>();
     foreach (WindowInfo w in coll)
     {
         if (matcher(w))
             ret.Add(w);
     }
     return ret;
 }