Table of Contents

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
object
Msg

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

owner Control

The parent window the displayed window is modal to; can be null.

text string

The message to be displayed.

severity MsgSeverity

How 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

owner Control

The parent window the displayed window is modal to; can be null.

text string

The message to be displayed.

severity MsgSeverity

How severe/important the message is.

Returns

bool

true if the user selected OK; false if 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

owner Control

The parent window the displayed window is modal to; can be null.

text string

The message to be displayed.

severity MsgSeverity

How severe/important the message is.

Returns

bool

true if the user chose 'Yes', false if 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

owner Control

The parent window the displayed window is modal to; can be null.

text string

The message to be displayed.

severity MsgSeverity

How severe/important the message is.

Returns

DialogResult

Eto.Forms.DialogResult.Yes, Eto.Forms.DialogResult.No or Eto.Forms.DialogResult.Cancel.