Messages shown in the console with a specified color and prefix
示例#1
0
文件: Log.cs 项目: Cyral/Bricklayer
 /// <summary>
 /// Writes text to the console on a new line, using the specified log prefix
 /// </summary>
 public static void WriteLine(LogType type, string text)
 {
     type.WriteText(text);
 }
示例#2
0
文件: Log.cs 项目: Cyral/Bricklayer
 /// <summary>
 /// Writes text to the console on a new line, using the specified log prefix, and a color for the rest of the text
 /// </summary>
 public static void WriteLine(LogType type, ConsoleColor color, string text, params object[] objs)
 {
     WriteLine(type, color, string.Format(text, objs));
 }
示例#3
0
文件: Log.cs 项目: Cyral/Bricklayer
        static LogType()
        {
            sb = new StringBuilder();

            //Types
            Standard = new LogType("", ConsoleColor.White);
            Error = new LogType("Error", ConsoleColor.Red);
            Chat = new LogType("Chat", ConsoleColor.Yellow);
            Server = new LogType("Server", ConsoleColor.Green);
            Room = new LogType("Room", ConsoleColor.Magenta);
            Status = new LogType("Status", ConsoleColor.Cyan);
        }
示例#4
0
文件: Log.cs 项目: Cyral/Bricklayer
 /// <summary>
 /// Writes text to the console on a new line, using the specified log prefix, and a color for the rest of the text
 /// </summary>
 public static void WriteLine(LogType type, ConsoleColor color, string text)
 {
     type.WriteText(text, color);
 }