예제 #1
0
        public SurroundedText(DecoratedText t) : base(t)
        {
            string[]      comps = Text.Split('\n');
            StringBuilder sb    = new StringBuilder();

            foreach (string line in comps)
            {
                sb.Append($"|{line}|\n");
            }
            Text = sb.ToString().Substring(0, sb.Length - 1);
        }
예제 #2
0
 public DecoratedText(DecoratedText t)
 {
     if (t != null)
     {
         Text = t.ToString();
     }
     else
     {
         Text = "";
     }
 }
예제 #3
0
        public UnderlinedText(DecoratedText t) : base(t)
        {
            int width = t.Width();

            Text = $"{t.ToString()}\n" + new string('_', width);
        }