コード例 #1
0
 protected override void OnMouseLeave(EventArgs e)
 {
     base.OnMouseLeave(e);
     _state = HelperMethods.MouseMode.Normal;
     Cursor = Cursors.Default;
     Invalidate();
 }
コード例 #2
0
 protected override void OnMouseUp(MouseEventArgs e)
 {
     base.OnMouseUp(e);
     _state = HelperMethods.MouseMode.Hovered;
     Cursor = Cursors.Hand;
     Invalidate();
 }
コード例 #3
0
ファイル: YoutubeTextbox.cs プロジェクト: l4km47/Youtube-skin
 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;
     }
 }
コード例 #4
0
 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;
 }
コード例 #5
0
 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";
 }
コード例 #6
0
ファイル: YoutubeTextbox.cs プロジェクト: l4km47/Youtube-skin
 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();
 }
コード例 #7
0
 protected override void OnMouseLeave(EventArgs e)
 {
     base.OnMouseLeave(e);
     State = HelperMethods.MouseMode.Normal;
     Invalidate();
 }
コード例 #8
0
 protected override void OnMouseHover(EventArgs e)
 {
     base.OnMouseHover(e);
     State = HelperMethods.MouseMode.Hovered;
     Invalidate();
 }
コード例 #9
0
 protected override void OnMouseDown(MouseEventArgs e)
 {
     base.OnMouseDown(e);
     State = HelperMethods.MouseMode.Pushed;
     Invalidate();
 }
コード例 #10
0
ファイル: YoutubeTextbox.cs プロジェクト: l4km47/Youtube-skin
 private void T_MouseEnter(object sender, EventArgs e)
 {
     _state = HelperMethods.MouseMode.Pushed;
     Invalidate();
 }
コード例 #11
0
ファイル: YoutubeTextbox.cs プロジェクト: l4km47/Youtube-skin
 private void T_MouseLeave(object sender, EventArgs e)
 {
     _state = HelperMethods.MouseMode.Normal;
     Invalidate();
 }