Пример #1
0
        private void Submit_Click(object sender, RoutedEventArgs e)
        {
            String text;

            text = vm.CallRegister(textBoxEmail.Text, passwordBox1.Password, passwordBoxConfirm.Password);
            if (text == "Enter a username.")
            {
                textBoxEmail.Focus();
            }
            else if (text == "Enter password.")
            {
                passwordBox1.Focus();
            }
            else if (text == "Enter Confirm password")
            {
                passwordBoxConfirm.Focus();
            }
            else if (text == "Confirm password must be same as password.")
            {
                passwordBoxConfirm.Focus();
            }
            else if (text == "")
            {
                Reset();
            }
            errormessage.Text = text;
        }