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); }
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); }
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_); }
public override bool isExpandable( ComponentPrx component, WindowPrx window, Ice.Current context__) { return(component.getEventList().Length > 0); }
public override void closeWindow(WindowPrx window, Ice.Current context__) { }