private void reorderCursos()
 {
     if (formulario.GetType().Equals(typeof(FormBtnCursos)))
     {
         FormBtnCursos form = (FormBtnCursos)formulario;
         Console.WriteLine(form.getRows() + " " + form.getColumns());
         form.orderComponents(form.getRows(), form.getColumns());
     }
 }
示例#2
0
        public void AbrirFormularioCurso()
        {
            Form formulario;

            formulario = panelForm.Controls.OfType <FormBtnCursos>().FirstOrDefault();//busca en la coleccion del form
            //si el form no existe
            if (formulario == null)
            {
                formulario                 = new FormBtnCursos(data);
                formulario.TopLevel        = false;
                formulario.FormBorderStyle = FormBorderStyle.None;
                formulario.Dock            = DockStyle.Fill;
                panelForm.Controls.Add(formulario);
                panelForm.Tag = formulario;
                formulario.BringToFront();
                formulario.Show();
                formulario.FormClosed += new FormClosedEventHandler(cerrarform);
            }
            //si el form existe
            else
            {
                formulario.BringToFront();
            }
        }