Esempio n. 1
0
 /// <summary>
 /// Request Log
 /// </summary>
 /// <param name="apiName"></param>
 /// <param name="preColor"></param>
 /// <param name="status"></param>
 /// <param name="setColor"></param>
 public static void ShowRequestResult(string apiName, ConTextColor preColor, int status, ConTextColor setColor)
 {
     Console.Write(CheckRequestTime() + $"{apiName} responded ");
     WrapAPI.SetConsoleTextColor(preColor);
     Console.WriteLine(status);
     WrapAPI.SetConsoleTextColor(setColor);
 }
Esempio n. 2
0
        public static void SetConsoleTextColor(ConTextColor color)
        {
            IntPtr handle = GetStdHandle(STD_OUTPUT_HANDLE);

            SetConsoleTextAttribute(handle, (short)color);
        }