コード例 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            this.Hide();
            Librarianloggedin menu = new Librarianloggedin();

            menu.Show();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            string name;
            string pass;

            name = textBox1.Text;
            pass = textBox2.Text;
            if (name == "Hamza" && pass == "123")
            {
                this.Hide();
                Librarianloggedin menu = new Librarianloggedin();
                menu.Show();
            }
            else
            {
                MessageBox.Show("Incorrect Username or Password");
                textBox1.Text = "";
                textBox2.Text = "";
            }
        }