Esempio n. 1
0
        private bool ValidateEmail()
        {
            bool isValid = false;

            if (tbEmail.Text != null && tbValidateEmail.Text != null)
            {
                string email         = tbEmail.Text;
                string validateEmail = tbValidateEmail.Text;

                if (email.Equals(validateEmail) && ValidationData.ValidateEmail(email) && ValidationData.ValidateEmail(validateEmail))
                {
                    tbEmail.BorderBrush         = Brushes.LightGreen;
                    tbValidateEmail.BorderBrush = Brushes.LightGreen;
                    isValid = true;
                }
                else
                {
                    tbEmail.BorderBrush         = Brushes.Red;
                    tbValidateEmail.BorderBrush = Brushes.Red;
                    System.Windows.Forms.MessageBox.Show(Properties.Resources.IncorrectEmailDetails, Properties.Resources.IncorrectEmail
                                                         , MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
            }
            return(isValid);
        }
Esempio n. 2
0
 private void ValidateEmail()
 {
     isValidEmail = ValidationData.ValidateEmail(tbEmail.Text);
     if (isValidEmail)
     {
         tbEmail.BorderBrush = Brushes.Green;
     }
     else
     {
         tbEmail.BorderBrush      = Brushes.Red;
         imgErrorEmail.Visibility = Visibility.Visible;
     }
 }
Esempio n. 3
0
        private bool ValidateCredential()
        {
            bool isValid = false;

            if (tbEmail.Text != null && pbPassword.Password != null && ValidationData.ValidateEmail(tbEmail.Text))
            {
                isValid                = true;
                tbEmail.BorderBrush    = Brushes.LightGreen;
                pbPassword.BorderBrush = Brushes.LightGreen;
            }
            else
            {
                WrongCredentials();
            }

            return(isValid);
        }
Esempio n. 4
0
        private void ValidateEmail()
        {
            bool isValidEmail;

            tbEmail.BorderBrush = Brushes.Transparent;
            isValidEmail        = ValidationData.ValidateEmail(tbEmail.Text);
            if (isValidEmail)
            {
                tbEmail.BorderBrush = Brushes.Green;
                isUpdateEmail       = true;
            }
            else
            {
                tbEmail.BorderBrush      = Brushes.Red;
                isValidData              = false;
                imgErrorEmail.Visibility = Visibility.Visible;
            }
            emailEdit = tbEmail.Text;
        }