/// <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; } } }
/// <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); }
/// <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); }
/// <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; } }
public ZenTabControl(ZenTabbedForm owner, bool isMain) : base(owner) { this.isMain = isMain; font = SystemFontProvider.Instance.GetSystemFont(FontStyle.Regular, ZenParams.HeaderTabFontSize); }