Cosmos/source/Cosmos.HAL2/CustomConsole.cs
Valentin Charbonnier 87a22561da Better logs.
2018-07-14 22:00:46 +02:00

43 lines
1.3 KiB
C#

/*
* PROJECT: Aura Operating System Development
* CONTENT: Info / OK / Error in console
* PROGRAMMERS: Valentin Charbonnier <valentinbreiz@gmail.com>
*/
using System;
using System.Collections.Generic;
using System.Text;
namespace Cosmos.HAL
{
public class CustomConsole
{
public static List<string> logs = new List<string>();
public static void WriteLineInfo(string text)
{
Console.ForegroundColor = ConsoleColor.Cyan;
Console.Write("[Info] ");
Console.ForegroundColor = ConsoleColor.White;
Console.Write(text + "\n");
logs.Add("[Info] " + text);
}
public static void WriteLineOK(string text)
{
Console.ForegroundColor = ConsoleColor.Green;
Console.Write("[OK] ");
Console.ForegroundColor = ConsoleColor.White;
Console.Write(text + "\n");
logs.Add("[OK] " + text);
}
public static void WriteLineError(string text)
{
Console.ForegroundColor = ConsoleColor.DarkRed;
Console.Write("[Error] ");
Console.ForegroundColor = ConsoleColor.White;
Console.Write(text + "\n");
logs.Add("[Error] " + text);
}
}
}