protected override void OnMouseDown(MouseEventArgs mevent) { //base.OnMouseDown(mevent); if (DesignMode) { return; } MouseState oldmousestate = MouseState; if (IsCurorInCircle()) { if (mevent.Button == MouseButtons.Left) { times = 10; MouseState = MouseState.DOWN; m_Timer.Enabled = true; m_Timer.Start(); } } else { MouseState = MouseState.OUT; } if (oldmousestate != MouseState) { this.Invalidate(); } }
protected override void OnMouseMove(MouseEventArgs mevent) { //base.OnMouseMove(mevent); if (DesignMode) { return; } MouseState oldMouseState = MouseState; if (IsCurorInCircle()) { if (mevent.Button == MouseButtons.Left) { MouseState = MouseState.DOWN; } else { MouseState = MouseState.HOVER; } } else { MouseState = MouseState.OUT; } if (oldMouseState != MouseState) { this.Invalidate(); } }