public override bool isSupportedBy(ComponentPrx component, Ice.Current context__) { AutomationElement element = WGComponent.fromId(component.getId()); return((bool)element.GetCurrentPropertyValue( AutomationElement.IsExpandCollapsePatternAvailableProperty)); }
public override void perform(ComponentPrx component, Ice.Current context__) { AutomationElement element = WGComponent.fromId(component.getId()); ExpandCollapsePattern patternMenu = element.GetCurrentPattern( ExpandCollapsePattern.Pattern) as ExpandCollapsePattern; // Pattern is not available for this component if (patternMenu == null) { // TODO: Log message return; } ExpandCollapseState state = patternMenu.Current.ExpandCollapseState; if (state == ExpandCollapseState.Expanded) { patternMenu.Collapse(); } else if (state == ExpandCollapseState.PartiallyExpanded || state == ExpandCollapseState.Collapsed) { patternMenu.Expand(); } }
public override void expandGUI(ComponentPrx component, Ice.Current context__) { ActionPrx[] eventList = component.getEventList(); // Use the first event if one is available if (eventList.Length > 0) { eventList[0].perform(component); } }
public override void perform(ComponentPrx component, Ice.Current context__) { AutomationElement element = WGComponent.fromId(component.getId()); if (isActable(element)) { InvokePattern pattern = element.GetCurrentPattern(InvokePattern.Pattern) as InvokePattern; pattern.Invoke(); } }
public override ComponentPrx[] getChildren(Ice.Current context__) { AutomationElementCollection childrenList = element.FindAll(TreeScope.Children, Condition.TrueCondition); ComponentPrx[] components = new ComponentPrx[childrenList.Count]; for (int i = 0; i < childrenList.Count; i++) { components[i] = new WGComponent(childrenList[i]).Proxy; } return(components); }
public WGComponent(AutomationElement element) { this.element = element; title = element.Current.Name; boundingRect = element.Current.BoundingRectangle; /* Add this automation element to the cache */ cache.Add(counter, element); id = counter; counter++; /* Add this component to the adapter */ Ice.ObjectPrx base_ = Adapter.Instance.addWithUUID(this); proxy = ComponentPrxHelper.checkedCast(base_); }
public static ActionPrx[] getEventList(ComponentPrx component) { loadAssembly(); // Check which events support the component List <ActionPrx> proxies = new List <ActionPrx>(); foreach (ActionPrx action in actionList) { if (action.isSupportedBy(component)) { proxies.Add(action); } } return(proxies.ToArray()); }
public override bool isExpandable( ComponentPrx component, WindowPrx window, Ice.Current context__) { return(component.getEventList().Length > 0); }