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