示例#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);
        }