C# Class Treefrog.Windows.Controllers.ValidationController

Inheritance: IDisposable
显示文件 Open project: jaquadro/Treefrog Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void
RegisterControl ( Control control, Func validationFunc ) : void
RegisterValidationFunc ( Func validationFunc ) : void
UnregisterControl ( Control control ) : void
UnregisterValidationFunc ( Func validationFunc ) : void
Validate ( ) : void
ValidateForm ( ) : bool
ValidateGreater ( string fieldName, NumericUpDown control, string refName, NumericUpDown reference ) : Func
ValidateGreaterEq ( string fieldName, NumericUpDown control, string refName, NumericUpDown reference ) : Func
ValidateLess ( string fieldName, NumericUpDown control, string refName, NumericUpDown reference ) : Func
ValidateLessEq ( string fieldName, NumericUpDown control, string refName, NumericUpDown reference ) : Func
ValidateNonEmptyName ( string fieldName, TextBox control, IEnumerable reservedNames ) : Func
ValidateNumericUpDownFunc ( string fieldName, NumericUpDown control ) : Func

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
DetermineErrorIconPadding ( Control control ) : int
EnableButtons ( bool enable ) : void

Method Details

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

RegisterControl() public method

public RegisterControl ( Control control, Func validationFunc ) : void
control System.Windows.Forms.Control
validationFunc Func
return void

RegisterValidationFunc() public method

public RegisterValidationFunc ( Func validationFunc ) : void
validationFunc Func
return void

UnregisterControl() public method

public UnregisterControl ( Control control ) : void
control System.Windows.Forms.Control
return void

UnregisterValidationFunc() public method

public UnregisterValidationFunc ( Func validationFunc ) : void
validationFunc Func
return void

Validate() public method

public Validate ( ) : void
return void

ValidateForm() public method

public ValidateForm ( ) : bool
return bool

ValidateGreater() public static method

public static ValidateGreater ( string fieldName, NumericUpDown control, string refName, NumericUpDown reference ) : Func
fieldName string
control System.Windows.Forms.NumericUpDown
refName string
reference System.Windows.Forms.NumericUpDown
return Func

ValidateGreaterEq() public static method

public static ValidateGreaterEq ( string fieldName, NumericUpDown control, string refName, NumericUpDown reference ) : Func
fieldName string
control System.Windows.Forms.NumericUpDown
refName string
reference System.Windows.Forms.NumericUpDown
return Func

ValidateLess() public static method

public static ValidateLess ( string fieldName, NumericUpDown control, string refName, NumericUpDown reference ) : Func
fieldName string
control System.Windows.Forms.NumericUpDown
refName string
reference System.Windows.Forms.NumericUpDown
return Func

ValidateLessEq() public static method

public static ValidateLessEq ( string fieldName, NumericUpDown control, string refName, NumericUpDown reference ) : Func
fieldName string
control System.Windows.Forms.NumericUpDown
refName string
reference System.Windows.Forms.NumericUpDown
return Func

ValidateNonEmptyName() public static method

public static ValidateNonEmptyName ( string fieldName, TextBox control, IEnumerable reservedNames ) : Func
fieldName string
control System.Windows.Forms.TextBox
reservedNames IEnumerable
return Func

ValidateNumericUpDownFunc() public static method

public static ValidateNumericUpDownFunc ( string fieldName, NumericUpDown control ) : Func
fieldName string
control System.Windows.Forms.NumericUpDown
return Func