C# Класс TaskDialogInterop.TaskDialog

Displays a task dialog.
Наследование: System.Windows.Window
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
GetButtonIdForCommandButton ( int index ) : int

Gets the buttonId for a command button.

When creating the config options for the dialog and specifying command buttons, typically you pass in an array of button label strings. The index specifies which button to get an id for. If you passed in Save, Don't Save, and Cancel, then index 2 specifies the Cancel button.

GetButtonIdForCommonButton ( TaskDialogCommonButtons commonButtons, int index ) : int

Gets the buttonId for a common button. If the common button set includes more than one button, the index number specifies which.

GetButtonIdForCustomButton ( int index ) : int

Gets the buttonId for a custom button.

When creating the config options for the dialog and specifying custom buttons, typically you pass in an array of button label strings. The index specifies which button to get an id for. If you passed in Save, Don't Save, and Cancel, then index 2 specifies the Cancel custom button.

GetButtonIdForRadioButton ( int index ) : int

Gets the buttonId for a radio button.

When creating the config options for the dialog and specifying radio buttons, typically you pass in an array of radio label strings. The index specifies which button to get an id for. If you passed in Automatic, Manual, and Disabled, then index 1 specifies the Manual radio button.

GetButtonIndexForCommonButton ( TaskDialogCommonButtons commonButtons, int buttonId ) : int

Gets the zero-based index for a common button.

When Alt+F4, Esc, and other non-button close commands are issued, the dialog will simulate a Cancel button click. In this case, -1 for index and a buttonid of Cancel will let you know how the user closed the dialog.

Show ( TaskDialogOptions options ) : TaskDialogInterop.TaskDialogResult

Displays a task dialog with the given configuration options.

ShowMessage ( Window owner, string messageText ) : TaskDialogSimpleResult

Displays a task dialog that has a message and that returns a result.

ShowMessage ( Window owner, string messageText, string caption ) : TaskDialogSimpleResult

Displays a task dialog that has a message and that returns a result.

ShowMessage ( Window owner, string messageText, string caption, TaskDialogCommonButtons buttons ) : TaskDialogSimpleResult

Displays a task dialog that has a message and that returns a result.

ShowMessage ( Window owner, string messageText, string caption, TaskDialogCommonButtons buttons, VistaTaskDialogIcon icon ) : TaskDialogSimpleResult

Displays a task dialog that has a message and that returns a result.

ShowMessage ( Window owner, string title, string mainInstruction, string content, string expandedInfo, string verificationText, string footerText, TaskDialogCommonButtons buttons, VistaTaskDialogIcon mainIcon, VistaTaskDialogIcon footerIcon ) : TaskDialogSimpleResult

Displays a task dialog that has a message and that returns a result.

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

Метод Описание
ConvertCommonButton ( VistaTaskDialogCommonButtons commonButton, System command = null, bool isDefault = false, bool isCancel = false ) : TaskDialogButtonData
ConvertCommonButtons ( TaskDialogCommonButtons commonButtons ) : VistaTaskDialogCommonButtons
DetectHyperlinks ( string text ) : bool
DetectHyperlinks ( string content, string expandedInfo, string footerText ) : bool
OnClosed ( TaskDialogInterop.TaskDialogClosedEventArgs e ) : void

Raises the E:Closed event.

OnShowing ( TaskDialogInterop.TaskDialogShowingEventArgs e ) : void

Raises the E:Showing event.

ShowEmulatedTaskDialog ( TaskDialogOptions options ) : TaskDialogInterop.TaskDialogResult
ShowTaskDialog ( TaskDialogOptions options ) : TaskDialogInterop.TaskDialogResult

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

GetButtonIdForCommandButton() публичный статический Метод

Gets the buttonId for a command button.
When creating the config options for the dialog and specifying command buttons, typically you pass in an array of button label strings. The index specifies which button to get an id for. If you passed in Save, Don't Save, and Cancel, then index 2 specifies the Cancel button.
public static GetButtonIdForCommandButton ( int index ) : int
index int The zero-based index into the array of command buttons.
Результат int

GetButtonIdForCommonButton() публичный статический Метод

Gets the buttonId for a common button. If the common button set includes more than one button, the index number specifies which.
public static GetButtonIdForCommonButton ( TaskDialogCommonButtons commonButtons, int index ) : int
commonButtons TaskDialogCommonButtons The common button set to use.
index int The zero-based index into the button set.
Результат int

GetButtonIdForCustomButton() публичный статический Метод

Gets the buttonId for a custom button.
When creating the config options for the dialog and specifying custom buttons, typically you pass in an array of button label strings. The index specifies which button to get an id for. If you passed in Save, Don't Save, and Cancel, then index 2 specifies the Cancel custom button.
public static GetButtonIdForCustomButton ( int index ) : int
index int The zero-based index into the array of custom buttons.
Результат int

GetButtonIdForRadioButton() публичный статический Метод

Gets the buttonId for a radio button.
When creating the config options for the dialog and specifying radio buttons, typically you pass in an array of radio label strings. The index specifies which button to get an id for. If you passed in Automatic, Manual, and Disabled, then index 1 specifies the Manual radio button.
public static GetButtonIdForRadioButton ( int index ) : int
index int The zero-based index into the array of radio buttons.
Результат int

GetButtonIndexForCommonButton() публичный статический Метод

Gets the zero-based index for a common button.
When Alt+F4, Esc, and other non-button close commands are issued, the dialog will simulate a Cancel button click. In this case, -1 for index and a buttonid of Cancel will let you know how the user closed the dialog.
public static GetButtonIndexForCommonButton ( TaskDialogCommonButtons commonButtons, int buttonId ) : int
commonButtons TaskDialogCommonButtons The common button set to use.
buttonId int The button's id.
Результат int

Show() публичный статический Метод

Displays a task dialog with the given configuration options.
public static Show ( TaskDialogOptions options ) : TaskDialogInterop.TaskDialogResult
options TaskDialogOptions /// A that specifies the /// configuration options for the dialog. ///
Результат TaskDialogInterop.TaskDialogResult

ShowMessage() публичный статический Метод

Displays a task dialog that has a message and that returns a result.
public static ShowMessage ( Window owner, string messageText ) : TaskDialogSimpleResult
owner System.Windows.Window /// The that owns this dialog. ///
messageText string /// A that specifies the text to display. ///
Результат TaskDialogSimpleResult

ShowMessage() публичный статический Метод

Displays a task dialog that has a message and that returns a result.
public static ShowMessage ( Window owner, string messageText, string caption ) : TaskDialogSimpleResult
owner System.Windows.Window /// The that owns this dialog. ///
messageText string /// A that specifies the text to display. ///
caption string /// A that specifies the title bar /// caption to display. ///
Результат TaskDialogSimpleResult

ShowMessage() публичный статический Метод

Displays a task dialog that has a message and that returns a result.
public static ShowMessage ( Window owner, string messageText, string caption, TaskDialogCommonButtons buttons ) : TaskDialogSimpleResult
owner System.Windows.Window /// The that owns this dialog. ///
messageText string /// A that specifies the text to display. ///
caption string /// A that specifies the title bar /// caption to display. ///
buttons TaskDialogCommonButtons /// A value that /// specifies which button or buttons to display. ///
Результат TaskDialogSimpleResult

ShowMessage() публичный статический Метод

Displays a task dialog that has a message and that returns a result.
public static ShowMessage ( Window owner, string messageText, string caption, TaskDialogCommonButtons buttons, VistaTaskDialogIcon icon ) : TaskDialogSimpleResult
owner System.Windows.Window /// The that owns this dialog. ///
messageText string /// A that specifies the text to display. ///
caption string /// A that specifies the title bar /// caption to display. ///
buttons TaskDialogCommonButtons /// A value that /// specifies which button or buttons to display. ///
icon VistaTaskDialogIcon /// A that specifies the /// icon to display. ///
Результат TaskDialogSimpleResult

ShowMessage() публичный статический Метод

Displays a task dialog that has a message and that returns a result.
public static ShowMessage ( Window owner, string title, string mainInstruction, string content, string expandedInfo, string verificationText, string footerText, TaskDialogCommonButtons buttons, VistaTaskDialogIcon mainIcon, VistaTaskDialogIcon footerIcon ) : TaskDialogSimpleResult
owner System.Windows.Window /// The that owns this dialog. ///
title string /// A that specifies the title bar /// caption to display. ///
mainInstruction string /// A that specifies the main text to display. ///
content string /// A that specifies the body text to display. ///
expandedInfo string /// A that specifies the expanded text to display when toggled. ///
verificationText string /// A that specifies the text to display next to a checkbox. ///
footerText string /// A that specifies the footer text to display. ///
buttons TaskDialogCommonButtons /// A value that /// specifies which button or buttons to display. ///
mainIcon VistaTaskDialogIcon /// A that specifies the /// main icon to display. ///
footerIcon VistaTaskDialogIcon /// A that specifies the /// footer icon to display. ///
Результат TaskDialogSimpleResult