private void CancelBtn_Click(object sender, EventArgs e) { // Return to rent window this.Close(); ChooseCar chooseCar = new ChooseCar(); chooseCar.ShowDialog(); }
private void btn_Login_Click(object sender, EventArgs e) { ChooseCar frm = new ChooseCar(); Login lgn = new Login(); if (tB_username.Text == "Klas" && tB_Password.Text == "klas123") { label_Error.Text = "Banned for life bitch"; } else if (tB_username.Text == "Göran" && tB_Password.Text == "göran123") { this.Visible = false; frm.ShowDialog(); this.Close(); } else { label_Error.Text = "Non existing username"; } }