Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            string login    = textBoxLogin.Text;
            string password = textBoxPassword.Text;

            if (OauthController.CheckAutorization(login, password))
            {
                MessageBox.Show("Done!");
                MainForm f = new MainForm();
                f.Show();
            }
            else
            {
                MessageBox.Show("Authorization failed");
            }
        }
Beispiel #2
0
        private void buttonConfirm_Click(object sender, EventArgs e)
        {
            string       login        = textBoxLogin.Text;
            string       password     = textBoxPassword.Text;
            string       email        = textBoxEmail.Text;
            DialogResult dialogResult = MessageBox.Show("Are you sure?", "Confirmation page", MessageBoxButtons.YesNo);

            if (dialogResult == DialogResult.Yes)
            {
                if (OauthController.ConfirmRegistration(login, password, email))
                {
                    MessageBox.Show("Registration completed succefully");
                    Close();
                }
                else
                {
                    MessageBox.Show("Registration failed");
                }
            }
            else if (dialogResult == DialogResult.No)
            {
                //do something else
            }
        }