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; }
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; }
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); }