Пример #1
0
 private void editorOriginal_UserMarginPaint(object sender, UserMarginPaintEventArgs e)
 {
     if (DesignMode)
     {
         return;
     }
     if (CurrentDiffInfo == null)
     {
         return;
     }
     if (CurrentDiffInfo.IsLineInConflict(e.DocumentLineIndex) == false)
     {
         return;
     }
     userMarginPaint(CurrentDiffInfo.LeftLines, e);
 }
Пример #2
0
 private void editorResolved_UserMarginPaint(object sender, UserMarginPaintEventArgs e)
 {
     if (DesignMode)
     {
         return;
     }
     if (CurrentDiffInfo == null)
     {
         return;
     }
     if (CurrentDiffInfo.RightLines[e.DocumentLineIndex].IsVirtual)
     {
         return;
     }
     if (CurrentDiffInfo.IsLineInConflict(e.DocumentLineIndex))
     {
         return;
     }
     userMarginPaint(CurrentDiffInfo.RightLines, e);
 }
Пример #3
0
        private static void userMarginPaint(IList <DiffLine> lines, UserMarginPaintEventArgs e)
        {
            // Add text to the user margin to indicate what kind of line it is.
            if (e.DocumentLineIndex >= lines.Count)
            {
                return;
            }
            if (lines[e.DocumentLineIndex].Change == ChangeType.None)
            {
                return;
            }

            // Custom draw a word wrap continuation marker
            int        y     = e.DisplayLineBounds.Top;
            Font       font  = new Font("Verdana", 6);
            SolidBrush brush = new SolidBrush(Color.DarkBlue);

            int newX = e.DisplayLineBounds.Left + (int)((e.DisplayLineBounds.Width - e.Graphics.MeasureString(lines[e.DocumentLineIndex].Change.ToString(), font).Width) / 2);

            e.Graphics.DrawString(lines[e.DocumentLineIndex].Change.ToString(), font, brush, new Point(newX, y));
        }
Пример #4
0
 private void syntaxEditor1_UserMarginPaint(object sender, UserMarginPaintEventArgs e)
 {
 }
Пример #5
0
 private void editorResolved_UserMarginPaint(object sender, UserMarginPaintEventArgs e)
 {
     if (DesignMode)
         return;
     if (CurrentDiffInfo == null)
         return;
     if (CurrentDiffInfo.RightLines[e.DocumentLineIndex].IsVirtual)
         return;
     if (CurrentDiffInfo.IsLineInConflict(e.DocumentLineIndex))
         return;
     userMarginPaint(CurrentDiffInfo.RightLines, e);
 }
Пример #6
0
 private void editorOriginal_UserMarginPaint(object sender, UserMarginPaintEventArgs e)
 {
     if (DesignMode)
         return;
     if (CurrentDiffInfo == null)
         return;
     if (CurrentDiffInfo.IsLineInConflict(e.DocumentLineIndex) == false)
         return;
     userMarginPaint(CurrentDiffInfo.LeftLines, e);
 }
Пример #7
0
        private static void userMarginPaint(IList<DiffLine> lines, UserMarginPaintEventArgs e)
        {
            // Add text to the user margin to indicate what kind of line it is.
            if (e.DocumentLineIndex >= lines.Count)
                return;
            if (lines[e.DocumentLineIndex].Change == ChangeType.None) return;

            // Custom draw a word wrap continuation marker
            int y = e.DisplayLineBounds.Top;
            Font font = new Font("Verdana", 6);
            SolidBrush brush = new SolidBrush(Color.DarkBlue);

            int newX = e.DisplayLineBounds.Left + (int)((e.DisplayLineBounds.Width - e.Graphics.MeasureString(lines[e.DocumentLineIndex].Change.ToString(), font).Width) / 2);
            e.Graphics.DrawString(lines[e.DocumentLineIndex].Change.ToString(), font, brush, new Point(newX, y));
        }