コード例 #1
0
 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;
 }
コード例 #2
0
 public void PrintCustom(TextFormat text)
 {
     OutputRtb.AppendText(text);
     OutputRtb.ScrollToEnd();
 }
コード例 #3
0
        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();
        }
コード例 #4
0
 public void AddText(TextFormat text)
 {
     OutputBox.AppendText(text);
 }
コード例 #5
0
        public void PrintLn(TextFormat text)
        {
            if (!CommandViewModel.IsLoaded)
            {
                return;
            }

            text.Text += "\r";

            ViewModel.Window.Dispatcher.Invoke(ViewModel.PrintingCustom, text);
        }
コード例 #6
0
 public void AddSubstring(TextFormat substring)
 {
     Substrings.Add(substring);
 }