C# Класс ACAT.Extensions.Default.FunctionalAgents.NewFile.NewFileAgent

Наследование: ACAT.Lib.Core.AgentManagement.FunctionalAgentBase
Показать файл Открыть проект

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

Метод Описание
Activate ( ) : bool

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

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.

NewFileAgent ( ) : 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.

OnPanelClosed ( String panelClass, ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo ) : void

Invoked when the scanner is closed

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

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

Метод Описание
createEditControlTextInterface ( IntPtr handle, AutomationElement focusedElement, bool &handled ) : ACAT.Lib.Core.AgentManagement.TextInterface.TextControlAgentBase

Creates and returns the text control object for this agent

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

Метод Описание
_newFileNameForm_EvtDone ( bool flag ) : void

Form is closing. quit

activateWindow ( IntPtr handle ) : void

Sets focus to the indicated window

checkValidOrCreate ( String folder ) : bool

Checks if the specified folder is valid Display error if is not valid

confirm ( String prompt ) : bool

Gets confirmation from the user

createAndLaunchNotepad ( String fileName ) : bool

Creates a text file and launches notepad

createAndLaunchWordDoc ( String fileName ) : bool

Creates a word doc and launches word

createFileAndLaunchApp ( String fileName ) : bool

Creates the indicated file and launches the app with the file so the user can start working on it

handleDone ( ) : void

User has entered the filename. Create the file, launch the app and quit

handleQuit ( bool showPrompt = true ) : void

Handle quit by asking the user if there is a need to ask. Close forms

showFileChoices ( ) : String

Displays a menu to let the user to select whether to create a text file or a word doc

showNewFileDialogForTextFile ( ) : void

Shows the new file form to create a text file

showNewFileDialogForWordDoc ( ) : void

Shows the new file form to create a word document

waitForProcessAndActivate ( Process process ) : void

Waits for the process to start and activates the window

waitForWordWindow ( String fileName ) : void

Waits for MS Word to start. Does this by checking if the window with the file name title was created

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

Activate() публичный метод

Invoked when the Functional agent is activated. This is the entry point into this agent.
public Activate ( ) : bool
Результат bool

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

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

NewFileAgent() публичный метод

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

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

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

OnPanelClosed() публичный метод

Invoked when the scanner is closed
public OnPanelClosed ( String panelClass, ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo ) : void
panelClass String name of scanner being closed
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo foreground window info
Результат void

OnRequestClose() публичный метод

A request came in to close the agent. We MUST quit if this call is ever made
public OnRequestClose ( ) : bool
Результат bool

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

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

createEditControlTextInterface() защищенный метод

Creates and returns the text control object for this agent
protected createEditControlTextInterface ( IntPtr handle, AutomationElement focusedElement, bool &handled ) : ACAT.Lib.Core.AgentManagement.TextInterface.TextControlAgentBase
handle System.IntPtr handle of the edit control
focusedElement System.Windows.Automation.AutomationElement automation element
handled bool was this handled?
Результат ACAT.Lib.Core.AgentManagement.TextInterface.TextControlAgentBase