Beispiel #1
0
        private void start_btn_Click(object sender, EventArgs e)
        {
            Registraion registraion = new Registraion();

            registraion.Show();
            this.ParentForm.Hide();
        }
Beispiel #2
0
        private void back_btn_Click(object sender, EventArgs e)
        {
            Registraion reg = new Registraion();

            reg.Show();
            this.Hide();
        }
Beispiel #3
0
        private void submit_btn_Click(object sender, EventArgs e)
        {
            string name = input_name.Text, email = input_email.Text, pass = input_password.Text, bio = input_bio.Text;

            if (name.Length >= 3 && pass.Length > 7 && bio.Length != 0)
            {
                User u = new User(name, email, pass, bio);
                user_dao.update(u);

                if (from.Equals("profile"))
                {
                    Main main = new Main();
                    main.Show();
                    this.Hide();
                }
                else if (from.Equals("forgot"))
                {
                    Registraion registraion = new Registraion();
                    registraion.Show();
                    this.Hide();
                }
            }
            else if (name.Length < 3)
            {
                name_info.Text = "Required at least 3 Characters!";
            }
            else if (bio.Length == 0)
            {
                bio_info.Text = "Required!";
            }
            else if (pass.Length < 8)
            {
                password_info.Text = "Required at least 8 Characters!";
            }
        }
Beispiel #4
0
 private void user_signout_button_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Do You Want to Sign Out?", "Sign Out", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         sess_dao.clear();
         this.ParentForm.Hide();
         Registraion registraion = new Registraion();
         registraion.Show();
     }
 }
Beispiel #5
0
        /* end : add box-shadow */

        /* start : escape key event */
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            if (keyData == Keys.Escape)
            {
                Registraion registraion = new Registraion();
                registraion.Show();
                this.Hide();
                return(true);
            }
            return(base.ProcessCmdKey(ref msg, keyData));
        }
Beispiel #6
0
 private void user_delete_button_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Do You Want to Delete Your Account?", "Delete Account", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         user_dao.delete(login_user[1]);
         sess_dao.clear();
         this.ParentForm.Hide();
         Registraion registraion = new Registraion();
         registraion.Show();
     }
 }