C# Class JR.Utils.GUI.Forms.FlexibleMessageBox.FlexibleMessageBoxForm

The form to show the customized message box. It is defined as an internal class to keep the public interface of the FlexibleMessageBox clean.
Inheritance: System.Windows.Forms.Form
Datei anzeigen Open project: mogzol/BrawlBuilder

Public Methods

Method Description
Show ( IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton ) : DialogResult

Shows the specified message box.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Verwendete Ressourcen bereinigen.

Private Methods

Method Description
FlexibleMessageBoxForm ( ) : System

Initializes a new instance of the FlexibleMessageBoxForm class.

FlexibleMessageBoxForm_KeyUp ( object sender, KeyEventArgs e ) : void

Handles the KeyUp event of the richTextBoxMessage control.

FlexibleMessageBoxForm_Shown ( object sender, EventArgs e ) : void

Handles the Shown event of the FlexibleMessageBoxForm control.

GetButtonText ( ButtonID buttonID ) : string

Gets the button text for the CurrentUICulture language. Note: The fallback language is English

GetCorrectedWorkingAreaFactor ( double workingAreaFactor ) : double

Ensure the given working area factor in the range of 0.2 - 1.0 where: 0.2 means: 20 percent of the working area height or width. 1.0 means: 100 percent of the working area height or width.

GetStringRows ( string message ) : string[]

Gets the string rows.

InitializeComponent ( ) : void

Erforderliche Methode für die Designerunterstützung. Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.

SetDialogButtons ( FlexibleMessageBoxForm flexibleMessageBoxForm, MessageBoxButtons buttons, MessageBoxDefaultButton defaultButton ) : void

Set dialog buttons visibilities and texts. Also set a default button.

SetDialogIcon ( FlexibleMessageBoxForm flexibleMessageBoxForm, MessageBoxIcon icon ) : void

Set the dialogs icon. When no icon is used: Correct placement and width of rich text box.

SetDialogSizes ( FlexibleMessageBoxForm flexibleMessageBoxForm, string text, string caption ) : void

Calculate the dialogs start size (Try to auto-size width to show longest text row). Also set the maximum dialog size.

SetDialogStartPosition ( FlexibleMessageBoxForm flexibleMessageBoxForm, IWin32Window owner ) : void

Set the dialogs start position when given. Otherwise center the dialog on the current screen.

richTextBoxMessage_LinkClicked ( object sender, System.Windows.Forms.LinkClickedEventArgs e ) : void

Handles the LinkClicked event of the richTextBoxMessage control.

Method Details

Dispose() protected method

Verwendete Ressourcen bereinigen.
protected Dispose ( bool disposing ) : void
disposing bool True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.
return void

Show() public static method

Shows the specified message box.
public static Show ( IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton ) : DialogResult
owner IWin32Window The owner.
text string The text.
caption string The caption.
buttons MessageBoxButtons The buttons.
icon MessageBoxIcon The icon.
defaultButton MessageBoxDefaultButton The default button.
return DialogResult