Aggiunta classe per loggare.
Leonardo Robol [2010-02-09 22:18]
Aggiunta classe per loggare.
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);
+ }
+ }
+}