예제 #1
0
 /// <summary>
 ///     Writes something using the secondary color
 /// </summary>
 /// <param name="sequence">The sequence.</param>
 /// <param name="text">The text.</param>
 public virtual void WriteSecondary(IInlineSequence sequence, string text)
 {
     sequence.PushColor(ViewModel.Theme.SecondaryTextColor);
     sequence.AppendText(text);
     StringBuilder.Append(text);
     sequence.PopFormatting();
 }
예제 #2
0
파일: Br.cs 프로젝트: tig/CsConsoleFormat
 public override void GenerateSequence(IInlineSequence sequence)
 {
     if (sequence == null)
     {
         throw new ArgumentNullException(nameof(sequence));
     }
     sequence.AppendText("\n");
 }
예제 #3
0
        public override void GenerateSequence (IInlineSequence sequence)
        {
            if (sequence == null)
                throw new ArgumentNullException(nameof(sequence));

            if (Color != null)
                sequence.PushColor(Color.Value);
            if (Background != null)
                sequence.PushBackground(Background.Value);

            if (Text != null) {
                sequence.AppendText(Text);
            }
            else {
                foreach (InlineElement child in VisualChildren.Cast<InlineElement>())
                    child.GenerateSequence(sequence);
            }

            if (Background != null)
                sequence.PopFormatting();
            if (Color != null)
                sequence.PopFormatting();
        }
예제 #4
0
        public override void GenerateSequence(IInlineSequence sequence)
        {
            if (sequence == null)
            {
                throw new ArgumentNullException(nameof(sequence));
            }

            if (Color != null)
            {
                sequence.PushColor(Color.Value);
            }
            if (Background != null)
            {
                sequence.PushBackground(Background.Value);
            }

            if (Text != null)
            {
                sequence.AppendText(Text);
            }
            else
            {
                foreach (InlineElement child in VisualChildren.Cast <InlineElement>())
                {
                    child.GenerateSequence(sequence);
                }
            }

            if (Background != null)
            {
                sequence.PopFormatting();
            }
            if (Color != null)
            {
                sequence.PopFormatting();
            }
        }
예제 #5
0
파일: Br.cs 프로젝트: jhorv/CsConsoleFormat
 public override void GenerateSequence (IInlineSequence sequence)
 {
     if (sequence == null)
         throw new ArgumentNullException(nameof(sequence));
     sequence.AppendText("\n");
 }