示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Shopping shop = new Shopping();

            this.Hide();
            shop.FormClosed += (s, args) => this.Close();
            shop.Show();
        }
示例#2
0
文件: Login.cs 项目: hnhoangdz/asm-C-
 private void btnLogin_Click(object sender, EventArgs e)
 {
     if (tbUsername.Text == "" || tbPassword.Text == "")
     {
         MessageBox.Show("You must input full information");
     }
     else
     {
         if (tbUsername.Text != "admin" || tbPassword.Text != "123456")
         {
             MessageBox.Show("You must input correct username and password");
         }
         else
         {
             this.Hide();
             var sp = new Shopping();
             sp.Closed += (s, args) => this.Close();
             sp.Show();
         }
     }
 }