/// <summary> /// Constructor /// </summary> public DotCoolNativeButton() : base() { this.SetStyle(ControlStyles.DoubleBuffer, true); this.SetStyle(ControlStyles.ResizeRedraw, true); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.UserPaint, true); this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); this.DoubleBuffered = true; m_GradBackSettingsList = new DotCoolCtlGradientSettingsList(this, false); m_TextSettingsList = new DotCoolCtlTextSettingsList(this, false); m_GradBackSettingsList.SettingChanged += GradBackSettingsList_SettingChanged; m_TextSettingsList.SettingChanged += TextSettingsList_SettingChanged; }
/// <summary> /// Constructor /// </summary> public DotCoolPanel() : base() { try { this.SetStyle(ControlStyles.DoubleBuffer, true); this.SetStyle(ControlStyles.ResizeRedraw, true); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.UserPaint, true); this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); this.SetStyle(ControlStyles.ContainerControl, true); this.DoubleBuffered = true; m_GradBackSettingsList = new DotCoolCtlGradientSettingsList(this); } catch (Exception err) { ErrorHandler.ShowErrorMessage(err, "Error in Constructor function of DotCoolPanel class."); } }
/// <summary> /// Constructor /// </summary> public DotCoolCheckBase() : base() { try { m_GradCheckSettingsList = new DotCoolCtlGradientSettingsList(this); //m_CheckBorderSettingsList = new DotCoolCtlBorderSettingsList(this); //m_BorderColorSettings = new DotCoolControls.DotCoolCheckBaseBorderColorSettings(m_CheckBorderSettingsList); for (VisualSettingEnum setting = VisualSettingEnum.Normal; setting <= VisualSettingEnum.Indeterminate; setting++) { m_BorderSettingsList[setting].BorderSize = new Size(14, 14); m_BorderSettingsList[setting].BorderOffset = new Point(1, 1); m_ImageSettingsList[setting].ImageAlign = ContentAlignment.TopLeft; m_TextSettingsList[setting].TextAlign = ContentAlignment.TopLeft; m_TextSettingsList[setting].TextOffset = new Point(16, 1); if (setting != VisualSettingEnum.Normal) { m_GradCheckSettingsList[setting].GradientColor1 = Color.Transparent; } //end if } //next i m_GradBackSettingsList[VisualSettingEnum.Normal].GradientColor1 = Color.White; m_GradCheckSettingsList[VisualSettingEnum.Normal].GradientColor1 = Color.Black; m_BoxBounds = new RectangleF(1, 1, 14, 14); SelectBehavior = ControlSelectBehavior.Control; } catch (Exception err) { ErrorHandler.ShowErrorMessage(err, "Error in Constructor function of DotCoolCheckBase control."); } }