Example #1
0
        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;
        }
Example #2
0
        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();
        }
Example #3
0
        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;
        }
Example #4
0
 public ActionPrx newObject(ProcessI process, WidgetI component)
 {
     Ice.ObjectPrx obj = process.register(makeObject(component));
     return ActionPrxHelper.uncheckedCast(obj);
 }
Example #5
0
 public abstract Ice.Object makeObject(WidgetI component);
Example #6
0
 public abstract bool isSupportedBy(WidgetI component);
Example #7
0
 public override Ice.Object makeObject(WidgetI component)
 {
     return new InvokeEvent(component);
 }
Example #8
0
 public override bool isSupportedBy(WidgetI component)
 {
     AutomationElement element = component.Element;
     return (bool) element.GetCurrentPropertyValue(
         AutomationElement.IsInvokePatternAvailableProperty);
 }
Example #9
0
 public InvokeEvent(WidgetI component)
 {
     this.component = component;
 }
Example #10
0
 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;
 }