C# Класс Gwupe.Agent.UI.WPF.Utils.InputValidator

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

ResetStatus() публичный Метод

public ResetStatus ( Control textBoxes = null, System.Windows.Controls.Label labels = null ) : void
textBoxes System.Windows.Controls.Control
labels System.Windows.Controls.Label
Результат void

SetError() публичный Метод

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
Результат void

SetStatus() публичный Метод

public SetStatus ( string status ) : void
status string
Результат void

ValidateEmail() публичный Метод

public ValidateEmail ( TextBox email, System.Windows.Controls.Label emailLabel ) : bool
email System.Windows.Controls.TextBox
emailLabel System.Windows.Controls.Label
Результат bool

ValidateFieldMatches() публичный Метод

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
Результат bool

ValidateFieldNonEmpty() публичный Метод

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
Результат bool