示例#1
0
 public HighlightTextRun(string text, HighlightTextRun textRun)
     : base(text, textRun)
 {
     this.m_highlightStart      = textRun.m_highlightStart;
     this.m_highlightEnd        = textRun.m_highlightEnd;
     this.m_highlightColor      = textRun.m_highlightColor;
     this.m_charIndexInOriginal = textRun.CharacterIndexInOriginal;
 }
示例#2
0
 public HighlightTextRun(string text, HighlightTextRun textRun, SCRIPT_LOGATTR[] scriptLogAttr)
     : base(text, textRun, scriptLogAttr)
 {
     this.m_highlightStart      = textRun.m_highlightStart;
     this.m_highlightEnd        = textRun.m_highlightEnd;
     this.m_highlightColor      = textRun.m_highlightColor;
     this.m_charIndexInOriginal = textRun.CharacterIndexInOriginal;
 }
示例#3
0
        public override TextRun GetSubRun(int startIndex, int length)
        {
            if (length == base.m_text.Length)
            {
                return(this);
            }
            if (startIndex > 0)
            {
                base.m_textRunProps.AddSplitIndex(startIndex);
            }
            HighlightTextRun highlightTextRun = new HighlightTextRun(base.m_text.Substring(startIndex, length), this);

            highlightTextRun.CharacterIndexInOriginal = startIndex;
            return(highlightTextRun);
        }