C# Class ACAT.Lib.Extension.AppAgents.MSWord.MSWordAgentBase

Base class for the Agent for Microsoft Word
Inheritance: ACAT.Lib.Core.AgentManagement.AgentBase
Afficher le fichier Open project: brlima94/acat-localization

Protected Properties

Свойство Type Description
autoSwitchScanners bool
isWordInstalled bool
supportedFeatures String[]

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.

MSWordAgentBase ( ) : System

Initializes a new instance of the class.

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 scanner depending on the context. 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

Executes the specified command

Méthodes protégées

Méthode Description
OnDispose ( ) : void

Dispose allocated resources

createMSWordTextInterface ( ) : void

Creates the text control interface for MS Word

isRecentDocuments ( AutomationElement focusedElement ) : bool

Returns if the currently focused element is the "Recent Documents" window

launchLectureManager ( String fileName, String text ) : void

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

Private Methods

Méthode Description
_textInterface_EvtTextChanged ( object sender, ACAT.Lib.Core.AgentManagement.TextInterface.TextChangedEventArgs e ) : void

Event handler for when text or caret position in the MS Word window has changed

disposeTextInterface ( ) : void

Disposes off the text interface

loadWordPredictionContext ( ) : void

Loads the text from the active word document to the word prediction engine as temporary context for better word prediction results, that are more relevant to the active document

unloadWordPredictionContext ( ) : void

Unloaded previously loaded context from the word predictor

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

MSWordAgentBase() public méthode

Initializes a new instance of the class.
public MSWordAgentBase ( ) : System
Résultat System

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

OnDispose() protected méthode

Dispose allocated resources
protected OnDispose ( ) : void
Résultat void

OnFocusChanged() public méthode

Invoked when the foreground window focus changes. Displays the scanner depending on the context. 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

Executes the specified 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

createMSWordTextInterface() protected méthode

Creates the text control interface for MS Word
protected createMSWordTextInterface ( ) : void
Résultat void

isRecentDocuments() protected méthode

Returns if the currently focused element is the "Recent Documents" window
protected isRecentDocuments ( AutomationElement focusedElement ) : bool
focusedElement System.Windows.Automation.AutomationElement focused element
Résultat bool

launchLectureManager() protected méthode

Launches lecture manager with text from the MS Word window. This function returns only after lecture manager has exited
protected launchLectureManager ( String fileName, String text ) : void
fileName String
text String
Résultat void

Property Details

autoSwitchScanners protected_oe property

If set to true, the agent will autoswitch the scanners depending on which element has focus. Eg: Alphabet scanner if an edit text window has focus, the contextual menu if the main document has focus
protected bool autoSwitchScanners
Résultat bool

isWordInstalled protected_oe property

Is word installed on this computer?
protected bool isWordInstalled
Résultat bool

supportedFeatures protected_oe property

List of features supported by this agent. These widgets will be enabled in the scanners.
protected String[] supportedFeatures
Résultat String[]