Exemple #1
0
        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);
            }
        }
Exemple #2
0
 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;
 }
Exemple #3
0
 public static void WriteLine(ServerConsoleColor colorPart, string text)
 {
     Console.ForegroundColor = (ConsoleColor)colorPart;
     WriteLine(text);
     Console.ResetColor();
     Console.BackgroundColor = (ConsoleColor)_backgroundColor;
 }
Exemple #4
0
 protected void PrintColoredLine(string text, ServerConsoleColor color)
 {
     ServerConsole.Write(PrefixColor, PrefixSign);
     ServerConsole.Write(color, text);
     ServerConsole.WriteLine(SufixColor, SufixSign);
 }
Exemple #5
0
        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);
            }
        }
Exemple #6
0
 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;
 }
Exemple #7
0
 public static void WriteLine(ServerConsoleColor colorPart, string text)
 {
     Console.ForegroundColor = (ConsoleColor) colorPart;
     WriteLine(text);
     Console.ResetColor();
     Console.BackgroundColor = (ConsoleColor) _backgroundColor;
 }
Exemple #8
0
 protected void PrintColoredLine(string text, ServerConsoleColor color)
 {
     ServerConsole.Write(PrefixColor, PrefixSign);
     ServerConsole.Write(color, text);
     ServerConsole.WriteLine(SufixColor, SufixSign);
 }