protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); if (e.Button == System.Windows.Forms.MouseButtons.Left) { isMouseDownInButton = false; if (BTR.Contains(e.Location)) { thumbButton.State = GMButtonState.Hover; } else { thumbButton.State = GMButtonState.Normal; } } }
protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); if (isMouseDownInButton) { DoWhenMouseMoveInButton(e.Location); } if (!base.Capture) { if (BTR.Contains(e.Location)) { thumbButton.State = GMButtonState.Hover; } else { thumbButton.State = GMButtonState.Normal; } } }
protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); if (e.Button == System.Windows.Forms.MouseButtons.Left) { if (TabStop) { base.Focus(); } if (BTR.Contains(e.Location)) { isMouseDownInButton = true; thumbButton.State = GMButtonState.Pressed; } else if (MainLineRectHitTest.Contains(e.Location)) { DoWhenMouseDownInMainLine(e.Location); } } }