예제 #1
0
        void AppendFormatted(string message, Color foreColor)
        {
            int  index = 0;
            char col   = 'S';

            message = UIHelpers.Format(message);

            while (index < message.Length)
            {
                char   curCol = col;
                string part   = UIHelpers.OutputPart(ref col, ref index, message);
                if (part.Length > 0)
                {
                    AppendColoredText(part, GetCol(curCol, foreColor));
                }
            }
        }
예제 #2
0
 static void Write(string message) {
     int index = 0;
     char col = 'S';
     message = UIHelpers.Format(message);
     
     while (index < message.Length) {
         char curCol = col;
         string part = UIHelpers.OutputPart(ref col, ref index, message);
         if (part.Length > 0) {
             Console.ForegroundColor = GetConsoleCol(curCol);
             Console.Write(part);
         }
     }
     
     Console.ForegroundColor = ConsoleColor.White;
     Console.WriteLine();
 }