public override WidgetPrx[] getChildren(Ice.Current context__) { AutomationElementCollection childrenList = element.FindAll(TreeScope.Children, Condition.TrueCondition); WidgetPrx[] components = new WidgetPrx[childrenList.Count]; for (int i = 0; i < childrenList.Count; i++) { components[i] = new WidgetI(process,childrenList[i],this).Proxy; } return components; }
public static ActionPrx[] getEventList( ProcessI process, WidgetI component) { loadAssembly(); // Check which events support the component List<ActionPrx> proxies = new List<ActionPrx>(); foreach (EventMaker maker in makerList) { if (maker.isSupportedBy(component)) proxies.Add(maker.newObject(process, component)); } return proxies.ToArray(); }
public override WidgetPrx[] getWindows(Ice.Current current__) { // Check based on pid and for ControlType.Window PropertyCondition pidCondition = new PropertyCondition( AutomationElement.ProcessIdProperty, process.Id); PropertyCondition windowCondition = new PropertyCondition( AutomationElement.ControlTypeProperty, ControlType.Window); Condition condition = new AndCondition(pidCondition, windowCondition); // Check the children of the automation root for windows AutomationElement root = AutomationElement.RootElement; AutomationElementCollection rootWindows = root.FindAll(TreeScope.Children, condition); // Register the windows WidgetPrx[] windows = new WidgetPrx[rootWindows.Count]; for (int i = 0; i < rootWindows.Count; i++) { windows[i] = new WidgetI(this, rootWindows[i]).Proxy; } return windows; }
public ActionPrx newObject(ProcessI process, WidgetI component) { Ice.ObjectPrx obj = process.register(makeObject(component)); return ActionPrxHelper.uncheckedCast(obj); }
public abstract Ice.Object makeObject(WidgetI component);
public abstract bool isSupportedBy(WidgetI component);
public override Ice.Object makeObject(WidgetI component) { return new InvokeEvent(component); }
public override bool isSupportedBy(WidgetI component) { AutomationElement element = component.Element; return (bool) element.GetCurrentPropertyValue( AutomationElement.IsInvokePatternAvailableProperty); }
public InvokeEvent(WidgetI component) { this.component = component; }
public WidgetI(ProcessI process, AutomationElement element, WidgetI parent) : this(process, element) { this.parent = parent; }
public override Ice.Object makeObject(WidgetI component) { return new ExpandCollapseEvent(component); }
public ExpandCollapseEvent(WidgetI component) { this.component = component; }