protected bool CheckEmpty(UITextBox edit, string desc) { bool result = edit.Text.IsValid(); if (!result) { this.ShowWarningDialog(desc); edit.Focus(); } return(result); }
protected bool CheckRange(UITextBox edit, double min, double max, string desc) { bool result = edit.DoubleValue >= min && edit.IntValue <= max; if (!result) { this.ShowWarningDialog(desc); edit.Focus(); } return(result); }