コード例 #1
0
        private void bunifuFlatButton1_Click(object sender, EventArgs e)
        {
            string u = "^[a-zA-Z]{1,10}$";
            string p = "^[a-zA-Z0-9]{1,10}$";

            if (!Regex.IsMatch(UserName.Text, u))
            {
                MessageBox.Show(" Invalid Username! ");
            }
            else
            {
                if (!Regex.IsMatch(Password.Text, p))
                {
                    MessageBox.Show(" Invalid Password! ");
                }
                else
                {
                    if ((UserName.Text == "Admin") && (Password.Text == "admin"))
                    {
                        this.Hide();
                        WelcomeForm wf = new WelcomeForm();
                        wf.Show();
                    }
                    else
                    {
                        MessageBox.Show("Please Enter Correct Details!");
                    }
                }
            }
        }
コード例 #2
0
        private void bunifuImageButton1_Click(object sender, EventArgs e)
        {
            this.Close();
            WelcomeForm wf = new WelcomeForm();

            wf.Show();
        }
コード例 #3
0
        private void bunifuImageButton2_Click(object sender, EventArgs e)
        {
            WelcomeForm wf = new WelcomeForm();

            wf.Show();
            this.Hide();
        }