Exemplo n.º 1
0
        public override WindowPrx[] getRootWindows(Ice.Current context__)
        {
            // Check based on pid and that they are ControlType.Window
            PropertyCondition pidCondition =
                new PropertyCondition(AutomationElement.ProcessIdProperty,
                                      process.pid());
            PropertyCondition windowCondition =
                new PropertyCondition(AutomationElement.ControlTypeProperty,
                                      ControlType.Window);

            // Check the children of the automation root for windows
            AutomationElement           root     = AutomationElement.RootElement;
            AutomationElementCollection children =
                root.FindAll(TreeScope.Children,
                             new AndCondition(pidCondition, windowCondition));

            Console.WriteLine("Found {0} windows", children.Count);

            // Register the windows
            WindowPrx[] windows = new WindowPrx[children.Count];
            for (int i = 0; i < children.Count; i++)
            {
                windows[i] = new WGWindow(children[i]).Proxy;
            }

            return(windows);
        }
Exemplo n.º 2
0
 public override WindowPrx[] getOpenedWindowCache(Ice.Current context__)
 {
     WindowPrx[] windows = new WindowPrx[openedWindows.Count];
     for (int i = 0; i < windows.Length; i++)
     {
         windows[i] = openedWindows[i].Proxy;
     }
     return(windows);
 }
Exemplo n.º 3
0
        public WGWindow(WGComponent component)
        {
            this.component = component;

            WindowPattern wp = component.Element.GetCurrentPattern(
                WindowPattern.Pattern) as WindowPattern;

            modal = wp.Current.IsModal;

            Ice.ObjectPrx base_ = Adapter.Instance.addWithUUID(this);
            proxy = WindowPrxHelper.checkedCast(base_);
        }
Exemplo n.º 4
0
 public override bool isExpandable(
     ComponentPrx component, WindowPrx window, Ice.Current context__)
 {
     return(component.getEventList().Length > 0);
 }
Exemplo n.º 5
0
 public override void closeWindow(WindowPrx window, Ice.Current context__)
 {
 }