private void cadastroDeCarrosToolStripMenuItem_Click(object sender, EventArgs e) { if (Application.OpenForms.OfType<FrmCadastroCarros>().Count() > 0) { Application.OpenForms.OfType<FrmCadastroCarros>().First().Focus(); } else { FrmCadastroCarros CadastroCarros = new FrmCadastroCarros(); CadastroCarros.MdiParent = this; CadastroCarros.Show(); } }
private void cadastroDeCarrosToolStripMenuItem_Click(object sender, EventArgs e) { if (Application.OpenForms.OfType <FrmCadastroCarros>().Count() > 0) { Application.OpenForms.OfType <FrmCadastroCarros>().First().Focus(); } else { FrmCadastroCarros CadastroCarros = new FrmCadastroCarros(); CadastroCarros.MdiParent = this; CadastroCarros.Show(); } }