private void PassSub_Click(object sender, EventArgs e) { if(textBox1.Text.Equals("Scr@bble")) { this.Close(); Form server = new Server.ServerGUI(); server.Show(); } else { textBox1.Clear(); } }
private void textBox1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) { if(e.KeyCode == Keys.Enter) { if (textBox1.Text.Equals("Scr@bble")) { this.Close(); Form server = new Server.ServerGUI(); server.Show(); } else { textBox1.Clear(); } } }