Class Msg
- Namespace
- NanoByte.Common.EtoControls
- Assembly
- NanoByte.Common.EtoForms.dll
Provides easier access to typical Eto.Forms.MessageBox configurations.
public static class Msg
- Inheritance
-
objectMsg
Methods
Inform(Control?, string, MsgSeverity)
Displays a message to the user using a message box.
public static void Inform(Control? owner, string text, MsgSeverity severity)
Parameters
ownerControlThe parent window the displayed window is modal to; can be
null.textstringThe message to be displayed.
severityMsgSeverityHow severe/important the message is.
OkCancel(Control?, string, MsgSeverity)
Asks the user a OK/Cancel-question using a message box.
public static bool OkCancel(Control? owner, string text, MsgSeverity severity)
Parameters
ownerControlThe parent window the displayed window is modal to; can be
null.textstringThe message to be displayed.
severityMsgSeverityHow severe/important the message is.
Returns
- bool
trueif the user selected OK;falseif the user selected Cancel.
YesNo(Control?, string, MsgSeverity)
Asks the user to choose between two options (yes/no) using a message box.
public static bool YesNo(Control? owner, string text, MsgSeverity severity)
Parameters
ownerControlThe parent window the displayed window is modal to; can be
null.textstringThe message to be displayed.
severityMsgSeverityHow severe/important the message is.
Returns
- bool
trueif the user chose 'Yes',falseif the user chose 'No'.
YesNoCancel(Control?, string, MsgSeverity)
Asks the user to choose between three options (yes/no/cancel) using a message box.
public static DialogResult YesNoCancel(Control? owner, string text, MsgSeverity severity)
Parameters
ownerControlThe parent window the displayed window is modal to; can be
null.textstringThe message to be displayed.
severityMsgSeverityHow severe/important the message is.
Returns
- DialogResult
Eto.Forms.DialogResult.Yes, Eto.Forms.DialogResult.No or Eto.Forms.DialogResult.Cancel.