public void Refresh(AbstractMargin margin) { this.updateMargin = margin; base.Invalidate(this.updateMargin.DrawingPosition); base.Update(); this.updateMargin = null; }
protected override void OnMouseLeave(EventArgs e) { base.OnMouseLeave(e); this.Cursor = Cursors.Default; if (this.lastMouseInMargin != null) { this.lastMouseInMargin.HandleMouseLeave(EventArgs.Empty); this.lastMouseInMargin = null; } }
protected override void OnMouseMove(MouseEventArgs e) { this.toolTipSet = false; base.OnMouseMove(e); if (!this.toolTipSet) { this.SetToolTip(null); } foreach (AbstractMargin abstractMargin in this.leftMargins) { if (abstractMargin.DrawingPosition.Contains(e.X, e.Y)) { this.Cursor = abstractMargin.Cursor; abstractMargin.HandleMouseMove(new Point(e.X, e.Y), e.Button); if (this.lastMouseInMargin != abstractMargin) { if (this.lastMouseInMargin != null) { this.lastMouseInMargin.HandleMouseLeave(EventArgs.Empty); } this.lastMouseInMargin = abstractMargin; } return; } } if (this.lastMouseInMargin != null) { this.lastMouseInMargin.HandleMouseLeave(EventArgs.Empty); this.lastMouseInMargin = null; } if (!this.textView.DrawingPosition.Contains(e.X, e.Y)) { this.Cursor = Cursors.Default; return; } this.Cursor = this.textView.Cursor; }