Esempio n. 1
0
        private void stylizeLine(StylizerSource source, int line)
        {
            DocumentRow row = source.Document.Rows[line];
            foreach (string s in Keywors)
            {
                int index = 0;
                while (-1 != (index = row.Raw.IndexOf(s, index)))
                {
                    DocumentRange docRange = new DocumentRange();
                    docRange.Start = new DocumentPoint(line, index);
                    docRange.End = new DocumentPoint(line, index + s.Length);

                    source.setFace(docRange, keywordFace);

                    index += s.Length;
                }
            }
        }
Esempio n. 2
0
            public void stylize(StylizerSource source)
            {
                foreach (CoverageReport.InnerBlock b in points)
                {
                    if (b.fileId <= 0)
                        continue;

                    DocumentRange range = new DocumentRange();
                    range.Start = new DocumentPoint((int)(b.startLine - 1), (int)(b.startColumn - 1));
                    range.End = new DocumentPoint((int)(b.endLine - 1), (int)(b.endColumn - 1));

                    StyleFace face = getFace(source, b.visitCount);

                    source.setFace(range, face);
                }
            }