private void fctb_PaintLine(object sender, PaintLineEventArgs e) { //draw current line marker if (e.LineIndex == fctb.Selection.Start.iLine) using (var brush = new LinearGradientBrush(new Rectangle(0, e.LineRect.Top, 15, 15), Color.LightPink, Color.Red, 45)) e.Graphics.FillEllipse(brush, 0, e.LineRect.Top, 15, 15); }
public void fastColoredTextBox1_PaintLine(object sender, PaintLineEventArgs e) { var i = 0; while (i < _line.Length) { if (e.LineIndex == _line[i]) { Brush brush; Point[] points = new Point[3]; points[0] = new Point(0, e.LineRect.Top); points[1] = new Point(15, e.LineRect.Top + 7); points[2] = new Point(0, e.LineRect.Top + 15); using (brush = new SolidBrush(Color.Red)) { e.Graphics.FillPolygon(brush, points); } //using (brush = new LinearGradientBrush(new Rectangle(0, e.LineRect.Top, 15, 15), Color.LightPink, Color.Red, 45)) // e.Graphics.FillEllipse(brush, 0, e.LineRect.Top, 15, 15); //points[1] = new Point(0, e.LineRect.Top); //points[2] = new Point(e.LineRect.Top, e.LineRect.Top); //e.Graphics.FillEllipse(brush, 0, e.LineRect.Top, 15, 45); } i++; } }
private void fctbMain_PaintLine(object sender, PaintLineEventArgs e) { if (CurrentEditor.Errors.Contains(e.LineIndex)) { highlighter.HighlightError(e); } }
private void fastColoredTextBox1_PaintLine(object sender, PaintLineEventArgs e) { int i = 0; while (i < _line.Length) { if (e.LineIndex == _line[i]) { var projectWindow = new ProjectWindow(); //projectWindow.Populate(""); Brush brush; using (brush = new LinearGradientBrush(new Rectangle(0, e.LineRect.Top, 15, 15), Color.LightPink, Color.Red, 45)) e.Graphics.FillEllipse(brush, 0, e.LineRect.Top, 15, 15); var x = 0; while (x <= i) { projectWindow.feedback.Text += _error[x]; // projectWindow.Populate(projectWindow.feedback.Text); // _fochild.Errortext.Text += feedback.Text; x++; } } i++; } }
private void fctb_PaintLine(object sender, PaintLineEventArgs e) { var isChanged = fctb[e.LineIndex].IsChanged; if(isChanged) using(var brush = new SolidBrush(Color.FromArgb(100, Color.Red))) e.Graphics.FillRectangle(brush, e.LineRect.Left - 12, e.LineRect.Top, 5, e.LineRect.Height); }
protected override void OnPaintLine(PaintLineEventArgs e) { base.OnPaintLine(e); if (indexs.ContainsKey(e.LineIndex)) { e.Graphics.FillRectangle(b, e.LineRect); } }
private void fastColoredTextBox1_PaintLine(object sender, PaintLineEventArgs e) { if (errorlines.Contains(e.LineIndex)) { using (var brush = new LinearGradientBrush(new Rectangle(0, e.LineRect.Top, 15, 15), Color.LightPink, Color.Red, 45)) e.Graphics.FillEllipse(brush, 0, e.LineRect.Top, 15, 15); } }
private void fctb_PaintLine(object sender, PaintLineEventArgs e) { //draw current line marker if (e.LineIndex == fctb.Selection.Start.iLine) { e.Graphics.FillEllipse(new LinearGradientBrush(new Rectangle(0, e.LineRect.Top, 15, 15), Color.LightPink, Color.Red, 45), 0, e.LineRect.Top, 15, 15); } }
private void fctb_PaintLine(object sender, PaintLineEventArgs e) { //draw bookmark if (bookmarksLineId.Contains(fctb[e.LineIndex].UniqueId)) { e.Graphics.FillEllipse(new LinearGradientBrush(new Rectangle(0, e.LineRect.Top, 15, 15), Color.White, Color.PowderBlue, 45), 0, e.LineRect.Top, 15, 15); e.Graphics.DrawEllipse(Pens.PowderBlue, 0, e.LineRect.Top, 15, 15); } }
private void editor_PaintLine(object sender, PaintLineEventArgs e) { drawCodeBox(e); int padding = 5; var line = editor.Lines[e.LineIndex].Trim(); if (line.IndexOf("#address", StringComparison.OrdinalIgnoreCase) >= 0) { var address = compiler.Program.LineAddress(e.LineIndex); var colorName = line.Length > 9 ? line.Substring(9).Trim() : "royalblue"; Color color; try { color = System.Drawing.ColorTranslator.FromHtml(colorName); } catch (Exception) { color = Color.Transparent; } var addrStr = String.Format("@{0:X4}", address); e.Graphics.DrawString( addrStr, new Font(editor.Font.FontFamily, editor.Font.Size, FontStyle.Bold, editor.Font.Unit), new SolidBrush(color), new Rectangle(padding, e.LineRect.Top, editor.LeftPadding - padding, e.LineRect.Height), new StringFormat() { FormatFlags = StringFormatFlags.NoWrap, Trimming = StringTrimming.EllipsisCharacter } ); return; } if (e.LineIndex >= codeLines.Length || editor.LeftPadding <= padding) { return; } var code = codeLines[e.LineIndex]; var codeStr = String.Join(" ", code.Select(b => b.ToString("X2"))); e.Graphics.DrawString( codeStr, editor.Font, Brushes.Gray, new Rectangle(padding, e.LineRect.Top, editor.LeftPadding - padding, e.LineRect.Height), new StringFormat() { FormatFlags = StringFormatFlags.NoWrap, Trimming = StringTrimming.EllipsisCharacter } ); }
void tb_PaintLine(object sender, PaintLineEventArgs e) { TbInfo info = (sender as FastColoredTextBox).Tag as TbInfo; //draw bookmark if (info.bookmarksLineId.Contains((sender as FastColoredTextBox)[e.LineIndex].UniqueId)) { e.Graphics.FillEllipse(new LinearGradientBrush(new Rectangle(0, e.LineRect.Top, 15, 15), Color.White, Color.PowderBlue, 45), 0, e.LineRect.Top, 15, 15); e.Graphics.DrawEllipse(Pens.PowderBlue, 0, e.LineRect.Top, 15, 15); } }
public void PaintLine(object sender, PaintLineEventArgs e) { //draw current line marker foreach (int linenumber in draw_lines) { if (e.LineIndex == linenumber) { e.Graphics.FillEllipse(Brushes.Green, 0, e.LineRect.Top, 10, 10); } } }
private void Editor_PaintLine(object sender, PaintLineEventArgs e) { if (e.LineIndex == errorLine) { using (var brush = new SolidBrush(Color.Red)) e.Graphics.FillPolygon(brush, new PointF[] { // Draw a triangle new PointF(2, e.LineRect.Top + 3), new PointF(10, e.LineRect.Top + 8), new PointF(2, e.LineRect.Top + 13) }); } }
public void HighlightError(PaintLineEventArgs e) { Brush brush; switch (ErrorStrategy) { case ErrorHighlightStrategy.UNDERLINE: brush = new HatchBrush(HatchStyle.Wave, Color.Red, Color.Transparent); e.Graphics.FillRectangle(brush, ProgramData.MainForm.fctbMain.LeftIndent, e.LineRect.Top + e.LineRect.Height, e.LineRect.Width, e.LineRect.Height / 5); break; case ErrorHighlightStrategy.LINE_NUMBER: e.Graphics.FillRectangle(Brushes.MistyRose, 0, e.LineRect.Top, ProgramData.MainForm.fctbMain.LeftIndent - 10, e.LineRect.Height); break; } }
private void drawCodeBox(PaintLineEventArgs e) { var firstLine = editor.VisibleRange.Count() == 0 ? -1 : editor.VisibleRange.First().iLine; if (firstLine == -1 || e.LineIndex == firstLine) { e.Graphics.FillRectangle( Brushes.LightYellow, new Rectangle(0, 0, editor.LeftPadding, editor.Height) ); e.Graphics.DrawLine( new Pen(Color.DimGray, resizeCodeAreaHover ? 5 : 1), new Point(editor.LeftPadding, 0), new Point(editor.LeftPadding, editor.Height) ); } }
private void Fctb_PaintLine(object sender, PaintLineEventArgs e) { try { if (filter != null && lError.line != null && e.LineIndex == lError.line - 1) { Console.WriteLine("Key " + lError.key + "=" + filter.Key + " & slotKey " + lError.slotKey + "=" + filter.SlotKey); if (lError.key == filter.Key && lError.slotKey == filter.SlotKey) { e.Graphics.FillRectangle(Brushes.DarkRed, 0, e.LineRect.Top, fctb.Width, e.LineRect.Height); } } } catch (Exception ex) { throw; } }
private void TextBox_PaintLine(object sender, PaintLineEventArgs e) { if (!Injector.Instance().Loaded) { return; } var PC = Injector.Instance().ReadRegs()[0x09]; if (!mapping.ContainsKey((ushort)PC)) { return; } var line = mapping[(ushort)PC]; if (line == e.LineIndex) { var b = new SolidBrush(Color.Red); e.Graphics.FillRectangle(b, e.LineRect); } }
/// <inheritdoc /> protected override void OnPaintLine(PaintLineEventArgs e) { base.OnPaintLine(e); if (iSyntaxHints.Count == 0) { return; } int lineIndex = e.LineIndex; IContentSyntaxValidationHint hint; if (!iSyntaxHints.TryGetValue(lineIndex, out hint)) { return; } Image image = null; if (hint.Type == EContentValidationSyntaxHintType.Error) { image = iErrorBitmap; } if (hint.Type == EContentValidationSyntaxHintType.Info) { image = iInfoBitmap; } if (hint.Type == EContentValidationSyntaxHintType.Warning) { image = iWarningBitmap; } if (image == null) { return; } e.Graphics.DrawImage(image, 0, e.LineRect.Top + 4, 15, 15); }
private void fctb_PaintLine(object sender, PaintLineEventArgs e) { fctb_control.PaintLine(sender, e); }
protected override void OnPaintLine(PaintLineEventArgs e) { base.OnPaintLine(e); }
private void fastColoredTextBox1_PaintLine(object sender, PaintLineEventArgs e) { if(errorlines.Contains(e.LineIndex)) { using (var brush = new LinearGradientBrush(new Rectangle(0, e.LineRect.Top, 15, 15), Color.LightPink, Color.Red, 45)) e.Graphics.FillEllipse(brush, 0, e.LineRect.Top, 15, 15); } }