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

Inheritance: ACAT.Lib.Core.AgentManagement.FunctionalAgentBase
Mostra file Open project: brlima94/acat-localization Class Usage Examples

Public Methods

Method Description
Activate ( ) : bool

Invoked when the Functional agent is activated. This is the entry point for the functional agent. Creates the Phrases scanner, subscribes to events

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.

Confirm ( String prompt ) : bool

Get confirmation from the user

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 a text control agent object

Private Methods

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

Handler for when the Phrases scanner is closing.

PhraseSpeakFormEvtDone ( bool flag ) : void

Event handler for event raised when the user wants to quit

PhraseSpeakFormEvtShowScanner ( object sender, EventArgs e ) : void

Event handler to display the alphabet scanner

closeScanner ( ) : void

Closes the Phrases scanner

quit ( bool showConfirmDialog = true ) : void

User wants to quit. Show confirmation and quit if user chooses to

subscribeToEvents ( ) : void

Subscribes to events

unsubscribeFromEvents ( ) : void

Unsubscribe events

Method Details

Activate() public method

Invoked when the Functional agent is activated. This is the entry point for the functional agent. Creates the Phrases scanner, subscribes to events
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

Confirm() public static method

Get confirmation from the user
public static Confirm ( String prompt ) : bool
prompt String prompt to display
return bool

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 a text control agent object
protected createEditControlTextInterface ( IntPtr handle, AutomationElement focusedElement, bool &handled ) : ACAT.Lib.Core.AgentManagement.TextInterface.TextControlAgentBase
handle System.IntPtr handle of the control in focus
focusedElement System.Windows.Automation.AutomationElement the automation object associated with the control
handled bool was this handled?
return ACAT.Lib.Core.AgentManagement.TextInterface.TextControlAgentBase