private void Go_Home_Button_Click(object sender, EventArgs e) { var form1 = new Employer_Main(); form1.Closed += (s, args) => this.Close(); form1.Show(); this.Hide(); }
private void Button3_Click(object sender, EventArgs e) { if (users.Contains(textBox1.Text) && pass.Contains(textBox2.Text) && Array.IndexOf(users.ToArray(), textBox1.Text) == Array.IndexOf(pass.ToArray(), textBox2.Text)) { var form1 = new Employer_Main(); form1.Closed += (s, args) => this.Close(); form1.Show(); this.Hide(); } else { MessageBox.Show("The username and/or password is incorect and/or empty!"); } }