Interface
IDialog

Interface to implement for dialogs to be monitored and handled by the DialogMonitor object.

Definition

Properties

CurrentState

The dialogs current state. This property is Managed by the dialog monitor. Implementors should simply provide a private field to store this value for get/set operations.

Declaration

cs-api-definition
DialogCurrentState CurrentState { get; set; }

Property Value

DialogCurrentState

ErrorText

When a dialog encounters an error and needs to abort, this property is set

Declaration

cs-api-definition
string ErrorText { get; set; }

Property Value

string

HandleCount

Gets/Sets the number of times this dialog has been handled.

Declaration

cs-api-definition
int HandleCount { get; set; }

Property Value

int

HandlerDelegate

Gets/Sets a dialog handler delegate that will be used instead of the Handle() function.

Declaration

cs-api-definition
DialogHandlerDelegate HandlerDelegate { get; set; }

Property Value

DialogHandlerDelegate

InitializationTime

Gets/Sets the time to before handling of the dialog starts.

Declaration

cs-api-definition
int InitializationTime { get; set; }

Property Value

int

SkipHandling

Gets/Sets a dialog delegate that will be used if handling dialog will be skipped.

Declaration

cs-api-definition
Func<bool> SkipHandling { get; set; }

Property Value

Func<bool>

Window

The Window object that represents this dialog. IsDialogActive() should set this property if it is returning true.

Declaration

cs-api-definition
Window Window { get; }

Property Value

Window

Methods

Handle()

If a HandlerDelegate is set, this function should call the delegate, otherwise handle the dialog itself.

Declaration

cs-api-definition
void Handle()

IsDialogActive(WindowCollection)

Whether the dialog is active or not.

Declaration

cs-api-definition
bool IsDialogActive(WindowCollection dialogs)

Parameters

dialogs

WindowCollection

The list of dialogs present on the desktop.

Returns

bool

True/False whether the dialog is active/present.

MatchesUIAutomationElement(AutomationElement)

Detect whether this UI element completes the awaited conditions. For situations where window handles do not or need not apply.

Declaration

cs-api-definition
bool MatchesUIAutomationElement(AutomationElement element)

Parameters

element

AutomationElement

Returns

bool