private void button1_Click_1(object sender, EventArgs e) { Meniu meniu = new Meniu(); this.Hide(); meniu.Closed += (s, args) => this.Close(); meniu.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 * numitor2 && numarator3 == numarator1 * numarator2) { 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 inmultiri"); Meniu meniu = new Meniu(); this.Hide(); meniu.Closed += (s, args) => this.Close(); meniu.Show(); } else if (puncte < 0) { MessageBox.Show("MAI CITESTE TEORIA!"); Inmultire inmultire = new Inmultire(); this.Hide(); inmultire.Closed += (s, args) => this.Close(); inmultire.Show(); } }