示例#1
0
 public static void WriteLine(this FiggleFont font, string path, string message, bool showErrors = false)
 {
     try
     {
         using var sw = File.AppendText(path);
         sw.WriteLine(font.Render(message));
     }
     catch (Exception ex)
     {
         if (showErrors)
         {
             ConsoleColor.Red.WriteLine($"[{ex.GetType().Name}] {ex.Message}");
         }
     }
 }
示例#2
0
 public static void WriteLine(this FiggleFont font, string message, bool showErrors = false)
 {
     try
     {
         var color = (ConsoleColor)Colors.GetValue(Random.Next(Colors.Length));
         color.WriteLine(font.Render(message));
     }
     catch (Exception ex)
     {
         if (showErrors)
         {
             ConsoleColor.Red.WriteLine($"[{ex.GetType().Name}] {ex.Message}");
         }
     }
 }