C# Class GoogleCloudExtension.Utils.UserPromptUtils

This class provides helpers to show messages to the user in a uniform way.
ファイルを表示 Open project: GoogleCloudPlatform/google-cloud-visualstudio Class Usage Examples

Public Methods

Method Description
ActionPrompt ( string prompt, string title, string message = null, string actionCaption = null, string cancelCaption = null, bool isWarning = false ) : bool

Show a message dialog with a Yes and No button to the user.

ErrorPrompt ( string message, string title ) : void

Shows an error message dialog to the user, with an Ok button.

ExceptionPrompt ( AggregateException ex ) : void

Shows an error message for the given AggregateException.

ExceptionPrompt ( Exception ex ) : void

Shows an error message for the given exception.

OkPrompt ( string message, string title ) : void

Shows a message dialog to the user with an Ok button.

Method Details

ActionPrompt() public static method

Show a message dialog with a Yes and No button to the user.
public static ActionPrompt ( string prompt, string title, string message = null, string actionCaption = null, string cancelCaption = null, bool isWarning = false ) : bool
prompt string The message for the dialog.
title string The title for the dialog.
message string The message to show under the prompt.
actionCaption string The caption for the action button, it will be "Yes" by default.
cancelCaption string The caption for the cancel button, it will be "Cancel" by default.
isWarning bool
return bool

ErrorPrompt() public static method

Shows an error message dialog to the user, with an Ok button.
public static ErrorPrompt ( string message, string title ) : void
message string The message for the dialog.
title string The title for the dialog.
return void

ExceptionPrompt() public static method

Shows an error message for the given AggregateException.
public static ExceptionPrompt ( AggregateException ex ) : void
ex System.AggregateException The exception to show.
return void

ExceptionPrompt() public static method

Shows an error message for the given exception.
public static ExceptionPrompt ( Exception ex ) : void
ex System.Exception The exception to show.
return void

OkPrompt() public static method

Shows a message dialog to the user with an Ok button.
public static OkPrompt ( string message, string title ) : void
message string The message for the dialog.
title string The title for the dialog.
return void