protected static void WriteColored(string text, ServerConsoleColor colorPart) { if (DateFormatString != null) { string s = DateTime.Now.ToString(DateFormatString, CultureInfo.CreateSpecificCulture("de-DE")); Console.Write(s); } if (UseColoredPrefixAndSuffix) { text = String.Format("{0}{1}{2}", Prefix, text, Suffix); } else { Console.Write(Prefix); } Console.ForegroundColor = (ConsoleColor)colorPart; Console.Write(text); Console.ResetColor(); Console.BackgroundColor = (ConsoleColor)_backgroundColor; if (UseColoredPrefixAndSuffix == false) { Console.Write(Suffix); } }
public static void WriteLine(ServerConsoleColor colorPart, string text, params object[] args) { Console.ForegroundColor = (ConsoleColor)colorPart; WriteLine(String.Format(text, args)); Console.ResetColor(); Console.BackgroundColor = (ConsoleColor)_backgroundColor; }
public static void WriteLine(ServerConsoleColor colorPart, string text) { Console.ForegroundColor = (ConsoleColor)colorPart; WriteLine(text); Console.ResetColor(); Console.BackgroundColor = (ConsoleColor)_backgroundColor; }
protected void PrintColoredLine(string text, ServerConsoleColor color) { ServerConsole.Write(PrefixColor, PrefixSign); ServerConsole.Write(color, text); ServerConsole.WriteLine(SufixColor, SufixSign); }
protected static void WriteColored(string text, ServerConsoleColor colorPart) { if (DateFormatString != null) { string s = DateTime.Now.ToString(DateFormatString, CultureInfo.CreateSpecificCulture("de-DE")); Console.Write(s); } if (UseColoredPrefixAndSuffix) { text = String.Format("{0}{1}{2}", Prefix, text, Suffix); } else { Console.Write(Prefix); } Console.ForegroundColor = (ConsoleColor) colorPart; Console.Write(text); Console.ResetColor(); Console.BackgroundColor = (ConsoleColor) _backgroundColor; if (UseColoredPrefixAndSuffix == false) { Console.Write(Suffix); } }
public static void WriteLine(ServerConsoleColor colorPart, string text, params object[] args) { Console.ForegroundColor = (ConsoleColor) colorPart; WriteLine(String.Format(text, args)); Console.ResetColor(); Console.BackgroundColor = (ConsoleColor) _backgroundColor; }
public static void WriteLine(ServerConsoleColor colorPart, string text) { Console.ForegroundColor = (ConsoleColor) colorPart; WriteLine(text); Console.ResetColor(); Console.BackgroundColor = (ConsoleColor) _backgroundColor; }