Beispiel #1
0
 public FrmRoutine(Routine routine, ChildMainRoutines father)
 {
     InitializeComponent();
     _routine = routine;
     _father  = father;
     _edit    = true;
 }
Beispiel #2
0
        private void btnAddRoutines_Click(object sender, EventArgs e)
        {
            var childRoutines = new ChildMainRoutines();

            if (pnlDashboard.Controls.Count > 0)                                     //Si el panel principal contiene un Formulario hijo
            {
                if (pnlDashboard.Controls[0].GetType() != typeof(ChildMainRoutines)) //Si el tipo de formulario es diferente a ChildMenuProducts
                {
                    OpenChildForm(childRoutines);                                    //Agrega un nuevo formulario de childMenuProducts
                }
                else
                {
                    childRoutines = (ChildMainRoutines)pnlDashboard.Controls[0];
                }
            }
            else
            {
                OpenChildForm(childRoutines);
            }
            var form = new FrmRoutine(childRoutines);

            form.Show();
        }
Beispiel #3
0
 public FrmRoutine(ChildMainRoutines father)
 {
     InitializeComponent();
     _father = father;
     _edit   = false;
 }