Exemple #1
0
        private void editProfileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            panel1.Controls.Clear();
            UserPage Form1 = new UserPage();

            Form1.TopLevel = false;
            panel1.Controls.Add(Form1);
            Form1.Show();
        }
        private void CreateAccnt_Click1(object sender, EventArgs e)
        {
            Console.WriteLine(ValidatePassword(pwd.Text).ToString());
            if (userName.Text == "")
            {
                MessageBox.Show("Please do enter user name it is mandatory!", "Validation", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
            }
            else if (pwd.Text == "")
            {
                MessageBox.Show("Password Mandatory!", "Password Validation", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
            }
            else if (pwd.Text.Length < 6)
            {
                MessageBox.Show("Minimum 6 characters required", "Password Validation", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
            }
            else if (!ValidatePassword(pwd.Text))
            {
                MessageBox.Show("Check the criteria for password; Minimum 1 special character, number and Uppercase alphabet", "Password Validatation", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else if (newPwd.Text != pwd.Text)
            {
                MessageBox.Show("Re enter password carefully!");
            }
            else
            {
                UserPage Form1 = new UserPage();
                //MessageBox.Show("Please enter all essential details now !!");
                username         = userName.Text;
                password         = pwd.Text;
                Program.userName = username;

                Form1.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
                Form1.Show();
                this.Hide();
            }
        }
        private void profileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            UserPage Form1 = new UserPage();

            Form1.Show();
        }