C# Class ACAT.Lib.Extension.AppAgents.Notepad.NotepadAgentBase

Base class for the Application agent for Notepad.
Inheritance: ACAT.Lib.Core.AgentManagement.GenericAppAgentBase
Afficher le fichier Open project: brlima94/acat-localization

Méthodes publiques

Méthode Description
CheckWidgetEnabled ( ACAT.Lib.Core.AgentManagement.CheckEnabledArgs arg ) : void

Invoked to set the 'enabled' state of a widget. This will depend on the current context.

OnContextMenuRequest ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo ) : void

Displays the contextual menu

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

Invoked when the foreground window focus changes. Displays the alphabet scanner. Also, if this is a new window that has come into focus, adds its contents to the word prediction temporary batch model for more contextual prediction of words

OnFocusLost ( ) : void

Focus shifted to another app. This agent is getting deactivated.

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

Invoked to run a command

Méthodes protégées

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

Creates the text control agent for notepad

Private Methods

Méthode Description
getFileNameFromWindow ( ) : String

Parses the title of the notepad window and extracts the file name from it

getNotepadText ( ) : String

Returns text from the notepad window

launchLectureManager ( ) : System.Threading.Tasks.Task

Launches lecture manager with text from the notepad window. This function returns only after lecture manager has exited

Method Details

CheckWidgetEnabled() public méthode

Invoked to set the 'enabled' state of a widget. This will depend on the current context.
public CheckWidgetEnabled ( ACAT.Lib.Core.AgentManagement.CheckEnabledArgs arg ) : void
arg ACAT.Lib.Core.AgentManagement.CheckEnabledArgs contains info about the widget
Résultat void

OnContextMenuRequest() public méthode

Displays the contextual menu
public OnContextMenuRequest ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo ) : void
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo Foreground window info
Résultat void

OnFocusChanged() public méthode

Invoked when the foreground window focus changes. Displays the alphabet scanner. Also, if this is a new window that has come into focus, adds its contents to the word prediction temporary batch model for more contextual prediction of words
public OnFocusChanged ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, bool &handled ) : void
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo Foreground window info
handled bool set to true if handled
Résultat void

OnFocusLost() public méthode

Focus shifted to another app. This agent is getting deactivated.
public OnFocusLost ( ) : void
Résultat void

OnRunCommand() public méthode

Invoked to run a command
public OnRunCommand ( String command, object commandArg, bool &handled ) : void
command String The command to execute
commandArg object Optional arguments for the command
handled bool set this to true if handled
Résultat void

createEditControlTextInterface() protected méthode

Creates the text control agent for notepad
protected createEditControlTextInterface ( IntPtr handle, AutomationElement focusedElement, bool &handled ) : ACAT.Lib.Core.AgentManagement.TextInterface.TextControlAgentBase
handle System.IntPtr Handle to the notepad window
focusedElement System.Windows.Automation.AutomationElement automation element for the notepad text control
handled bool set to true if handled
Résultat ACAT.Lib.Core.AgentManagement.TextInterface.TextControlAgentBase