C# Class FarsiLibrary.Win.Controls.FAMessageBoxForm

An advanced MessageBox that supports customizations like Font, Icon, Buttons and Saved Responses
Inheritance: System.Windows.Forms.Form
显示文件 Open project: HEskandari/FarsiLibrary

Private Properties

Property Type Description
AddOkButtonIfNoButtonsPresent void
CenterForm void
DisableCloseButton void
DisableCloseIfMultipleButtonsAndNoCancelButton void
GetButtonSize System.Drawing.Size
GetCaptionFont System.Drawing.Font
GetCaptionWidth System.Drawing.Size
GetLongestButtonText string
GetWidthOfAllButtons int
InitializeComponent void
LayoutControls void
MeasureString System.Drawing.Size
MeasureString System.Drawing.Size
OnInternalButtonClicked void
SetCheckboxSizeAndVisibility void
SetIconSizeAndVisibility void
SetMessageSizeAndVisibility void
SetOptimumSize void
SetStandardIcon void

Public Methods

Method Description
FAMessageBoxForm ( ) : System

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnActivated ( EventArgs e ) : void
OnClosing ( CancelEventArgs e ) : void
OnLoad ( EventArgs e ) : void
ProcessCmdKey ( Message &msg, Keys keyData ) : bool

Private Methods

Method Description
AddOkButtonIfNoButtonsPresent ( ) : void
CenterForm ( ) : void

Centers the form on the screen

DisableCloseButton ( Form form ) : void
DisableCloseIfMultipleButtonsAndNoCancelButton ( ) : void
GetButtonSize ( ) : Size

Calculates the button size based on the text of the longest button text

GetCaptionFont ( ) : Font
GetCaptionWidth ( ) : Size

Gets the DEF_BUTTON_WIDTH of the caption

GetLongestButtonText ( ) : string

Gets the longest button text

GetWidthOfAllButtons ( ) : int

Returns the DEF_BUTTON_WIDTH that will be occupied by all buttons including the inter-button padding

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

LayoutControls ( ) : void

Layout all the controls

MeasureString ( string str, int maxWidth ) : Size

Measures DrawTab string using the Graphics object for this form and the font of this form

MeasureString ( string str, int maxWidth, Font font ) : Size

Measures DrawTab string using the Graphics object for this form with the specified font

OnInternalButtonClicked ( object sender, EventArgs e ) : void
SetCheckboxSizeAndVisibility ( ) : void

Sets the size and visibility of the save response checkbox

SetIconSizeAndVisibility ( ) : void

Sets the size and visibility of the Icon

SetMessageSizeAndVisibility ( ) : void

Sets the size and visibility of the Message

SetOptimumSize ( ) : void

Sets the optimum size for the form based on the controls that need to be displayed

SetStandardIcon ( ) : void

Gets a SystemIcons instance based on the selected MessageBoxIcon value.

Method Details

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool
return void

FAMessageBoxForm() public method

public FAMessageBoxForm ( ) : System
return System

OnActivated() protected method

protected OnActivated ( EventArgs e ) : void
e System.EventArgs
return void

OnClosing() protected method

protected OnClosing ( CancelEventArgs e ) : void
e CancelEventArgs
return void

OnLoad() protected method

protected OnLoad ( EventArgs e ) : void
e System.EventArgs
return void

ProcessCmdKey() protected method

protected ProcessCmdKey ( Message &msg, Keys keyData ) : bool
msg System.Windows.Forms.Message
keyData Keys
return bool