Table of Contents

Interface IDialogController

Namespace
NetAutoGUI
Assembly
NetAutoGUI.dll

A controller for display dialogs

public interface IDialogController

Properties

Parent

The parent window handler for dialogs of the controller. If no parent is specified, the current process's active window will be used as parent.

long? Parent { get; set; }

Property Value

long?

Methods

Alert(string, string)

Pop up an alert dialog.

void Alert(string text, string title = "Alert")

Parameters

text string

text

title string

title

Confirm(string, string)

Popup a confirmation dialog

bool Confirm(string text, string title = "Confirm")

Parameters

text string

text

title string

title

Returns

bool

true: [Ok] button is pressed; false: [Cancel] button is pressed.

Password(string, string?, string?)

Popup an entry dialog for password

string? Password(string title = "", string? okText = null, string? cancelText = null)

Parameters

title string

title

okText string

text of [OK] button, defaulted to be [OK]

cancelText string

text of [Cancel] button, defaulted to be [Cancel]

Returns

string

The password entered

Prompt(string, string?, string?)

Popup an entry dialog

string? Prompt(string title = "", string? okText = null, string? cancelText = null)

Parameters

title string

title

okText string

text of [OK] button, defaulted to be [OK]

cancelText string

text of [Cancel] button, defaulted to be [Cancel]

Returns

string

The text entered

SelectFileForLoad(string)

Pop up a loading file dialog

string? SelectFileForLoad(string filters = "")

Parameters

filters string

The file filters. Example: "txt files (.txt)|.txt|All files (.)|."

Returns

string

the selected file path

SelectFileForSave(string)

Pop up a saving file dialog.

string? SelectFileForSave(string filters = "")

Parameters

filters string

The file filters. Example: "txt files (.txt)|.txt|All files (.)|."

Returns

string

the selected file path

SelectFolder()

Pop up a folder selection dialog.

string? SelectFolder()

Returns

string

the selected path

YesNoBox(string, string)

Popup a Yes/No dialog

bool YesNoBox(string text, string title = "Ask")

Parameters

text string

text

title string

title

Returns

bool

true: [Yes] button is pressed; false: [No] button is pressed.