Class MessageBoxService
A service used to display messages in message box dialogs.
Implements
Inherited Members
Namespace: Gorgon.Editor.Services
Assembly: Gorgon.Editor.API.dll
Syntax
public class MessageBoxService : IMessageDisplayService
Constructors
| Edit this page View SourceMessageBoxService(IGorgonLog)
Initializes a new instance of the MessageBoxService class.
Declaration
public MessageBoxService(IGorgonLog log)
Parameters
Type | Name | Description |
---|---|---|
IGorgonLog | log | The log. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
Methods
| Edit this page View SourceShowConfirmation(string, string, bool, bool)
Function to show a confirmation message.
Declaration
public MessageResponse ShowConfirmation(string message, string caption = null, bool toAll = false, bool allowCancel = false)
Parameters
Type | Name | Description |
---|---|---|
string | message | The message to display. |
string | caption | [Optional] A caption for the message. |
bool | toAll | [Optional] true to allow an application to apply the result to all items, false to only allow an application to apply the result to a single item. |
bool | allowCancel | [Optional] true to allow cancellation support, false to only allow accept or deny functionality. |
Returns
Type | Description |
---|---|
MessageResponse | The response value for the message. |
ShowError(Exception, string, string)
Function to show an error message based on an exception.
Declaration
public void ShowError(Exception ex, string message = null, string caption = null)
Parameters
Type | Name | Description |
---|---|---|
Exception | ex | The exception to display. |
string | message | [Optional] A custom message to display with the error. |
string | caption | [Optional] A caption for the message. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
ShowError(string, string, string)
Function to show an error message with optional detail information.
Declaration
public void ShowError(string message, string caption = null, string details = null)
Parameters
Type | Name | Description |
---|---|---|
string | message | The message to display. |
string | caption | [Optional] A caption for the message. |
string | details | [Optional] Additional information for the error. |
ShowInfo(string, string)
Function to show an informational message.
Declaration
public void ShowInfo(string message, string caption = null)
Parameters
Type | Name | Description |
---|---|---|
string | message | The message to display. |
string | caption | [Optional] A caption for the message. |
ShowWarning(string, string, string)
Function to show a warning message.
Declaration
public void ShowWarning(string message, string caption = null, string details = null)
Parameters
Type | Name | Description |
---|---|---|
string | message | The message to display. |
string | caption | [Optional] A caption for the message. |
string | details | [Optional] Additional information for the error. |