C# Класс ACAT.Lib.Extension.AppAgents.Outlook.OutlookAgentBase

Base class for the Outlook email application. Tracks the currently focused window/field in Outlook and displays the appropriate contextual menu to enable the user to interact with Outlook. Has the ability to support multiple versions of Outlook, currently only supports Outlook 2010.
Наследование: ACAT.Lib.Core.AgentManagement.GenericAppAgentBase
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
outlookControlSubType OutlookControlSubType
outlookWindowType OutlookWindowTypes

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

Свойство Тип Описание
autoSwitchScanners bool
controlType System.Windows.Automation.ControlType
outlookInspector IOutlookInspector

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

Метод Описание
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. Display the scanner depending on the context.

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 from all the Outlook contextual menus

OutlookAgentBase ( ) : System

Initializes an instance of hte class

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

Метод Описание
IsOutlookInstalled ( ) : bool
actuateStandardControl ( ControlType ctrlType ) : bool

Actuates a standard windows control such as a button, checkbox etc.

attachFile ( ) : void

Attaches a file to the current email being composed. Launches the file browser to get the file to attach from the user. Sends a command to bring up the Outlook "Insert File" dialog. Inserts the filename into the file name field in the dialog

createEditControlTextInterface ( IntPtr handle, AutomationElement focusedElement, bool &handled ) : ACAT.Lib.Core.AgentManagement.TextInterface.TextControlAgentBase

Creates an edit control text agent to manipulate text in the target text control that's currently active. the 'handled' param is set to true if it was handled successfully.

createKeyLoggerTextInterface ( IntPtr handle, AutomationElement editTextElement ) : ACAT.Lib.Core.AgentManagement.TextInterface.TextControlAgentBase

Creates a keylogger interface for all those edit controls that don't support the TextPattern. Depending on the type of the field we enable/disable abbreviations, smart punctuations, learning and spell check

getContextualMenuForWindow ( OutlookWindowTypes windowType, String &title ) : String

Returns the name of the contextual menu for the window/element currently in focus.

getOutlookVersion ( ) : int

Returns the outlook version install on the client machine. 14.0 is Outlook 2010

gotoNextField ( ) : void

Tabs to the next field in the window

gotoPreviousField ( ) : void

Tabs to the previous field in the window

identifyWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, OutlookControlSubType &subType ) : OutlookWindowTypes

Identify the top level window in Outlook

isAppointmentSchedulingWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, OutlookControlSubType &subType ) : bool

Is the active window the Appointement scheduling window?

isCalendarWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo ) : bool

Is the active window the Outlook calendar window?

isContactsWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo ) : bool

Is the active window the "Contacts" window?

isEmailMsgWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, bool &isNewMessage, OutlookControlSubType &subType ) : bool

Is the active window a new or existing open email window?

isInboxWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo ) : bool

Is the active window the email inbox window?

isNotesWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo ) : bool

Is the active window the "Contacts" window?

isOpenAppointmentWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, OutlookControlSubType &subType ) : bool

Is the active window an open Appointment window?

isOpenContactWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, OutlookControlSubType &subType ) : bool

Is the active window an open "Contact" window?

isOpenNoteWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, OutlookControlSubType &subType ) : bool

Is the active window an open Outlook "Note" window?

isOpenTaskWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, OutlookControlSubType &subType ) : bool
isTasksWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo ) : bool

Is the active window an open Task window?

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

Метод Описание
createOutlookInspector ( ) : IOutlookInspector

Creates the outlook inspector depending on the version of Outlook installed on the client computer. Returns default inspector if outlook is not installed or is the unsupported version.

getFileToAttach ( ) : System.Threading.Tasks.Task

Activates the file browser agent to get the name of the file to attach

isMessageBodyField ( OutlookControlSubType subType ) : bool

Checks if the specified window element is a message body field

isSubjectField ( OutlookControlSubType subType ) : bool

Checks if the specified window element is a 'Subject' field

isTopLevelWindow ( OutlookWindowTypes windowType ) : bool

Checks if the specified window is a top-level window in Outlook

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

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

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

protected IsOutlookInstalled ( ) : bool
Результат bool

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

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

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

Invoked when the foreground window focus changes. Display the scanner depending on the context.
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() публичный Метод

Invoked to run a command from all the Outlook contextual menus
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

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

Initializes an instance of hte class
public OutlookAgentBase ( ) : System
Результат System

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

Actuates a standard windows control such as a button, checkbox etc.
protected actuateStandardControl ( ControlType ctrlType ) : bool
ctrlType System.Windows.Automation.ControlType Type of the control
Результат bool

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

Attaches a file to the current email being composed. Launches the file browser to get the file to attach from the user. Sends a command to bring up the Outlook "Insert File" dialog. Inserts the filename into the file name field in the dialog
protected attachFile ( ) : void
Результат void

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

Creates an edit control text agent to manipulate text in the target text control that's currently active. the 'handled' param is set to true if it was handled successfully.
protected createEditControlTextInterface ( IntPtr handle, AutomationElement focusedElement, bool &handled ) : ACAT.Lib.Core.AgentManagement.TextInterface.TextControlAgentBase
handle System.IntPtr handle to the active window
focusedElement System.Windows.Automation.AutomationElement the active text control
handled bool true if handled
Результат ACAT.Lib.Core.AgentManagement.TextInterface.TextControlAgentBase

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

Creates a keylogger interface for all those edit controls that don't support the TextPattern. Depending on the type of the field we enable/disable abbreviations, smart punctuations, learning and spell check
protected createKeyLoggerTextInterface ( IntPtr handle, AutomationElement editTextElement ) : ACAT.Lib.Core.AgentManagement.TextInterface.TextControlAgentBase
handle System.IntPtr handle of the window
editTextElement System.Windows.Automation.AutomationElement edit control automation element
Результат ACAT.Lib.Core.AgentManagement.TextInterface.TextControlAgentBase

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

Returns the name of the contextual menu for the window/element currently in focus.
protected getContextualMenuForWindow ( OutlookWindowTypes windowType, String &title ) : String
windowType OutlookWindowTypes Type of window
title String returns the title
Результат String

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

Returns the outlook version install on the client machine. 14.0 is Outlook 2010
protected getOutlookVersion ( ) : int
Результат int

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

Tabs to the next field in the window
protected gotoNextField ( ) : void
Результат void

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

Tabs to the previous field in the window
protected gotoPreviousField ( ) : void
Результат void

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

Identify the top level window in Outlook
protected identifyWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, OutlookControlSubType &subType ) : OutlookWindowTypes
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo Active window info
subType OutlookControlSubType The focused Outlook window control element
Результат OutlookWindowTypes

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

Is the active window the Appointement scheduling window?
protected isAppointmentSchedulingWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, OutlookControlSubType &subType ) : bool
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo Active window info
subType OutlookControlSubType The focused Outlook window control element
Результат bool

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

Is the active window the Outlook calendar window?
protected isCalendarWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo ) : bool
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo Active window info
Результат bool

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

Is the active window the "Contacts" window?
protected isContactsWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo ) : bool
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo Active window info
Результат bool

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

Is the active window a new or existing open email window?
protected isEmailMsgWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, bool &isNewMessage, OutlookControlSubType &subType ) : bool
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo Active window info
isNewMessage bool true if this is a new email window
subType OutlookControlSubType The focused Outlook window control element
Результат bool

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

Is the active window the email inbox window?
protected isInboxWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo ) : bool
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo Active window info
Результат bool

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

Is the active window the "Contacts" window?
protected isNotesWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo ) : bool
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo Active window info
Результат bool

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

Is the active window an open Appointment window?
protected isOpenAppointmentWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, OutlookControlSubType &subType ) : bool
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo Active window info
subType OutlookControlSubType The focused Outlook window control element
Результат bool

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

Is the active window an open "Contact" window?
protected isOpenContactWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, OutlookControlSubType &subType ) : bool
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo Active window info
subType OutlookControlSubType The focused Outlook window control element
Результат bool

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

Is the active window an open Outlook "Note" window?
protected isOpenNoteWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, OutlookControlSubType &subType ) : bool
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo Active window info
subType OutlookControlSubType The focused Outlook window control element
Результат bool

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

protected isOpenTaskWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, OutlookControlSubType &subType ) : bool
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo
subType OutlookControlSubType
Результат bool

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

Is the active window an open Task window?
protected isTasksWindow ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo ) : bool
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo Active window info
Результат bool

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

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

protected bool autoSwitchScanners
Результат bool

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

The ControlType of the element that currently has focus
protected ControlType,System.Windows.Automation controlType
Результат System.Windows.Automation.ControlType

outlookControlSubType публичное свойство

The window element (eg button, edit box) that has focus
public OutlookControlSubType outlookControlSubType
Результат OutlookControlSubType

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

Inspector object that interfaces with the version of Outlook installed on the machine
protected IOutlookInspector outlookInspector
Результат IOutlookInspector

outlookWindowType публичное свойство

The window type that has focus - eg, inbox, tasks, contacts, open email etc
public OutlookWindowTypes outlookWindowType
Результат OutlookWindowTypes