public static TextFormat Orange() { TextFormat res = new TextFormat("Only one word here is "); res.Italic = true; TextFormat or = new TextFormat("orange"); or.Italic = false; or.Bold = true; or.Color = ConsoleColor.DarkYellow; res.AddSubstring(or); TextFormat col = new TextFormat("-colored."); col.Italic = true; col.Bold = false; col.Color = ConsoleColor.White; res.AddSubstring(col); return res; }
public void PrintCustom(TextFormat text) { OutputRtb.AppendText(text); OutputRtb.ScrollToEnd(); }
public void Print(string text, ConsoleColor color, bool bold, bool italic, bool underline) { TextFormat tf = new TextFormat(text, color, bold, italic, underline); OutputRtb.AppendText(tf); OutputRtb.ScrollToEnd(); }
public void AddText(TextFormat text) { OutputBox.AppendText(text); }
public void PrintLn(TextFormat text) { if (!CommandViewModel.IsLoaded) { return; } text.Text += "\r"; ViewModel.Window.Dispatcher.Invoke(ViewModel.PrintingCustom, text); }
public void AddSubstring(TextFormat substring) { Substrings.Add(substring); }