private void button1_Click_1(object sender, EventArgs e) { bool f = true; string users = " "; if (textBox1.Text != textBox4.Text) { label5.Text = "Не совпадает"; } else { if (textBox2.Text + textBox4.Text == users) { f = false; } else { users = textBox2.Text + textBox4.Text; } if (f) { Form3 frm3 = new WindowsFormsApplication3.Form3(); frm3.Show(); this.Close(); } else { MessageBox.Show("Такой пользователь уже существует"); } } }
private void button1_Click(object sender, EventArgs e) { Form3 frm3 = new WindowsFormsApplication3.Form3(); Form1 frm = new Form1(); frm3.Show(); frm.Close(); }
private void button1_Click_1(object sender, EventArgs e) { if (textBox1.Text != textBox4.Text) { label5.Text = "Не совпадает"; } else { Form3 frm3 = new WindowsFormsApplication3.Form3(); Form2 frm2 = new Form2(); frm3.Show(); frm2.Close(); } }