Пример #1
0
 public void DoWork(object state)
 {
     using (AutomationElementFactory man = new AutomationElementFactory(pAutomation)) {
         ret = query(man);
     }
     ((AutoResetEvent)state).Set();
 }
Пример #2
0
 private AutomationElement ListItemElementFromPoint(AutomationElementFactory factory, Point pt) {
     if(PInvoke.WindowFromPoint(pt) != Handle) return null;
     AutomationElement elem = factory.FromPoint(pt);
     if(elem == null) return null;
     if(elem.GetClassName() == "UIItem") return elem;
     elem = elem.GetParent();
     if(elem == null) return null;
     if(elem.GetClassName() == "UIItem") return elem;
     return null;
 }
Пример #3
0
 public void DoWork(object state)
 {
     try {
         using (AutomationElementFactory factory = new AutomationElementFactory(pAutomation)) {
             ret = query(factory);
         }
     }
     finally {
         ((AutoResetEvent)state).Set();
     }
 }
Пример #4
0
 internal AutomationElement(IUIAutomationElement pElement, AutomationElementFactory factory)
 {
     this.factory  = factory;
     this.pElement = pElement;
     factory.AddToDisposeList(this);
 }
Пример #5
0
 internal AutomationElement(IUIAutomationElement pElement, AutomationElementFactory factory) {
     this.factory = factory;
     this.pElement = pElement;
     factory.AddToDisposeList(this);
 }