protected override void OnMouseLeave(EventArgs e) { base.OnMouseLeave(e); _state = HelperMethods.MouseMode.Normal; Cursor = Cursors.Default; Invalidate(); }
protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); _state = HelperMethods.MouseMode.Hovered; Cursor = Cursors.Hand; Invalidate(); }
public YoutubeTextbox() { SetStyle(ControlStyles.UserPaint | ControlStyles.ResizeRedraw | ControlStyles.OptimizedDoubleBuffer | ControlStyles.SupportsTransparentBackColor, true); DoubleBuffered = true; UpdateStyles(); _textAlign = HorizontalAlignment.Left; _maxLength = 32767; _readOnly = false; _useSystemPasswordChar = false; _watermarkText = string.Empty; _image = null; _state = HelperMethods.MouseMode.Normal; _autoCompleteSource = AutoCompleteSource.None; _autoCompleteMode = AutoCompleteMode.None; _multiline = false; _lines = null; Font = new Font("Segoe UI", 10); T.Multiline = false; T.Cursor = Cursors.IBeam; T.BackColor = Colors.White; T.ForeColor = Colors.Silver; T.BorderStyle = BorderStyle.None; T.Location = new Point(7, 8); T.Font = Font; T.UseSystemPasswordChar = UseSystemPasswordChar; Size = new Size(135, 30); if (Multiline) { T.Height = Height - 11; } else { Height = T.Height + 11; } }
public YoutubeButton() { SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.SupportsTransparentBackColor, true); DoubleBuffered = true; UpdateStyles(); BackColor = Color.Transparent; Font = new Font("Segoe UI", 10); _borderRadius = 0; _style = IStyle.Light; _state = HelperMethods.MouseMode.Normal; }
public YoutubeButtonX() { SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.SupportsTransparentBackColor, true); DoubleBuffered = true; UpdateStyles(); BackColor = Color.Transparent; Font = new Font("Segoe UI", 10); _style = IStyle.Red; _state = HelperMethods.MouseMode.Normal; _leftText = "12,961,386"; _rightText = "Subscribe"; }
private void T_KeyDown(object sender, KeyEventArgs e) { if (e.Control && e.KeyCode == Keys.A) { e.SuppressKeyPress = true; } if (e.Control && e.KeyCode == Keys.C) { T.Copy(); e.SuppressKeyPress = true; } _state = HelperMethods.MouseMode.Pushed; Invalidate(); }
protected override void OnMouseLeave(EventArgs e) { base.OnMouseLeave(e); State = HelperMethods.MouseMode.Normal; Invalidate(); }
protected override void OnMouseHover(EventArgs e) { base.OnMouseHover(e); State = HelperMethods.MouseMode.Hovered; Invalidate(); }
protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); State = HelperMethods.MouseMode.Pushed; Invalidate(); }
private void T_MouseEnter(object sender, EventArgs e) { _state = HelperMethods.MouseMode.Pushed; Invalidate(); }
private void T_MouseLeave(object sender, EventArgs e) { _state = HelperMethods.MouseMode.Normal; Invalidate(); }