示例#1
0
 static void PrintKeyValue(string value)
 {
     if (UseColor)
     {
         if (currentKey.IsColor())
         {
             Console.ForegroundColor = Color.ToConsoleColor(value);
             Console.Write(currentKey.GetPresentationString(value));
             if (currentKey.IsDefault(value))
             {
                 Console.ResetColor();
                 Console.Write(" (default)");
             }
             Console.WriteLine();
         }
         else
         {
             if (currentKey.IsDefault(value))
             {
                 Console.ResetColor();
             }
             Console.WriteLine(currentKey.GetPresentationString(value));
         }
     }
     else
     {
         Console.WriteLine(currentKey.GetPresentationString(value));
     }
 }