private void button1_Click(object sender, EventArgs e) { if (txtpesquisar.Text == "bolo de chocolate") { Tela_1 tela1 = new Tela_1(); tela1.Show(); } else if (txtpesquisar.Text == "bolo de cenoura") { Tela_2 tela2 = new Tela_2(); tela2.Show(); } else if (txtpesquisar.Text == "torta holandesa") { Tela_3 tela3 = new Tela_3(); tela3.Show(); } else if (txtpesquisar.Text == "mousse de maracuja") { Tela_4 tela4 = new Tela_4(); tela4.Show(); } else { MessageBox.Show("Busca inválida", "Aviso"); } txtpesquisar.Clear(); }
private void btnapre_Click(object sender, EventArgs e) { switch (cmbescolha.Text) { case "Bolo de Chocolate": Tela_1 tela1 = new Tela_1(); tela1.Show(); break; case "Bolo de Cenoura": Tela_2 tela2 = new Tela_2(); tela2.Show(); break; case "Torta Holandesa": Tela_3 tela3 = new Tela_3(); tela3.Show(); break; default: Tela_4 tela4 = new Tela_4(); tela4.Show(); break; } LimparTela(); }
private void tela4ToolStripMenuItem_Click(object sender, EventArgs e) { this.hide(); frmTela4.MdiParent = this; frmTela4.Show(); this.toolStripStatusLabel1.Text = "Mousse de Maracujá"; }