C# Class FlexFieldControlLib.FlexFieldControl

Inheritance: System.Windows.Forms.UserControl
Afficher le fichier Open project: binaryage/xrefresh

Private Properties

Свойство Type Description
AdjustSize void
CalculateMinimumSize System.Drawing.Size
Cleanup void
GetSuggestedHeight int
GetTextMetrics NativeMethods.TEXTMETRIC
HandleMouseDown void
InitializeComponent void
InitializeControls void
IsValidFieldIndex bool
IsValidSeparatorIndex bool
LayoutControls void
OnFieldChanged void
OnFieldFocus void
OnFieldKeyPressed void
OnFieldSizeChanged void
OnFieldValidated void
OnFocusCeded void
OnSeparatorMouseEvent void
OnSeparatorSizeChanged void
Parse void

Méthodes publiques

Méthode Description
AddCedeFocusKey ( int fieldIndex, KeyEventArgs e ) : bool

Adds a KeyEventArgs to a specific field that indicates when a field should cede focus to the next field in the control. By default, each field has a single cede focus key -- the [Space] key.

AddCedeFocusKey ( KeyEventArgs e ) : void

Adds a KeyEventArgs to every field that indicates when a field should cede focus to the next field in the control. By default, each field has a single cede focus key -- the [Space] key.

Clear ( ) : void

Clears all content from the fields in the control.

ClearCedeFocusKeys ( ) : void

Removes every cede focus key from every field in the control.

ClearCedeFocusKeys ( int fieldIndex ) : void

Removes every cede focus key from a specific field in the control.

GetCasing ( int fieldIndex ) : CharacterCasing

Gets the character casing for a field in the control.

GetFieldText ( int fieldIndex ) : string

Gets the text of a specific field in the control.

GetLeadingZeros ( int fieldIndex ) : bool

Gets whether a field that is not blank has leading zeros.

GetMaxLength ( int fieldIndex ) : int

Gets the maximum number of characters allowed in a specific field.

GetRangeHigh ( int fieldIndex ) : int

Gets the high inclusive boundary of allowed values for a specific field. The default value varies based on ValueFormat and MaxLength, but it is always the maximum value that can be represented by the field.

GetRangeLow ( int fieldIndex ) : int

Gets the low inclusive boundary of allowed values for a specific field. Default value is 0.

GetSeparatorText ( int separatorIndex ) : string

Gets the text for a specific separator in the control.

GetValue ( int fieldIndex ) : int

Gets the value of a specific field. If the field is blank, its value is the same as its low range value.

GetValueFormat ( int fieldIndex ) : ValueFormat

Gets the value format for a specific field in the control.

HasFocus ( int fieldIndex ) : bool

Determines if a specific field has input focus. True indicates that the field has focus.

IsBlank ( int fieldIndex ) : bool

Determines if every field in the control is blank. True indicates that every field in the control is blank.

ResetCedeFocusKeys ( ) : void

Removes every cede focus key from every field, and adds the default cede focus key -- the [Space] key -- to every field.

ResetCedeFocusKeys ( int fieldIndex ) : void

Removes every cede focus key from a specific field, and adds the default cede focus key -- the [Space] key -- to the field.

SetCasing ( CharacterCasing casing ) : void

Sets the character casing for every field in the control.

SetCasing ( int fieldIndex, CharacterCasing casing ) : void

Sets the character casing for a specific field in the control.

SetFieldText ( int fieldIndex, string text ) : void

Sets text for a specific field in the control.

SetFieldText ( string text ) : void

Sets text for every field in the control.

SetFocus ( int fieldIndex ) : void

Sets input focus to a field in the control.

SetLeadingZeros ( bool leadingZeros ) : void

Toggles whether the value for every field is displayed with leading zeros.

SetLeadingZeros ( int fieldIndex, bool leadingZeros ) : void

Toggles whether the value for a specific field is displayed with leading zeros.

SetMaxLength ( int maxLength ) : void

Sets the maximum length for every field in the control.

SetMaxLength ( int fieldIndex, int maxLength ) : void

Sets the maximum length for a specific field in the control. Default value is 3.

SetRange ( int low, int high ) : void

Sets the low and high range for every field.

SetRange ( int fieldIndex, int low, int high ) : void

Sets the low and high range for a specific field.

SetSeparatorText ( int separatorIndex, string text ) : void

Sets the text for a specific separator.

SetSeparatorText ( string text ) : void

Sets the text for every separator.

SetValue ( int value ) : void

Sets the value for every field.

SetValue ( int fieldIndex, int value ) : void

Sets the value for a specific field.

SetValueFormat ( ValueFormat format ) : void

Sets the value format for every field.

SetValueFormat ( int fieldIndex, ValueFormat format ) : void

Sets the value format for a specific field.

ToString ( ) : string

Converts the text of every separator and every field to a single string.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

FlexFieldControl ( ) : System

The constructor.

OnBackColorChanged ( EventArgs e ) : void

Raises the BackColorChanged event.

OnFontChanged ( EventArgs e ) : void

Adjusts the size of the control when font is changed.

OnGotFocus ( EventArgs e ) : void

Raises the GotFocus event.

OnLostFocus ( EventArgs e ) : void

Raises the LostFocus event.

OnMouseDown ( MouseEventArgs e ) : void

Raises the MouseDown event.

OnMouseEnter ( EventArgs e ) : void

Sets the cursor to I-beam when mouse is over control.

OnPaint ( PaintEventArgs e ) : void

Clears the background and fills it with background color. If control has a border, draws it.

OnSizeChanged ( EventArgs e ) : void

Ensures that any size change of control is constrained by allowed range.

Private Methods

Méthode Description
AdjustSize ( ) : void
CalculateMinimumSize ( ) : Size
Cleanup ( ) : void
GetSuggestedHeight ( ) : int
GetTextMetrics ( IntPtr hwnd, Font font ) : NativeMethods.TEXTMETRIC
HandleMouseDown ( Point location ) : void
InitializeComponent ( ) : void

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

InitializeControls ( ) : void
IsValidFieldIndex ( int fieldIndex ) : bool
IsValidSeparatorIndex ( int separatorIndex ) : bool
LayoutControls ( ) : void
OnFieldChanged ( object sender, FlexFieldControlLib.FieldChangedEventArgs e ) : void
OnFieldFocus ( object sender, FieldFocusEventArgs e ) : void
OnFieldKeyPressed ( object sender, KeyPressEventArgs e ) : void
OnFieldSizeChanged ( object sender, EventArgs e ) : void
OnFieldValidated ( object sender, FieldValidatedEventArgs e ) : void
OnFocusCeded ( object sender, CedeFocusEventArgs e ) : void
OnSeparatorMouseEvent ( object sender, SeparatorMouseEventArgs e ) : void
OnSeparatorSizeChanged ( object sender, EventArgs e ) : void
Parse ( string text ) : void

Method Details

AddCedeFocusKey() public méthode

Adds a KeyEventArgs to a specific field that indicates when a field should cede focus to the next field in the control. By default, each field has a single cede focus key -- the [Space] key.
public AddCedeFocusKey ( int fieldIndex, KeyEventArgs e ) : bool
fieldIndex int
e System.Windows.Forms.KeyEventArgs
Résultat bool

AddCedeFocusKey() public méthode

Adds a KeyEventArgs to every field that indicates when a field should cede focus to the next field in the control. By default, each field has a single cede focus key -- the [Space] key.
public AddCedeFocusKey ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs KeyCode /// indicates which keyboard key will cede focus.
Résultat void

Clear() public méthode

Clears all content from the fields in the control.
public Clear ( ) : void
Résultat void

ClearCedeFocusKeys() public méthode

Removes every cede focus key from every field in the control.
public ClearCedeFocusKeys ( ) : void
Résultat void

ClearCedeFocusKeys() public méthode

Removes every cede focus key from a specific field in the control.
public ClearCedeFocusKeys ( int fieldIndex ) : void
fieldIndex int
Résultat void

Dispose() protected méthode

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
Résultat void

FlexFieldControl() protected méthode

The constructor.
protected FlexFieldControl ( ) : System
Résultat System

GetCasing() public méthode

Gets the character casing for a field in the control.
public GetCasing ( int fieldIndex ) : CharacterCasing
fieldIndex int
Résultat CharacterCasing

GetFieldText() public méthode

Gets the text of a specific field in the control.
public GetFieldText ( int fieldIndex ) : string
fieldIndex int
Résultat string

GetLeadingZeros() public méthode

Gets whether a field that is not blank has leading zeros.
public GetLeadingZeros ( int fieldIndex ) : bool
fieldIndex int
Résultat bool

GetMaxLength() public méthode

Gets the maximum number of characters allowed in a specific field.
public GetMaxLength ( int fieldIndex ) : int
fieldIndex int
Résultat int

GetRangeHigh() public méthode

Gets the high inclusive boundary of allowed values for a specific field. The default value varies based on ValueFormat and MaxLength, but it is always the maximum value that can be represented by the field.
public GetRangeHigh ( int fieldIndex ) : int
fieldIndex int
Résultat int

GetRangeLow() public méthode

Gets the low inclusive boundary of allowed values for a specific field. Default value is 0.
public GetRangeLow ( int fieldIndex ) : int
fieldIndex int
Résultat int

GetSeparatorText() public méthode

Gets the text for a specific separator in the control.
public GetSeparatorText ( int separatorIndex ) : string
separatorIndex int
Résultat string

GetValue() public méthode

Gets the value of a specific field. If the field is blank, its value is the same as its low range value.
public GetValue ( int fieldIndex ) : int
fieldIndex int
Résultat int

GetValueFormat() public méthode

Gets the value format for a specific field in the control.
public GetValueFormat ( int fieldIndex ) : ValueFormat
fieldIndex int
Résultat ValueFormat

HasFocus() public méthode

Determines if a specific field has input focus. True indicates that the field has focus.
public HasFocus ( int fieldIndex ) : bool
fieldIndex int
Résultat bool

IsBlank() public méthode

Determines if every field in the control is blank. True indicates that every field in the control is blank.
public IsBlank ( int fieldIndex ) : bool
fieldIndex int
Résultat bool

OnBackColorChanged() protected méthode

Raises the BackColorChanged event.
protected OnBackColorChanged ( EventArgs e ) : void
e System.EventArgs
Résultat void

OnFontChanged() protected méthode

Adjusts the size of the control when font is changed.
protected OnFontChanged ( EventArgs e ) : void
e System.EventArgs
Résultat void

OnGotFocus() protected méthode

Raises the GotFocus event.
protected OnGotFocus ( EventArgs e ) : void
e System.EventArgs
Résultat void

OnLostFocus() protected méthode

Raises the LostFocus event.
protected OnLostFocus ( EventArgs e ) : void
e System.EventArgs
Résultat void

OnMouseDown() protected méthode

Raises the MouseDown event.
protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs
Résultat void

OnMouseEnter() protected méthode

Sets the cursor to I-beam when mouse is over control.
protected OnMouseEnter ( EventArgs e ) : void
e System.EventArgs
Résultat void

OnPaint() protected méthode

Clears the background and fills it with background color. If control has a border, draws it.
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
Résultat void

OnSizeChanged() protected méthode

Ensures that any size change of control is constrained by allowed range.
protected OnSizeChanged ( EventArgs e ) : void
e System.EventArgs
Résultat void

ResetCedeFocusKeys() public méthode

Removes every cede focus key from every field, and adds the default cede focus key -- the [Space] key -- to every field.
public ResetCedeFocusKeys ( ) : void
Résultat void

ResetCedeFocusKeys() public méthode

Removes every cede focus key from a specific field, and adds the default cede focus key -- the [Space] key -- to the field.
public ResetCedeFocusKeys ( int fieldIndex ) : void
fieldIndex int
Résultat void

SetCasing() public méthode

Sets the character casing for every field in the control.
public SetCasing ( CharacterCasing casing ) : void
casing CharacterCasing
Résultat void

SetCasing() public méthode

Sets the character casing for a specific field in the control.
public SetCasing ( int fieldIndex, CharacterCasing casing ) : void
fieldIndex int
casing CharacterCasing
Résultat void

SetFieldText() public méthode

Sets text for a specific field in the control.
public SetFieldText ( int fieldIndex, string text ) : void
fieldIndex int
text string
Résultat void

SetFieldText() public méthode

Sets text for every field in the control.
public SetFieldText ( string text ) : void
text string
Résultat void

SetFocus() public méthode

Sets input focus to a field in the control.
public SetFocus ( int fieldIndex ) : void
fieldIndex int
Résultat void

SetLeadingZeros() public méthode

Toggles whether the value for every field is displayed with leading zeros.
public SetLeadingZeros ( bool leadingZeros ) : void
leadingZeros bool true indicates that the value /// is displayed with leading zeros.
Résultat void

SetLeadingZeros() public méthode

Toggles whether the value for a specific field is displayed with leading zeros.
public SetLeadingZeros ( int fieldIndex, bool leadingZeros ) : void
fieldIndex int Zero-based index for field.
leadingZeros bool true indicates value should be /// displayed with leading zeros.
Résultat void

SetMaxLength() public méthode

Sets the maximum length for every field in the control.
public SetMaxLength ( int maxLength ) : void
maxLength int
Résultat void

SetMaxLength() public méthode

Sets the maximum length for a specific field in the control. Default value is 3.
public SetMaxLength ( int fieldIndex, int maxLength ) : void
fieldIndex int
maxLength int
Résultat void

SetRange() public méthode

Sets the low and high range for every field.
public SetRange ( int low, int high ) : void
low int
high int
Résultat void

SetRange() public méthode

Sets the low and high range for a specific field.
public SetRange ( int fieldIndex, int low, int high ) : void
fieldIndex int
low int
high int
Résultat void

SetSeparatorText() public méthode

Sets the text for a specific separator.
public SetSeparatorText ( int separatorIndex, string text ) : void
separatorIndex int
text string
Résultat void

SetSeparatorText() public méthode

Sets the text for every separator.
public SetSeparatorText ( string text ) : void
text string
Résultat void

SetValue() public méthode

Sets the value for every field.
public SetValue ( int value ) : void
value int
Résultat void

SetValue() public méthode

Sets the value for a specific field.
public SetValue ( int fieldIndex, int value ) : void
fieldIndex int
value int
Résultat void

SetValueFormat() public méthode

Sets the value format for every field.
public SetValueFormat ( ValueFormat format ) : void
format ValueFormat
Résultat void

SetValueFormat() public méthode

Sets the value format for a specific field.
public SetValueFormat ( int fieldIndex, ValueFormat format ) : void
fieldIndex int
format ValueFormat
Résultat void

ToString() public méthode

Converts the text of every separator and every field to a single string.
public ToString ( ) : string
Résultat string