/// <summary> /// Raises the <see cref="E:System.Windows.Forms.Control.MouseLeave" /> event. /// </summary> /// <param name="e">An <see cref="T:System.EventArgs" /> that contains the event data.</param> protected override void OnMouseLeave(EventArgs e) { this._MouseState = Helpers.MouseState.None; this._HotArea = new Rectangle(); this.Invalidate(); base.OnMouseLeave(e); }
/// <summary> /// Initializes a new instance of the <see cref="ZeroitMetroTrackbar" /> class. /// </summary> public ZeroitMetroTrackbar() { this._Style = Design.Style.Light; this._IsScrolling = 0; this._SndSliderPos = 10; this._SliderPos = 0; this._SliderStyle = ZeroitMetroTrackbar.MetroSliderStyle.Rectangular; this._SingleSlider = true; this._Value = 50; this._SecondValue = 30; this._RailWidth = 5; this._SliderWidth = 10; this._UseGradient = true; this._Maximum = 100; this._Minimum = 0; this._LeftColor = Design.MetroColors.AccentBlue; this._RightColor = Design.MetroColors.LightSwitchRail; this._SliderColor = Design.MetroColors.LightDefault; this._BorderColor = Design.MetroColors.LightBorder; this._HoverColor = Design.MetroColors.AccentLightBlue; this._RegionColor = Design.MetroColors.AccentLightBlue; this._GradientColor = Design.MetroColors.ChangeColorBrightness(this._LeftColor, -0.2f); this._RoundingArc = 5; this._MouseState = Helpers.MouseState.None; this._AutoStyle = true; this.Font = new System.Drawing.Font("Segoe UI", 9f); this.SetStyle(ControlStyles.UserPaint | ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true); this.UpdateStyles(); this.BackColor = Color.Transparent; }
/// <summary> /// Initializes a new instance of the <see cref="ZeroitMetroWebChart" /> class. /// </summary> public ZeroitMetroWebChart() { //this.SetStyle(ControlStyles.UserPaint | ControlStyles.SupportsTransparentBackColor | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true); SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw | ControlStyles.UserPaint | ControlStyles.DoubleBuffer | ControlStyles.SupportsTransparentBackColor, true); this._FillColor = Color.FromArgb(50, Design.MetroColors.AccentBlue); this._FillSecondColor = Design.MetroColors.ChangeColorBrightness(Design.MetroColors.AccentBlue, 0.3f); this._WebBorderColor = Color.FromArgb(100, Design.MetroColors.ChangeColorBrightness(Design.MetroColors.AccentBlue, -0.2f)); this._OuterStructureBorder = Design.MetroColors.LightBorder; this._DesignModeColor = Design.MetroColors.LightBorder; this._CornerBorderColor = Design.MetroColors.LightBorder; this._CornerFillColor = Design.MetroColors.ChangeColorBrightness(Design.MetroColors.LightBorder, 0.2f); this._InnerStructureColor = Color.FromArgb(100, Design.MetroColors.LightBorder); this._HatchStyle = System.Drawing.Drawing2D.HatchStyle.BackwardDiagonal; this._FillMode = ZeroitMetroWebChart.FillModes.Gradient; this._AutoStyle = true; this._MouseState = Helpers.MouseState.None; this.Font = new System.Drawing.Font("Segoe UI", 9f); this.Size = new System.Drawing.Size(250, 250); this.UpdateStyles(); }
protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); if (Enabled) { if (!Checked) { foreach (Control C in Parent.Controls) { if (C is FirefoxRadioButton) { ((FirefoxRadioButton)C).Checked = false; } } } Checked = true; if (CheckedChanged != null) { CheckedChanged(this, e); } } State = Helpers.MouseState.Over; Invalidate(); }
/// <summary> /// Raises the <see cref="E:System.Windows.Forms.Control.MouseUp" /> event. /// </summary> /// <param name="e">A <see cref="T:System.Windows.Forms.MouseEventArgs" /> that contains the event data.</param> protected override void OnMouseUp(MouseEventArgs e) { this._MouseState = Helpers.MouseState.Over; Checked = !Checked; Focus(); this.Invalidate(); base.OnMouseUp(e); }
/// <summary> /// Raises the <see cref="E:System.Windows.Forms.Control.MouseDown" /> event. /// </summary> /// <param name="e">A <see cref="T:System.Windows.Forms.MouseEventArgs" /> that contains the event data.</param> protected override void OnMouseDown(MouseEventArgs e) { this._MouseState = Helpers.MouseState.Pressed; if (e.Button == System.Windows.Forms.MouseButtons.Left) { this.UpdateAngle(e.X, e.Y); } base.OnMouseDown(e); }
/// <summary> /// Raises the <see cref="E:System.Windows.Forms.Control.MouseUp" /> event. /// </summary> /// <param name="e">A <see cref="T:System.Windows.Forms.MouseEventArgs" /> that contains the event data.</param> protected override void OnMouseUp(MouseEventArgs e) { this._MouseState = Helpers.MouseState.Over; if (e.Button == System.Windows.Forms.MouseButtons.Left) { this._IsScrolling = 0; } this.Invalidate(); base.OnMouseUp(e); }
protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); if (Enabled) { Checked = !Checked; if (CheckedChanged != null) { CheckedChanged(this, e); } } State = Helpers.MouseState.Over; Invalidate(); }
/// <summary> /// Initializes a new instance of the <see cref="ZeroitMetroNavigationButton" /> class. /// </summary> public ZeroitMetroNavigationButton() { this._Style = Design.Style.Light; this._ArrowDirection = System.Windows.Forms.ArrowDirection.Left; this._ArrowPath = null; this._CircleRect = new RectangleF(); this._BorderColor = Design.MetroColors.LightBorder; this._BorderHoverColor = Design.MetroColors.AccentBlue; this._BorderPressedColor = Design.MetroColors.AccentBlue; this._DefaultColor = Design.MetroColors.LightDefault; this._HoverColor = Design.MetroColors.LightHover; this._PressedColor = Design.MetroColors.AccentBlue; this._ArrowColor = Design.MetroColors.LightBorder; this._ArrowHoverColor = Design.MetroColors.AccentBlue; this._ArrowPressedColor = Design.MetroColors.LightDefault; this._DisabledColor = Design.MetroColors.LightDisabled; this._DisabledArrowColor = Design.MetroColors.DisabledBorder; this._MouseState = Helpers.MouseState.None; this._AutoStyle = true; this.Font = new System.Drawing.Font("Segoe UI", 9f); this.SetStyle(ControlStyles.UserPaint | ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true); this.UpdateStyles(); this.BackColor = Color.Transparent; this.Size = new System.Drawing.Size(24, 24); this._CircleRect = new RectangleF(2.5f, 2.5f, 18f, 18f); this._ArrowPath = new GraphicsPath(FillMode.Alternate); PointF pointF = new PointF(7.5f, 11.5f); GraphicsPath graphicsPath = this._ArrowPath; PointF pointF1 = new PointF(11.5f, 15.5f); graphicsPath.AddLine(pointF1, pointF); GraphicsPath graphicsPath1 = this._ArrowPath; pointF1 = new PointF(11.5f, 7.5f); graphicsPath1.AddLine(pointF, pointF1); this._ArrowPath.StartFigure(); GraphicsPath graphicsPath2 = this._ArrowPath; pointF1 = new PointF(16.5f, 11.5f); graphicsPath2.AddLine(pointF, pointF1); }
/// <summary> /// Initializes a new instance of the <see cref="ZeroitMetroControlBox" /> class. /// </summary> public ZeroitMetroControlBox() { this._LoadDefaultAreas = true; this._IsReady = false; this._DrawDesignModeControl = true; //this._AreaCollection = new MetroControlBoxAreaCollection(); this._AutoStyle = true; this._MouseState = Helpers.MouseState.None; this._HotArea = new Rectangle(); this._HotIndex = 0; this.Size = new System.Drawing.Size(128, 32); this.SetStyle(ControlStyles.UserPaint | ControlStyles.SupportsTransparentBackColor | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true); this.UpdateStyles(); ZeroitMetroControlBox metroControlBox = this; this._AreaCollection.ItemAdded += new EventHandler <MetroControlBoxAreaCollectionEventArgs>(metroControlBox.Area_Added); ZeroitMetroControlBox metroControlBox1 = this; this._AreaCollection.ItemRemoving += new EventHandler <MetroControlBoxAreaCollectionEventArgs>(metroControlBox1.Area_Removed); this.CreateFormHandlers(true); }
/**/ #endregion /// <summary> /// Initializes a new instance of the <see cref="ZeroitMetroChecker" /> class. /// </summary> public ZeroitMetroChecker() { //ZeroitMetroChecker.__ENCAddToList(this); this._DefaultColor = Design.MetroColors.LightHover; this._HoverColor = Design.MetroColors.LightDarkDefault; this._PressedColor = Design.MetroColors.AccentDarkBlue; this._CheckColor = Design.MetroColors.AccentBlue; this._CheckedBorderColor = Design.MetroColors.LightBorder; //this._Checked = false; this._CheckerWidth = 13; this._BoundsWidth = 16; this._CheckerSymbol = ZeroitMetroChecker.MetroCheckerSymbol.Box; this._Style = Design.Style.Light; this._AutoStyle = true; this._MouseState = Helpers.MouseState.None; this.Font = new System.Drawing.Font("Segoe UI", 9f); this.Size = new System.Drawing.Size(this.GetMaxWidth(), 14); this.SetStyle(ControlStyles.UserPaint | ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true); this.BackColor = Color.Transparent; this.UpdateStyles(); }
} /**/ #endregion /// <summary> /// Initializes a new instance of the <see cref="ZeroitMetroButton" /> class. /// </summary> public ZeroitMetroButton() { this._DefaultColor = Design.MetroColors.LightDefault; this._HoverColor = Design.MetroColors.LightDefault; this._PressedColor = Design.MetroColors.AccentBlue; this._BorderColor = Design.MetroColors.LightBorder; this._DrawBorders = true; this._Style = Design.Style.Light; this._DisabledColor = Design.MetroColors.LightDisabled; this._alignment = StringAlignment.Center; this._DialogResult = System.Windows.Forms.DialogResult.None; this._Image = null; this._IsRound = false; this._RoundingArc = 23; this._InvertForeColor = false; this._AutoStyle = true; this._MouseState = Helpers.MouseState.None; this.Font = new System.Drawing.Font("Segoe UI", 9f); this.SetStyle(ControlStyles.UserPaint | ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true); this.BackColor = Color.Transparent; this.UpdateStyles(); }
/// <summary> /// Initializes a new instance of the <see cref="ZeroitMetroSwitch" /> class. /// </summary> public ZeroitMetroSwitch() { this._Style = Design.Style.Light; this._Checked = false; this._DefaultColor = Design.MetroColors.LightSwitchRail; this._BorderColor = Design.MetroColors.LightBorder; this._CheckColor = Design.MetroColors.AccentBlue; this._SwitchColor = Design.MetroColors.LightDefault; this._HoverColor = Design.MetroColors.AccentLightBlue; this._SwitchStyle = ZeroitMetroSwitch.MetroSwitchStyle.Round; this._SwitchWidth = 15; this._RailWidth = 10; this._OnOffText = "OFF|ON"; this._OnText = "ON"; this._OffText = "OFF"; this._AutoStyle = true; this._MouseState = Helpers.MouseState.None; this.Font = new System.Drawing.Font("Segoe UI", 9f); this.SetStyle(ControlStyles.UserPaint | ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true); this.UpdateStyles(); this.BackColor = Color.Transparent; }
/// <summary> /// Raises the <see cref="E:System.Windows.Forms.Control.MouseDown" /> event. /// </summary> /// <param name="e">A <see cref="T:System.Windows.Forms.MouseEventArgs" /> that contains the event data.</param> protected override void OnMouseDown(MouseEventArgs e) { bool flag; this._MouseState = Helpers.MouseState.Pressed; if (e.Button == System.Windows.Forms.MouseButtons.Left) { if (!this._SingleSlider) { if (e.X >= this._SliderPos && e.X < checked (this._SliderPos + this.SliderWidth)) { if ((this._SliderPos == checked (this.Width - this.SliderWidth) ? this._SliderPos <= checked (this._SndSliderPos + this.SliderWidth) : false)) { goto Label1; } flag = true; goto Label1; } Label1: flag = false; if (flag) { this._IsScrolling = 1; } else if ((e.X < this._SndSliderPos || e.X >= checked (this._SndSliderPos + this.SliderWidth) ? false : true)) { this._IsScrolling = 2; } } else { this._IsScrolling = 1; } } base.OnMouseDown(e); }
/// <summary> /// Initializes a new instance of the <see cref="ZeroitMetroKnob" /> class. /// </summary> public ZeroitMetroKnob() { this.percentage = 50f; this.baseAngle = 90f; this.blockAngle = 90f; this.lineEnd = 90; this._Minimum = 0; this._Maximum = 100; this._Value = 50; this._LineLength = 18; this._LineWidth = 1; this._KnobStyle = ZeroitMetroKnob.KnobStyles.Circle; this._FillMode = ZeroitMetroKnob.KnobFillModes.Solid; this._HatchStyle = System.Drawing.Drawing2D.HatchStyle.BackwardDiagonal; this._DrawLineShadow = true; this._Style = Design.Style.Light; this._BorderColor = Design.MetroColors.LightBorder; this._LineColor = Design.MetroColors.LightBorder; this._AccentColor = Design.MetroColors.AccentBlue; this._FillColor = Design.MetroColors.AccentBlue; this._GradientColor = Design.MetroColors.LightDefault; this._DefaultColor = Design.MetroColors.LightDefault; this._AutoStyle = true; this._MouseState = Helpers.MouseState.None; this.Font = new System.Drawing.Font("Segoe UI", 9f); this.SetStyle( ControlStyles.UserPaint | ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true); //this.BackColor = this.FindForm().BackColor; this.UpdateStyles(); }
protected override void OnMouseDown(MouseEventArgs e) { State = Helpers.MouseState.Down; Invalidate(); base.OnMouseDown(e); }
protected override void OnMouseLeave(EventArgs e) { State = Helpers.MouseState.None; Invalidate(); base.OnMouseLeave(e); }
/// <summary> /// Raises the <see cref="E:System.Windows.Forms.Control.MouseDown" /> event. /// </summary> /// <param name="e">A <see cref="T:System.Windows.Forms.MouseEventArgs" /> that contains the event data.</param> protected override void OnMouseDown(MouseEventArgs e) { this._MouseState = Helpers.MouseState.Pressed; this.Invalidate(); base.OnMouseDown(e); }
protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); bool enabled = this.Enabled; if (enabled) { try { IEnumerator enumerator = base.Parent.Controls.GetEnumerator(); while (enumerator.MoveNext()) { Control control = (Control)enumerator.Current; bool flag = control is AetherRadioButton; if (flag) { ((AetherRadioButton)control).Checked = false; } } } finally { } this.Checked = !this.Checked; AetherRadioButton.CheckedChangedEventHandler checkedChangedEvent = this.CheckedChangedEvent; if (checkedChangedEvent != null) { checkedChangedEvent(this, e); } this.State = Helpers.MouseState.Over; base.Invalidate(); } }
protected override void OnMouseUp(MouseEventArgs e) { State = Helpers.MouseState.Over; Invalidate(); base.OnMouseUp(e); }
protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); State = Helpers.MouseState.Down; Invalidate(); }
protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); bool enabled = this.Enabled; if (enabled) { this.State = Helpers.MouseState.Over; this.Checked = !this.Checked; AetherCheckBox.CheckedChangedEventHandler checkedChangedEvent = this.CheckedChangedEvent; if (checkedChangedEvent != null) { checkedChangedEvent(this, e); } base.Invalidate(); } }
protected override void OnLeave(EventArgs e) { base.OnLeave(e); this.State = Helpers.MouseState.None; base.Invalidate(); }
protected override void OnMouseEnter(EventArgs e) { base.OnMouseEnter(e); State = Helpers.MouseState.Over; Invalidate(); }
/// <summary> /// Raises the <see cref="E:System.Windows.Forms.Control.LostFocus" /> event. /// </summary> /// <param name="e">An <see cref="T:System.EventArgs" /> that contains the event data.</param> protected override void OnLostFocus(EventArgs e) { this._MouseState = Helpers.MouseState.None; this.Invalidate(); base.OnLostFocus(e); }
protected override void OnEnter(EventArgs e) { State = Helpers.MouseState.Down; Invalidate(); base.OnEnter(e); }
protected override void OnMouseUp(MouseEventArgs e) { State = Helpers.MouseState.Over; Invalidate(); base.OnMouseUp(e); }
protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); bool enabled = this.Enabled; if (enabled) { this.State = Helpers.MouseState.Down; base.Invalidate(); } }
protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); bool enabled = this.Enabled; if (enabled) { AetherButton.ClickEventHandler clickEvent = this.ClickEvent; if (clickEvent != null) { clickEvent(this, e); } } this.State = Helpers.MouseState.Over; base.Invalidate(); }
protected override void OnMouseLeave(EventArgs e) { base.OnMouseLeave(e); bool enabled = this.Enabled; if (enabled) { this.State = Helpers.MouseState.None; base.Invalidate(); } }
protected override void OnMouseLeave(EventArgs e) { base.OnMouseLeave(e); State = Helpers.MouseState.None; Invalidate(); }
protected override void OnEnter(EventArgs e) { base.OnEnter(e); this.State = Helpers.MouseState.Down; base.Invalidate(); }