void BlameCommitter_ScrollPosChanged(object sender, EventArgs e) { if (!_bChangeScrollPosition) { _bChangeScrollPosition = true; SyncBlameFileView(); _bChangeScrollPosition = false; } Rectangle rect = BlameCommitter.ClientRectangle; rect = BlameCommitter.RectangleToScreen(rect); if (rect.Contains(MousePosition)) { Point p = BlameCommitter.PointToClient(MousePosition); MouseEventArgs me = new MouseEventArgs(0, 0, p.X, p.Y, 0); BlameCommitter_MouseMove(null, me); } }
private int GetBlameLine() { if (_blame == null) { return(-1); } Point position = BlameCommitter.PointToClient(MousePosition); int line = BlameCommitter.GetLineFromVisualPosY(position.Y); if (line >= _blame.Lines.Count) { return(-1); } return(line); }
private void BlameCommitter_VScrollPositionChanged(object sender, EventArgs e) { if (!_changingScrollPosition) { _changingScrollPosition = true; BlameFile.VScrollPosition = BlameCommitter.VScrollPosition; _changingScrollPosition = false; } Rectangle rect = BlameCommitter.ClientRectangle; rect = BlameCommitter.RectangleToScreen(rect); if (rect.Contains(MousePosition)) { Point p = BlameCommitter.PointToClient(MousePosition); var me = new MouseEventArgs(0, 0, p.X, p.Y, 0); BlameCommitter_MouseMove(null, me); } }