C# Class ACAT.Extensions.Default.FunctionalAgents.LaunchAppAgent.LaunchAppAgent

Inheritance: ACAT.Lib.Core.AgentManagement.FunctionalAgentBase
Show file Open project: brlima94/acat-localization

Public Methods

Method Description
Activate ( ) : bool

Invoked when the Functional agent is activated. This is the entry point.

CheckWidgetEnabled ( ACAT.Lib.Core.AgentManagement.CheckEnabledArgs arg ) : void

Invoked to check if a scanner button should be enabled. Uses context to determine the 'enabled' state.

LaunchAppAgent ( ) : System

Initializes a new instance of the class.

OnFocusChanged ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, bool &handled ) : void

Invoked when the focus changes either in the active window or when the active window itself changes.

OnRequestClose ( ) : bool

A request came in to close the agent. We MUST quit if this call is ever made

OnRunCommand ( String command, object commandArg, bool &handled ) : void

Invoked when there is a request to run a command. This could as a result of the user activating a button on the scanner and there is a command associated with the button

Protected Methods

Method Description
createEditControlTextInterface ( IntPtr handle, AutomationElement focusedElement, bool &handled ) : ACAT.Lib.Core.AgentManagement.TextInterface.TextControlAgentBase

Creates text control agent object

Private Methods

Method Description
_form_FormClosing ( object sender, FormClosingEventArgs e ) : void

Release resources and close

_launchAppScanner_EvtLaunchApp ( object sender, ACAT.Extensions.Default.FunctionalAgents.LaunchAppAgent.AppInfo appInfo ) : void

Request came in to launch an app. Launch the specified application. After launching, the scanner and the agent are both closed.

_launchAppScanner_EvtQuit ( object sender, EventArgs args ) : void

Quit the agent after confirming with the user

activateWindow ( IntPtr handle ) : void

Set focus to the specified window

closeScanner ( ) : void

Close the launchapp scanner

confirm ( String prompt ) : bool

Get confirmation from the user

launchAppScanner_EvtShowScanner ( object sender, EventArgs eventArgs ) : void

Event handler to display the alphabet scanner

launchProcess ( ACAT.Extensions.Default.FunctionalAgents.LaunchAppAgent.AppInfo info ) : bool

Launch the specified app

normalizeCommandLine ( String commandLine ) : String

Replace macros in the command line argument.

quit ( ) : void

Quit the agent. Close the scanner

waitForProcessAndActivate ( Process process ) : void

Wait the the proc to start and set focus to its window

Method Details

Activate() public method

Invoked when the Functional agent is activated. This is the entry point.
public Activate ( ) : bool
return bool

CheckWidgetEnabled() public method

Invoked to check if a scanner button should be enabled. Uses context to determine the 'enabled' state.
public CheckWidgetEnabled ( ACAT.Lib.Core.AgentManagement.CheckEnabledArgs arg ) : void
arg ACAT.Lib.Core.AgentManagement.CheckEnabledArgs info about the scanner button
return void

LaunchAppAgent() public method

Initializes a new instance of the class.
public LaunchAppAgent ( ) : System
return System

OnFocusChanged() public method

Invoked when the focus changes either in the active window or when the active window itself changes.
public OnFocusChanged ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, bool &handled ) : void
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo Info about focused element
handled bool was this handled
return void

OnRequestClose() public method

A request came in to close the agent. We MUST quit if this call is ever made
public OnRequestClose ( ) : bool
return bool

OnRunCommand() public method

Invoked when there is a request to run a command. This could as a result of the user activating a button on the scanner and there is a command associated with the button
public OnRunCommand ( String command, object commandArg, bool &handled ) : void
command String command to run
commandArg object any optional arguments
handled bool was this handled?
return void

createEditControlTextInterface() protected method

Creates text control agent object
protected createEditControlTextInterface ( IntPtr handle, AutomationElement focusedElement, bool &handled ) : ACAT.Lib.Core.AgentManagement.TextInterface.TextControlAgentBase
handle System.IntPtr handle of target control
focusedElement System.Windows.Automation.AutomationElement automaton element
handled bool was this handled?
return ACAT.Lib.Core.AgentManagement.TextInterface.TextControlAgentBase