C# Класс ACAT.Lib.Extension.AppAgents.MSWord.MSWordAgentBase

Base class for the Agent for Microsoft Word
Наследование: ACAT.Lib.Core.AgentManagement.AgentBase
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
autoSwitchScanners bool
isWordInstalled bool
supportedFeatures String[]

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
_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

Описание методов

CheckWidgetEnabled() публичный Метод

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
Результат void

MSWordAgentBase() публичный Метод

Initializes a new instance of the class.
public MSWordAgentBase ( ) : System
Результат System

OnContextMenuRequest() публичный Метод

Displays the contextual menu
public OnContextMenuRequest ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo ) : void
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo Foreground window info
Результат void

OnDispose() защищенный Метод

Dispose allocated resources
protected OnDispose ( ) : void
Результат void

OnFocusChanged() публичный Метод

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
Результат void

OnFocusLost() публичный Метод

Focus shifted to another app. This agent is getting deactivated.
public OnFocusLost ( ) : void
Результат void

OnRunCommand() публичный Метод

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
Результат void

createMSWordTextInterface() защищенный Метод

Creates the text control interface for MS Word
protected createMSWordTextInterface ( ) : void
Результат void

isRecentDocuments() защищенный Метод

Returns if the currently focused element is the "Recent Documents" window
protected isRecentDocuments ( AutomationElement focusedElement ) : bool
focusedElement System.Windows.Automation.AutomationElement focused element
Результат bool

launchLectureManager() защищенный Метод

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
Результат void

Описание свойств

autoSwitchScanners защищенное свойство

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
Результат bool

isWordInstalled защищенное свойство

Is word installed on this computer?
protected bool isWordInstalled
Результат bool

supportedFeatures защищенное свойство

List of features supported by this agent. These widgets will be enabled in the scanners.
protected String[] supportedFeatures
Результат String[]