예제 #1
0
        private void Window_Initialized(object sender, EventArgs e)
        {
            for (int i = 0; i < RegonStrings.Length - 1; i++)
            {
                RegionsComboBox.Items.Add(RegonStrings[i]);
            }

            int firstnum  = Convert.ToInt32(ValidationClass.GetRandomNumber());
            int secondnum = Convert.ToInt32(ValidationClass.GetRandomNumber());

            result = secondnum + firstnum;
            CaptchaLabel.Content = firstnum.ToString() + "+" + secondnum.ToString() + "=";
        }
예제 #2
0
 private void EmailTextBox_TextChanged(object sender, TextChangedEventArgs e)
 {
     if (ValidationClass.IsValidEmail(EmailTextBox.Text) == true)
     {
         EmailTextBox.Foreground = Brushes.Black;
         ValidEmail = true;
     }
     else
     {
         EmailTextBox.Foreground = Brushes.Red;
         ValidEmail = false;
     }
     EnterButton.IsEnabled = (ValidFirst == true) && (ValidSecond == true) && (ValidThird == true) && (ValidEmail == true) && (ValidPhone == true) && (ValidAge == true);
 }