DoAction() публичный Метод

public DoAction ( int index ) : bool
index int
Результат bool
Пример #1
0
        public void Collapse()
        {
            if (!AccessibleIsEnabled(accessible))
            {
                throw new ElementNotEnabledException();
            }

            if (accessible.StateSet.Contains(StateType.Expanded))
            {
                action.DoAction(expandOrContractAction);
            }
        }
Пример #2
0
        public void Toggle()
        {
            if (!accessible.StateSet.Contains(StateType.Enabled))
            {
                throw new ElementNotEnabledException();
            }

            ActionDescription [] actions = action.Actions;
            for (int i = 0; i < actions.Length; i++)
            {
                if (actions [i].Name == "toggle")
                {
                    action.DoAction(i);
                    return;
                }
            }
            Log.Debug("Toggle: Couldn't find a toggle action");
            action.DoAction(0);
        }
Пример #3
0
        public void Invoke()
        {
            if (!accessible.StateSet.Contains(StateType.Enabled))
            {
                throw new ElementNotEnabledException();
            }

            ActionDescription [] actions = action.Actions;
            for (int i = 0; i < actions.Length; i++)
            {
                if (actions [i].Name == "activate" || actions [i].Name == "invoke" ||
                    actions [i].Name == "click" || actions [i].Name == "jump")
                {
                    action.DoAction(i);
                    return;
                }
            }
            Log.Debug("Invoke: Couldn't find an activate, invoke, or click action");
            action.DoAction(0);
        }