Esempio n. 1
0
 /// <summary>
 /// Ctor: take parent.
 /// </summary>
 /// <param name="parent"></param>
 internal ZenControlBase(ZenControlBase parent)
 {
     // Remember parent.
     this.parent = parent;
     // If there is a parent provided at this point...
     if (parent != null)
     {
         // Add myself to parent's children.
         parent.zenChildren.Add(this);
         // Find top-level parent, which is the form.
         ZenControlBase xpar = parent;
         while (xpar != null && !(xpar is ZenTabbedForm))
         {
             xpar = xpar.Parent;
         }
         if (xpar != null)
         {
             parentForm = xpar as ZenTabbedForm;
         }
         else
         {
             parentForm = parent.parentForm;
         }
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Ctor: take parent (form) and button type.
 /// </summary>
 /// <param name="owner"></param>
 public ZenSystemButton(ZenTabbedForm owner, SystemButtonType btnType)
     : base(owner)
 {
     this.btnType = btnType;
     if (btnType == SystemButtonType.Close)
         LogicalSize = ZenParams.CloseBtnLogicalSize;
     else
         LogicalSize = ZenParams.OtherSysBtnLogicalSize;
     lineWidth = (int)(2F * Scale);
 }
Esempio n. 3
0
 /// <summary>
 /// Ctor: take parent (form) and button type.
 /// </summary>
 /// <param name="owner"></param>
 public ZenSystemButton(ZenTabbedForm owner, SystemButtonType btnType)
     : base(owner)
 {
     this.btnType = btnType;
     if (btnType == SystemButtonType.Close)
     {
         LogicalSize = ZenParams.CloseBtnLogicalSize;
     }
     else
     {
         LogicalSize = ZenParams.OtherSysBtnLogicalSize;
     }
     lineWidth = (int)(2F * Scale);
 }
Esempio n. 4
0
 /// <summary>
 /// Ctor: take parent.
 /// </summary>
 /// <param name="parent"></param>
 internal ZenControlBase(ZenControlBase parent)
 {
     // Remember parent.
     this.parent = parent;
     // If there is a parent provided at this point...
     if (parent != null)
     {
         // Add myself to parent's children.
         parent.zenChildren.Add(this);
         // Find top-level parent, which is the form.
         ZenControlBase xpar = parent;
         while (xpar != null && !(xpar is ZenTabbedForm)) xpar = xpar.Parent;
         if (xpar != null) parentForm = xpar as ZenTabbedForm;
         else parentForm = parent.parentForm;
     }
 }
Esempio n. 5
0
 public ZenTabControl(ZenTabbedForm owner, bool isMain)
     : base(owner)
 {
     this.isMain = isMain;
     font        = SystemFontProvider.Instance.GetSystemFont(FontStyle.Regular, ZenParams.HeaderTabFontSize);
 }