public FormEjerciciosAlta(Ejercicios form_anterior, String id_comunidad_cargado, String id_ejercicio_cargado)
 {
     InitializeComponent();
     this.form_anterior        = form_anterior;
     this.id_comunidad_cargado = id_comunidad_cargado;
     this.id_ejercicio_cargado = id_ejercicio_cargado;
 }
Example #2
0
        private void ejerciciosToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Form existe = Application.OpenForms.OfType <Form>().Where(pre => pre.Name.Contains(nombre_comunidad + " Ejercicios")).SingleOrDefault <Form>();

            if (existe != null)
            {
                existe.WindowState = FormWindowState.Maximized;
                existe.BringToFront();
                //this.Size = new Size(862, 685);
            }
            else
            {
                EjerciciosForms.Ejercicios newMDIChild = new EjerciciosForms.Ejercicios(id_comunidad.ToString());
                newMDIChild.MdiParent   = this;
                newMDIChild.WindowState = FormWindowState.Maximized;
                newMDIChild.Show();
                //this.Size = new Size(862,685);
            }
        }