Ejemplo n.º 1
0
        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();
            }
        }
Ejemplo n.º 2
0
        public override bool isSupportedBy(ComponentPrx component, Ice.Current context__)
        {
            AutomationElement element = WGComponent.fromId(component.getId());

            return((bool)element.GetCurrentPropertyValue(
                       AutomationElement.IsExpandCollapsePatternAvailableProperty));
        }
Ejemplo n.º 3
0
        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();
            }
        }