ACAT.Lib.Extension.AppAgents.Outlook.OutlookAgentBase.actuateStandardControl C# (CSharp) Method

actuateStandardControl() protected method

Actuates a standard windows control such as a button, checkbox etc.
protected actuateStandardControl ( ControlType ctrlType ) : bool
ctrlType System.Windows.Automation.ControlType Type of the control
return bool
        protected bool actuateStandardControl(ControlType ctrlType)
        {
            bool handled = true;

            if (ctrlType.Equals(ControlType.Button) ||
                ctrlType.Equals(ControlType.CheckBox) ||
                ctrlType.Equals(ControlType.RadioButton))
            {
                AgentManager.Instance.Keyboard.Send(Keys.Space);
            }
            else if (ctrlType.Equals(ControlType.ListItem))
            {
                AgentManager.Instance.Keyboard.Send(Keys.Enter);
            }
            else
            {
                handled = false;
            }

            return handled;
        }