Esempio n. 1
0
        private void LabelSignin_Click(object sender, EventArgs e)
        {
            this.Close();
            FormSignin f1 = new FormSignin();

            f1.Show();
        }
Esempio n. 2
0
        private void BtnLogin_Click(object sender, EventArgs e)
        {
            restartTextBoxesStart();
            checkTextBoxes();
            string   name     = txtUsername.Text;
            string   surname  = txtUserSurname.Text;
            string   email    = txtUserEmail.Text;
            Password password = new Password(txtUserPassword.Text, txtUserConfirmPassword.Text);

            if (triggerCheckNullTextBox)
            {
                if (password.confirm())
                {
                    labelDontMatch.Visible = false;
                    Users user = new Users(name, surname, email, password.pass);
                    database.connect();
                    if (database.checkSignupEmail(user.email))
                    {
                        database.insert(user);
                        database.close();
                        MessageBox.Show("Welcome to ToDoList. You can start to enter your task. :)");
                        this.Close();
                        FormSignin f1 = new FormSignin();
                        f1.Show();
                    }
                    else
                    {
                        forgetPassword();
                    }
                    database.close();
                }
                else
                {
                    labelDontMatch.Visible = true;
                }
            }
            else
            {
                MessageBox.Show("Fill in the blanks.");
            }
        }