C# Class Gwupe.Agent.UI.WPF.Utils.InputValidator

Mostrar archivo Open project: gwupe/Gwupe Class Usage Examples

Public Methods

Method Description
ResetStatus ( Control textBoxes = null, System.Windows.Controls.Label labels = null ) : void
SetError ( string error, Control control = null, System.Windows.Controls.Label label = null ) : void
SetStatus ( string status ) : void
ValidateEmail ( TextBox email, System.Windows.Controls.Label emailLabel ) : bool
ValidateFieldMatches ( Control textBox, string text, System.Windows.Controls.Label label, string errorString, string placeHolder, string regEx ) : bool
ValidateFieldNonEmpty ( Control control, string text, System.Windows.Controls.Label textLabel, string errorText, string defaultValue = "" ) : bool

Private Methods

Method Description
InputValidator ( System.Windows.Controls.TextBlock statusText, System.Windows.Controls.TextBlock errorText, Dispatcher dispatcher, bool collapse = false ) : System
MarkErrorField ( Control control, System.Windows.Controls.Label label = null ) : void

Method Details

ResetStatus() public method

public ResetStatus ( Control textBoxes = null, System.Windows.Controls.Label labels = null ) : void
textBoxes System.Windows.Controls.Control
labels System.Windows.Controls.Label
return void

SetError() public method

public SetError ( string error, Control control = null, System.Windows.Controls.Label label = null ) : void
error string
control System.Windows.Controls.Control
label System.Windows.Controls.Label
return void

SetStatus() public method

public SetStatus ( string status ) : void
status string
return void

ValidateEmail() public method

public ValidateEmail ( TextBox email, System.Windows.Controls.Label emailLabel ) : bool
email System.Windows.Controls.TextBox
emailLabel System.Windows.Controls.Label
return bool

ValidateFieldMatches() public method

public ValidateFieldMatches ( Control textBox, string text, System.Windows.Controls.Label label, string errorString, string placeHolder, string regEx ) : bool
textBox System.Windows.Controls.Control
text string
label System.Windows.Controls.Label
errorString string
placeHolder string
regEx string
return bool

ValidateFieldNonEmpty() public method

public ValidateFieldNonEmpty ( Control control, string text, System.Windows.Controls.Label textLabel, string errorText, string defaultValue = "" ) : bool
control System.Windows.Controls.Control
text string
textLabel System.Windows.Controls.Label
errorText string
defaultValue string
return bool