C# Класс Catel.Services.MessageService

Message service that implements the IMessageService.
Наследование: Catel.Services.ViewModelServiceBase, IMessageService
Показать файл Открыть проект

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

Метод Описание
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.

Защищенные методы

Метод Описание
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.

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

Метод Описание
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

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

MessageService() публичный Метод

Initializes a new instance of the MessageService class.
The is null.
public MessageService ( IDispatcherService dispatcherService ) : System
dispatcherService IDispatcherService The dispatcher service.
Результат System

ShowAsync() публичный Метод

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.
Результат Task

ShowErrorAsync() публичный Метод

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.
Результат Task

ShowErrorAsync() публичный Метод

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.
Результат Task

ShowInformationAsync() публичный Метод

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.
Результат Task

ShowMessageBoxAsync() защищенный Метод

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.
Результат Task

ShowWarningAsync() публичный Метод

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.
Результат Task

TranslateMessageBoxResult() защищенный статический Метод

Translates the message box result.
protected static TranslateMessageBoxResult ( MessageBoxResult result ) : MessageResult
result MessageBoxResult The result.
Результат MessageResult

TranslateMessageButton() защищенный статический Метод

Translates the message button.
protected static TranslateMessageButton ( MessageButton button ) : MessageBoxButton
button MessageButton The button.
Результат MessageBoxButton