private void button3_Click(object sender, EventArgs e) { Impartire impartire = new Impartire(); this.Hide(); impartire.Closed += (s, args) => this.Close(); impartire.Show(); }
private void button2_Click(object sender, EventArgs e) { numitor1 = Convert.ToInt32(textBox2.Text); numitor2 = Convert.ToInt32(textBox4.Text); numitor3 = Convert.ToInt32(textBox6.Text); numarator1 = Convert.ToInt32(textBox1.Text); numarator2 = Convert.ToInt32(textBox3.Text); numarator3 = Convert.ToInt32(textBox5.Text); if (numitor3 == numitor1 * numarator2 && numarator3 == numarator1 * numitor2) { MessageBox.Show("Corect!"); puncte += 2; textBox7.Text = puncte.ToString(); numereRandom(); textBox5.Clear(); textBox6.Clear(); } else { MessageBox.Show("Incorect"); puncte--; textBox7.Text = puncte.ToString(); } if (puncte >= 5) { MessageBox.Show("Felicitari! Ai terminat exercitiile cu impartiri!"); Meniu meniu = new Meniu(); this.Hide(); meniu.Closed += (s, args) => this.Close(); meniu.Show(); } else if (puncte < 0) { MessageBox.Show("MAI CITESTE TEORIA!"); Impartire impartire = new Impartire(); this.Hide(); impartire.Closed += (s, args) => this.Close(); impartire.Show(); } }