From 19f6e6dfcc9d2ca6a6661b262c9add7283657f5d Mon Sep 17 00:00:00 2001 From: Leonardo Robol Date: Tue, 9 Feb 2010 23:18:11 +0100 Subject: [PATCH] Aggiunta classe per loggare. --- Dizzy/Log.cs | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Dizzy/Log.cs diff --git a/Dizzy/Log.cs b/Dizzy/Log.cs new file mode 100644 index 0000000..085af92 --- /dev/null +++ b/Dizzy/Log.cs @@ -0,0 +1,47 @@ + +using System; + +namespace Dizzy +{ + + + public class Log + { + + public Log () + { + } + + public static void Error (string message) + { + // Facciamo capire che è un errore + ConsoleColor initial = Console.ForegroundColor; + Console.ForegroundColor = ConsoleColor.DarkRed; + Console.Write (" ==> "); + Console.ForegroundColor = initial; + Console.WriteLine (message); + } + + + public static void Warning (string message) + { + // Facciamo capire che è un errore + ConsoleColor initial = Console.ForegroundColor; + Console.ForegroundColor = ConsoleColor.Cyan; + Console.Write (" ==> "); + Console.ForegroundColor = initial; + Console.WriteLine (message); + } + + + public static void Info (string message) + { + // Facciamo capire che è un errore + ConsoleColor initial = Console.ForegroundColor; + Console.ForegroundColor = ConsoleColor.Green; + Console.Write (" ==> "); + Console.ForegroundColor = initial; + Console.WriteLine (message); + } + } +} -- 2.1.4