C# Class Smrf.AppLib.FormPlus

Represents a Form with additional features.
This class contains a set of methods for displaying messages and validating controls. It also implements an OnFirstActivated virtual method that the derived class can use to run time-consuming initialization code without preventing the form from appearing.

Most of the functionality in this class is also avaialable as a set of static methods in the FormUtil class.

Inheritance: System.Windows.Forms.Form
Afficher le fichier Open project: 2014-sed-team3/term-project

Protected Properties

Свойство Type Description
m_bActivated System.Boolean

Méthodes publiques

Méthode Description
FindControlByName ( String sName ) : Control
FormPlus ( ) : System

Initializes a new instance of the FormPlus class.

Méthodes protégées

Méthode Description
CheckAllCheckBoxes ( Control oParentControl, System.Boolean bCheck ) : void
CheckCheckBoxes ( System.Boolean bCheck ) : void
EnableControls ( System.Boolean bEnable ) : void
EnableControls ( System.Boolean bEnable, Control oControls ) : void
EnsureVisible ( ) : void
EnsureVisibleOnVisibleChanged ( Object sender, EventArgs e ) : void
FindControlByName ( String sName, Control oChildControls, Control &oControl ) : System.Boolean
OnActivated ( EventArgs e ) : void
OnFirstActivated ( ) : void
OnInvalidComboBox ( ComboBox oComboBox, String sErrorMessage ) : System.Boolean
OnInvalidControl ( Control control, String errorMessage ) : System.Boolean
OnInvalidDateTimePicker ( DateTimePicker oDateTimePicker, String sErrorMessage ) : System.Boolean
OnInvalidNumericUpDown ( NumericUpDown oNumericUpDown, String sErrorMessage ) : System.Boolean
OnInvalidTextBox ( TextBox oTextBox, String sErrorMessage ) : System.Boolean
PreventClosure ( Object sender, System e ) : void
ShowError ( String sText ) : void
ShowInformation ( String sText ) : void
ShowWarning ( String sText ) : void
TrimTextBox ( TextBox oTextBox ) : String
ValidateDirectoryTextBox ( TextBox oTextBox, String sErrorMessage, String &sDirectory ) : System.Boolean
ValidateDoubleTextBox ( TextBox oTextBox, Double dMinValue, Double dMaxValue, String sErrorMessage, Double &dDouble ) : System.Boolean
ValidateFileTextBox ( TextBox oTextBox, String sErrorMessage, String &sFile ) : System.Boolean
ValidateInt32TextBox ( TextBox oTextBox, Int32 iMinValue, Int32 iMaxValue, String sErrorMessage, Int32 &iInt32 ) : System.Boolean
ValidateListBoxSelection ( ListBox oListBox, String sErrorMessage ) : System.Boolean
ValidateNumericUpDown ( NumericUpDown oNumericUpDown, String sValueDescription, Decimal &decValue ) : System.Boolean
ValidateNumericUpDown ( NumericUpDown oNumericUpDown, String sValueDescription, Double &dValue ) : System.Boolean
ValidateNumericUpDown ( NumericUpDown oNumericUpDown, String sValueDescription, Int32 &iValue ) : System.Boolean
ValidateNumericUpDown ( NumericUpDown oNumericUpDown, String sValueDescription, System.Single &fValue ) : System.Boolean
ValidateRequiredComboBox ( ComboBox oComboBox, String sErrorMessage, String &sTrimmedText ) : System.Boolean
ValidateRequiredTextBox ( TextBox oTextBox, String sErrorMessage, String &sTrimmedText ) : System.Boolean

Private Methods

Méthode Description
AssertValid ( ) : void

Method Details

CheckAllCheckBoxes() protected méthode

protected CheckAllCheckBoxes ( Control oParentControl, System.Boolean bCheck ) : void
oParentControl System.Windows.Forms.Control
bCheck System.Boolean
Résultat void

CheckCheckBoxes() protected méthode

protected CheckCheckBoxes ( System.Boolean bCheck ) : void
bCheck System.Boolean
Résultat void

EnableControls() protected méthode

protected EnableControls ( System.Boolean bEnable ) : void
bEnable System.Boolean
Résultat void

EnableControls() protected méthode

protected EnableControls ( System.Boolean bEnable, Control oControls ) : void
bEnable System.Boolean
oControls System.Windows.Forms.Control
Résultat void

EnsureVisible() protected méthode

protected EnsureVisible ( ) : void
Résultat void

EnsureVisibleOnVisibleChanged() protected méthode

protected EnsureVisibleOnVisibleChanged ( Object sender, EventArgs e ) : void
sender Object
e System.EventArgs
Résultat void

FindControlByName() protected méthode

protected FindControlByName ( String sName, Control oChildControls, Control &oControl ) : System.Boolean
sName String
oChildControls System.Windows.Forms.Control
oControl System.Windows.Forms.Control
Résultat System.Boolean

FindControlByName() public méthode

public FindControlByName ( String sName ) : Control
sName String
Résultat System.Windows.Forms.Control

FormPlus() public méthode

Initializes a new instance of the FormPlus class.
public FormPlus ( ) : System
Résultat System

OnActivated() protected méthode

protected OnActivated ( EventArgs e ) : void
e System.EventArgs
Résultat void

OnFirstActivated() protected méthode

protected OnFirstActivated ( ) : void
Résultat void

OnInvalidComboBox() protected méthode

protected OnInvalidComboBox ( ComboBox oComboBox, String sErrorMessage ) : System.Boolean
oComboBox System.Windows.Forms.ComboBox
sErrorMessage String
Résultat System.Boolean

OnInvalidControl() protected méthode

protected OnInvalidControl ( Control control, String errorMessage ) : System.Boolean
control System.Windows.Forms.Control
errorMessage String
Résultat System.Boolean

OnInvalidDateTimePicker() protected méthode

protected OnInvalidDateTimePicker ( DateTimePicker oDateTimePicker, String sErrorMessage ) : System.Boolean
oDateTimePicker System.Windows.Forms.DateTimePicker
sErrorMessage String
Résultat System.Boolean

OnInvalidNumericUpDown() protected méthode

protected OnInvalidNumericUpDown ( NumericUpDown oNumericUpDown, String sErrorMessage ) : System.Boolean
oNumericUpDown System.Windows.Forms.NumericUpDown
sErrorMessage String
Résultat System.Boolean

OnInvalidTextBox() protected méthode

protected OnInvalidTextBox ( TextBox oTextBox, String sErrorMessage ) : System.Boolean
oTextBox System.Windows.Forms.TextBox
sErrorMessage String
Résultat System.Boolean

PreventClosure() protected méthode

protected PreventClosure ( Object sender, System e ) : void
sender Object
e System
Résultat void

ShowError() protected méthode

protected ShowError ( String sText ) : void
sText String
Résultat void

ShowInformation() protected méthode

protected ShowInformation ( String sText ) : void
sText String
Résultat void

ShowWarning() protected méthode

protected ShowWarning ( String sText ) : void
sText String
Résultat void

TrimTextBox() protected méthode

protected TrimTextBox ( TextBox oTextBox ) : String
oTextBox System.Windows.Forms.TextBox
Résultat String

ValidateDirectoryTextBox() protected méthode

protected ValidateDirectoryTextBox ( TextBox oTextBox, String sErrorMessage, String &sDirectory ) : System.Boolean
oTextBox System.Windows.Forms.TextBox
sErrorMessage String
sDirectory String
Résultat System.Boolean

ValidateDoubleTextBox() protected méthode

protected ValidateDoubleTextBox ( TextBox oTextBox, Double dMinValue, Double dMaxValue, String sErrorMessage, Double &dDouble ) : System.Boolean
oTextBox System.Windows.Forms.TextBox
dMinValue Double
dMaxValue Double
sErrorMessage String
dDouble Double
Résultat System.Boolean

ValidateFileTextBox() protected méthode

protected ValidateFileTextBox ( TextBox oTextBox, String sErrorMessage, String &sFile ) : System.Boolean
oTextBox System.Windows.Forms.TextBox
sErrorMessage String
sFile String
Résultat System.Boolean

ValidateInt32TextBox() protected méthode

protected ValidateInt32TextBox ( TextBox oTextBox, Int32 iMinValue, Int32 iMaxValue, String sErrorMessage, Int32 &iInt32 ) : System.Boolean
oTextBox System.Windows.Forms.TextBox
iMinValue System.Int32
iMaxValue System.Int32
sErrorMessage String
iInt32 System.Int32
Résultat System.Boolean

ValidateListBoxSelection() protected méthode

protected ValidateListBoxSelection ( ListBox oListBox, String sErrorMessage ) : System.Boolean
oListBox System.Windows.Forms.ListBox
sErrorMessage String
Résultat System.Boolean

ValidateNumericUpDown() protected méthode

protected ValidateNumericUpDown ( NumericUpDown oNumericUpDown, String sValueDescription, Decimal &decValue ) : System.Boolean
oNumericUpDown System.Windows.Forms.NumericUpDown
sValueDescription String
decValue Decimal
Résultat System.Boolean

ValidateNumericUpDown() protected méthode

protected ValidateNumericUpDown ( NumericUpDown oNumericUpDown, String sValueDescription, Double &dValue ) : System.Boolean
oNumericUpDown System.Windows.Forms.NumericUpDown
sValueDescription String
dValue Double
Résultat System.Boolean

ValidateNumericUpDown() protected méthode

protected ValidateNumericUpDown ( NumericUpDown oNumericUpDown, String sValueDescription, Int32 &iValue ) : System.Boolean
oNumericUpDown System.Windows.Forms.NumericUpDown
sValueDescription String
iValue System.Int32
Résultat System.Boolean

ValidateNumericUpDown() protected méthode

protected ValidateNumericUpDown ( NumericUpDown oNumericUpDown, String sValueDescription, System.Single &fValue ) : System.Boolean
oNumericUpDown System.Windows.Forms.NumericUpDown
sValueDescription String
fValue System.Single
Résultat System.Boolean

ValidateRequiredComboBox() protected méthode

protected ValidateRequiredComboBox ( ComboBox oComboBox, String sErrorMessage, String &sTrimmedText ) : System.Boolean
oComboBox System.Windows.Forms.ComboBox
sErrorMessage String
sTrimmedText String
Résultat System.Boolean

ValidateRequiredTextBox() protected méthode

protected ValidateRequiredTextBox ( TextBox oTextBox, String sErrorMessage, String &sTrimmedText ) : System.Boolean
oTextBox System.Windows.Forms.TextBox
sErrorMessage String
sTrimmedText String
Résultat System.Boolean

Property Details

m_bActivated protected_oe property

protected Boolean,System m_bActivated
Résultat System.Boolean