private void comunicadosGeneralesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form existe = Application.OpenForms.OfType <Form>().Where(pre => pre.Name == "Envios").SingleOrDefault <Form>();

            if (existe != null)
            {
                existe.WindowState = FormWindowState.Maximized;
                existe.BringToFront();
            }
            else
            {
                Presentacion.ComunidadesForms.EnviosForms.Envios newMDIChild = new Presentacion.ComunidadesForms.EnviosForms.Envios();
                newMDIChild.MdiParent   = this;
                newMDIChild.WindowState = FormWindowState.Maximized;
                newMDIChild.Show();
            }
        }
示例#2
0
        private void documentosYComunicacionesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form existe = Application.OpenForms.OfType <Form>().Where(pre => pre.Name.Contains(nombre_comunidad + " Envios")).SingleOrDefault <Form>();

            if (existe != null)
            {
                existe.WindowState = FormWindowState.Maximized;
                existe.BringToFront();
            }
            else
            {
                EnviosForms.Envios newMDIChild = new EnviosForms.Envios(id_comunidad.ToString());
                newMDIChild.MdiParent   = this;
                newMDIChild.WindowState = FormWindowState.Maximized;
                newMDIChild.Show();
            }
        }