public void Stylize(IStylizerSource source) { foreach (var b in points) { if (b.File <= 0) { continue; } var range = new DocumentRange { Start = new DocumentPoint(b.Start.Line - 1, b.Start.Column - 1), End = new DocumentPoint(b.End.Line - 1, b.End.Column - 1) }; source.AssignFace(range, getFace(source, b.VisitCount)); } }
private void stylizeLine(IStylizerSource source, int line) { var row = source.Document.Rows[line]; foreach (var s in Keywors) { var index = 0; while (-1 != (index = row.Raw.IndexOf(s, index, StringComparison.OrdinalIgnoreCase))) { var docRange = new DocumentRange { Start = new DocumentPoint(line, index), End = new DocumentPoint(line, index + s.Length) }; source.AssignFace(docRange, keywordFace); index += s.Length; } } }
public void Stylize(IStylizerSource source) { foreach (var b in points) { if (b.File <= 0) continue; var range = new DocumentRange { Start = new DocumentPoint(b.Start.Line - 1, b.Start.Column - 1), End = new DocumentPoint(b.End.Line - 1, b.End.Column - 1) }; source.AssignFace(range, getFace(source, b.VisitCount)); } }