Exemplo n.º 1
0
 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();
     }
 }
Exemplo n.º 2
0
 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();
     }
 }