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); }
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); }
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)); }
private void syntaxEditor1_UserMarginPaint(object sender, UserMarginPaintEventArgs e) { }
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); }
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); }
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)); }