C# Класс ACAT.Extensions.Default.FunctionalAgents.FileBrowserAgent.FileBrowserAgent

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

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

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

Invoked when the Functional agent is activated. This is the entry point for this agent. Show the scanner that will display the list of files from the preferred folders(s)

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.

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

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

Returns the text control interface object

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

Метод Описание
_fileBrowserScanner_EvtFileOpen ( object sender, EventArgs e ) : void

Event handler for when the user selects a file. Depending on the configuration, either the file will be opened or the name of the file will be returned to the caller. The SelectedFile property will contain the name of the selected file.

_fileBrowserScanner_EvtShowScanner ( object sender, EventArgs eventArgs ) : void

Event handler for when the file browser scanner requests for an alphabet scanner to be displayed.

_form_EvtDone ( bool flag ) : void

We are done. Quit!

_form_FormClosing ( object sender, FormClosingEventArgs e ) : void

Form is closing. Cleanup

activateWindow ( IntPtr handle ) : void

Activates the window represented by the handle and sets it as the foreground window

activateWindowIfAlreadyOpen ( String fileName ) : bool

For text files, checks if the file is already open in notepad. IF so, activates the window

closeScanner ( ) : void

Closes the file browser scanner

handleOpenFile ( String fileName ) : void

Handles file open operation. Uses file association to determine which app opens the file. Starts notepad for text files.

initProperties ( ) : void

Initializes the agent

quit ( ) : void

Close all the forms

quitFileBrowser ( ) : void

Gets confirmation from the user and quits

startWithNotepad ( String fileName ) : void

Launches the specified file in notepad

subscribeToEvents ( ) : void

Subscribes to events

unsubscribeFromEvents ( ) : void

Unsubscribes from events

waitForProcessAndActivate ( Process process ) : void

Waits for process to come up. Checks the process mainhandle to get activated.

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

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

Invoked when the Functional agent is activated. This is the entry point for this agent. Show the scanner that will display the list of files from the preferred folders(s)
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

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

Initializes a new instance of the class.
public FileBrowserAgent ( ) : 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

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() защищенный метод

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