Ejemplo n.º 1
0
        private void Submit_OnClick(object sender, RoutedEventArgs e)
        {
            _user = SqlConnect.GetEmail(UsernameTxt.Text);

            if (UsernameTxt.BorderBrush.ToString().Equals("#FFF44336"))
            {
                MessageBox.Show("Username doesn't meet requirement");
                return;
            }


            if (_user.Email.Length == 0)
            {
                MessageBox.Show("Username doesn't exist.");
                return;
            }

            if (_user.ResetTimes >= 4)
            {
                MessageBox.Show("You tried to reset 4 times already. Please come back tomorrow.");
                return;
            }

            Hide();
            var mailCode  = new MailCode(_user);
            var resetForm = new ResetPassword(_user);

            resetForm.Closed += (s, args) => Close();
            resetForm.Show();
        }
Ejemplo n.º 2
0
        private void GotCode_OnClick(object sender, RoutedEventArgs e)
        {
            _user = SqlConnect.GetEmail(UsernameTxt.Text);
            if (UsernameTxt.BorderBrush.ToString().Equals("#FFF44336"))
            {
                MessageBox.Show("Username doesn't meet requirement");
                return;
            }


            if (_user.Email.Length == 0)
            {
                MessageBox.Show("Username doesn't exist.");
                return;
            }

            Hide();
            var resetForm = new ResetPassword(_user);

            resetForm.Closed += (s, args) => Close();
            resetForm.Show();
        }