コード例 #1
0
 private void NewPasswordTextBox_Validating(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (string.IsNullOrEmpty(NewPasswordTextBox.Text))
     {
         ErrorIcon.SetError(NewPasswordTextBox, "This field cant be empty!");
     }
     else
     {
         ErrorIcon.Clear();
     }
 }
コード例 #2
0
 private void LoginTextBox_Validating(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (string.IsNullOrEmpty(LoginTextBox.Text))
     {
         ErrorIcon.SetError(LoginTextBox, "This field cant be empty!");
     }
     else if (!authorization.IsLoginExist(LoginTextBox.Text))
     {
         ErrorIcon.SetError(LoginTextBox, "Login is not exists");
     }
     else
     {
         ErrorIcon.Clear();
     }
 }
コード例 #3
0
 private void PhoneTextBox_Validating(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (!PhoneTextBox.MaskCompleted)
     {
         ErrorIcon.SetError(PhoneTextBox, "Wrong phone number");
     }
     else if (!authorization.IsPhoneExist(PhoneTextBox.Text))
     {
         ErrorIcon.SetError(PhoneTextBox, "Phone is not exists");
     }
     else
     {
         ErrorIcon.Clear();
     }
 }