private void PassPic_Click(object sender, EventArgs e) { string password = "******"; if (PassTxtBox.Text == password) { FormDesk dsk = new FormDesk(); dsk.Show(); } else { PassPanel.Hide(); TipPanel.Show(); } }
private void Form1_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == 13) { string password = "******"; if (PassTxtBox.Text == password) { FormDesk dsk = new FormDesk(); dsk.Show(); } else { PassPanel.Hide(); TipPanel.Show(); } } }