Пример #1
0
            /// <summary>
            /// Gets a figure to display the given styled text section (using the unselected style).
            /// </summary>
            /// <param name="Line">The index of the line where the text section begins.</param>
            /// <param name="Offset">The offset (in cells) of the beginning of the text section from the start of the line.</param>
            private static Figure _GetFigure(TextBlockStyle BlockStyle, StyledTextSection TextSection, ref int Line, ref int Offset)
            {
                UniformStyledTextSection usts = TextSection as UniformStyledTextSection;
                if (usts != null)
                {
                    return _GetFigure(BlockStyle, usts.NormalStyle, usts.Source, ref Line, ref Offset);
                }

                ConcatStyledTextSection csts = TextSection as ConcatStyledTextSection;
                if (csts != null)
                {
                    return
                        _GetFigure(BlockStyle, csts.A, ref Line, ref Offset) +
                        _GetFigure(BlockStyle, csts.B, ref Line, ref Offset);
                }

                throw new NotImplementedException();
            }
Пример #2
0
 public ConcatStyledTextSection(StyledTextSection A, StyledTextSection B)
 {
     this.Size = A.Size + B.Size;
     this.A = A;
     this.B = B;
 }
Пример #3
0
 public TextBlock(StyledTextSection Text, TextBlockStyle Style)
 {
     this.Style = Style;
     this._Text = Text;
 }