示例#1
0
        private int GetBlameLine()
        {
            if (_blame is null)
            {
                return(-1);
            }

            Point position = BlameAuthor.PointToClient(MousePosition);

            int line = BlameAuthor.GetLineFromVisualPosY(position.Y);

            if (line >= _blame.Lines.Count)
            {
                return(-1);
            }

            return(line);
        }
示例#2
0
        private void BlameAuthor_VScrollPositionChanged(object sender, EventArgs e)
        {
            if (!_changingScrollPosition)
            {
                _changingScrollPosition   = true;
                BlameFile.VScrollPosition = BlameAuthor.VScrollPosition;
                _changingScrollPosition   = false;
            }

            Rectangle rect = BlameAuthor.ClientRectangle;

            rect = BlameAuthor.RectangleToScreen(rect);
            if (rect.Contains(MousePosition))
            {
                Point p  = BlameAuthor.PointToClient(MousePosition);
                var   me = new MouseEventArgs(0, 0, p.X, p.Y, 0);
                BlameAuthor_MouseMove(null, me);
            }
        }