Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Sealed class: RT.Util.Forms.DlgMessage

Summary

Holds a number of settings that define a message dialog. Provides a method to show the dialog represented, as well as static methods to show some common dialog kinds with most settings at their defaults.

Constructors

Creates a new instance of DlgMessage.

Instance methods

int Shows a message using all the settings specified in this class instance. Anything left at defaults will be modified to hold the appropriate value. Any invalid settings will be flagged with an exception.

Static methods

int
Show(string message, DlgType type)
Shows a message of the specified message type, using an appropriate caption, sound and image.
int
Show(string message, string caption, DlgType type, params string[] buttons)
Shows a message of the specified message type, using an appropriate sound and image.
int
Show(string message, string caption, DlgType type, DlgMessageFormat format, params string[] buttons)
int
ShowError(string message, params string[] buttons)
Shows an error message using the image, caption and sound appropriate for this message type.
int
ShowInfo(string message, params string[] buttons)
Shows an informational message using the image, caption and sound appropriate for this message type.
int
ShowQuestion(string message, params string[] buttons)
Shows a question message using the image, caption and sound appropriate for this message type.
int
ShowWarning(string message, params string[] buttons)
Shows a warning message using the image, caption and sound appropriate for this message type.
void
Translate(string ok, string captionInfo, string captionQuestion, string captionWarning, string captionError)
Applies a translation to certain default strings, on the assumption that all messages are to be shown with the same translation.

Instance fields

int Specifies the index of the accept button (the one selected if the user just presses Enter). Defaults to -1, which means the button with index 0.
string[] Specifies the labels of the buttons to be displayed in the dialog. Defaults to null, in which case a single "OK" button will appear. May contain at most four elements. The labels may include the ampersand to indicate a shortcut key, or double-ampersand to include an ampersand.
int Specifies the index of the cancel button (the one selected if the user just presses Esc or Alt+F4). Defaults to -1, which means the button with the largest valid index.
string Specifies a caption to be displayed in the dialog's window title bar. Defaults to null, which means choose a title based on the DlgMessage.Type field.
Font Specifies a font to be used for the message text (but not the buttons). Defaults to null, which means the default system font should be used.
DlgMessageFormatSpecifies whether the text in this message box should be rendered using EggsML or plain text.
Bitmap Specifies an image to be displayed in the image area of the dialog. Defaults to null, which means use an image based on the DlgMessage.Type field. If the type is DlgType.Custom, and this field is null, no image will be displayed.
string Specifies the message to be displayed in the main message area. Defaults to null, in which case the message area will be empty.
boolSpecifies whether a taskbar icon is shown for the dialog box.
DlgType Specifies the message type. This selects a sound, an image and a caption to be used by default, unless explicitly overridden in the other fields of this class. Defaults to DlgType.Info.