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); }
public DecoratedText(DecoratedText t) { if (t != null) { Text = t.ToString(); } else { Text = ""; } }
public UnderlinedText(DecoratedText t) : base(t) { int width = t.Width(); Text = $"{t.ToString()}\n" + new string('_', width); }