C# Class ACAT.Lib.Extension.AppAgents.WindowsExplorer.WindowsExplorerAgentBase

Base class application agent for Windows Explorer. Enables navigation through files and folders in Explorer, create folders, clipboard operations, opening files etc.
Inheritance: ACAT.Lib.Core.AgentManagement.GenericAppAgentBase
Afficher le fichier Open project: brlima94/acat-localization

Protected Properties

Свойство Type Description
autoSwitchScanners bool

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. Depending on which element has focus in the acrobat reader window, display the appropriate scanner

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
getMenu ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, String &panelClass ) : bool

Gets the menu for the Explorer window in focus. Checks if the file explorer is active and returns the contextual menu name for it

getWindowElement ( IntPtr hWndMain ) : AutomationElement

Returns the automation element for the window handle

isDesktopWindow ( AutomationElement focusedElement ) : bool

Checks if the focused element is the desktop

isFileExplorer ( AutomationElement windowElement ) : bool

Checks if the window element is the Windows Explorer window

Private Methods

Méthode Description
displayScanner ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, bool &handled ) : void

Displays the scanner appropriate for the element that is currently in focus in the Windows explorer window

showMenu ( String menuName, String title ) : void

Dispays the menu indicated by the menu name

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. Depending on which element has focus in the acrobat reader window, display the appropriate scanner
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

getMenu() protected méthode

Gets the menu for the Explorer window in focus. Checks if the file explorer is active and returns the contextual menu name for it
protected getMenu ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, String &panelClass ) : bool
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo fg window info
panelClass String returns the panel class of the menu
Résultat bool

getWindowElement() protected méthode

Returns the automation element for the window handle
protected getWindowElement ( IntPtr hWndMain ) : AutomationElement
hWndMain System.IntPtr window handle
Résultat System.Windows.Automation.AutomationElement

isDesktopWindow() protected méthode

Checks if the focused element is the desktop
protected isDesktopWindow ( AutomationElement focusedElement ) : bool
focusedElement System.Windows.Automation.AutomationElement element in focus
Résultat bool

isFileExplorer() protected méthode

Checks if the window element is the Windows Explorer window
protected isFileExplorer ( AutomationElement windowElement ) : bool
windowElement System.Windows.Automation.AutomationElement element in focus
Résultat bool

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