Exemplo n.º 1
0
 /// <summary>
 /// This function gets a form, decrement children and show this form
 /// if there is no children
 /// </summary>
 /// <param name="childForm"></param>
 private void closeChild(TemplateForm childForm)
 {
     this.childrenNum--;
     if (childrenNum == 0)
         this.Show();
 }
Exemplo n.º 2
0
 /// <summary>
 /// This function get a form, show it and hide this.
 /// It also sets parent field of the form to this.
 /// </summary>
 private void newChild(TemplateForm childForm)
 {
     TemplateForm parent = this.parent == null ? this : this.parent;
     childForm.parent = parent;
     parent.childrenNum++;
     parent.Hide();
     childForm.Show();
 }