C# Class Catel.Services.MessageService

Message service that implements the IMessageService.
Inheritance: Catel.Services.ViewModelServiceBase, IMessageService
ファイルを表示 Open project: Catel/Catel

Public Methods

Method Description
MessageService ( IDispatcherService dispatcherService ) : System

Initializes a new instance of the MessageService class.

ShowAsync ( string message, string caption = "", MessageButton button = MessageButton.OK, MessageImage icon = MessageImage.None ) : Task

Shows an information message to the user and allows a callback operation when the message is completed.

ShowErrorAsync ( Exception exception ) : Task

Shows an error message to the user and allows a callback operation when the message is completed.

ShowErrorAsync ( string message, string caption = "" ) : Task

Shows an error message to the user and allows a callback operation when the message is completed.

ShowInformationAsync ( string message, string caption = "" ) : Task

Shows an information message to the user and allows a callback operation when the message is completed.

ShowWarningAsync ( string message, string caption = "" ) : Task

Shows a warning message to the user and allows a callback operation when the message is completed.

Protected Methods

Method Description
ShowMessageBoxAsync ( string message, string caption = "", MessageButton button = MessageButton.OK, MessageImage icon = MessageImage.None ) : Task

Shows the message box.

TranslateMessageBoxResult ( MessageBoxResult result ) : MessageResult

Translates the message box result.

TranslateMessageButton ( MessageButton button ) : MessageBoxButton

Translates the message button.

Private Methods

Method Description
Initialize ( ) : void

Called at the end of constructors.

Show ( string message, string caption = "", MessageButton button = MessageButton.OK, MessageImage icon = MessageImage.None ) : Task
ShowError ( Exception exception ) : Task
ShowError ( string message, string caption = "" ) : Task
ShowInformation ( string message, string caption = "" ) : Task
ShowWarning ( string message, string caption = "" ) : Task

Method Details

MessageService() public method

Initializes a new instance of the MessageService class.
The is null.
public MessageService ( IDispatcherService dispatcherService ) : System
dispatcherService IDispatcherService The dispatcher service.
return System

ShowAsync() public method

Shows an information message to the user and allows a callback operation when the message is completed.
The is null or whitespace.
public ShowAsync ( string message, string caption = "", MessageButton button = MessageButton.OK, MessageImage icon = MessageImage.None ) : Task
message string The message.
caption string The caption.
button MessageButton The button.
icon MessageImage The icon.
return Task

ShowErrorAsync() public method

Shows an error message to the user and allows a callback operation when the message is completed.
The is null.
public ShowErrorAsync ( Exception exception ) : Task
exception System.Exception The exception.
return Task

ShowErrorAsync() public method

Shows an error message to the user and allows a callback operation when the message is completed.
The is null or whitespace.
public ShowErrorAsync ( string message, string caption = "" ) : Task
message string The message.
caption string The caption.
return Task

ShowInformationAsync() public method

Shows an information message to the user and allows a callback operation when the message is completed.
The is null or whitespace.
public ShowInformationAsync ( string message, string caption = "" ) : Task
message string The message.
caption string The caption.
return Task

ShowMessageBoxAsync() protected method

Shows the message box.
The is null or whitespace.
protected ShowMessageBoxAsync ( string message, string caption = "", MessageButton button = MessageButton.OK, MessageImage icon = MessageImage.None ) : Task
message string The message.
caption string The caption.
button MessageButton The button.
icon MessageImage The icon.
return Task

ShowWarningAsync() public method

Shows a warning message to the user and allows a callback operation when the message is completed.
The is null or whitespace.
public ShowWarningAsync ( string message, string caption = "" ) : Task
message string The message.
caption string The caption.
return Task

TranslateMessageBoxResult() protected static method

Translates the message box result.
protected static TranslateMessageBoxResult ( MessageBoxResult result ) : MessageResult
result MessageBoxResult The result.
return MessageResult

TranslateMessageButton() protected static method

Translates the message button.
protected static TranslateMessageButton ( MessageButton button ) : MessageBoxButton
button MessageButton The button.
return MessageBoxButton