Class MessageController
The controller for interacting with the IMessage window.
Responsible for displaying a message, along with custom buttons and returning the selected button as a result
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Messages
Assembly: ClientCore.dll
Syntax
public class MessageController : IController
Properties
OwningWindow
The IMessage window for this controller
Declaration
public IWindow OwningWindow { get; }
Property Value
Type | Description |
---|---|
IWindow |
Methods
DisplayMessage(MessageType, Exception)
Initializes the message window with a specific message detailing the supplied error
Declaration
public void DisplayMessage(MessageType type, Exception ex)
Parameters
Type | Name | Description |
---|---|---|
MessageType | type | The message type to use when displaying the error |
System.Exception | ex | The exception to detail to the user |
DisplayMessage(List<MessageButtonInfo>, String, String, ImageType)
Initializes the message window with the specified buttons and message
Declaration
public void DisplayMessage(List<MessageButtonInfo> buttons, string title, string message, ImageType img)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<MessageButtonInfo> | buttons | The buttons to display alongside the message |
System.String | title | The title/header for the message window |
System.String | message | The message to be displayed to the user |
ImageType | img | The image to show alongside the message |
GetResult()
Returns a task that holds the result of the button clicked by the user to dismiss the message window itself
Declaration
public Task<MessageResult> GetResult()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<MessageResult> | A task that holds the result of the button clicked by the user to dismiss the message window itself |