/[MorrowindCustomClothingSlotCreator]/trunk/libTES3FileFormat/ConsoleLogger.cs
ViewVC logotype

Diff of /trunk/libTES3FileFormat/ConsoleLogger.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/libTES3FileFormat/ConsoleLogger.cs	2011/07/29 11:56:58	8
+++ trunk/libTES3FileFormat/ConsoleLogger.cs	2011/07/29 16:09:53	17
@@ -15,6 +15,7 @@
         void Write(string message);
         void WriteLine(string message);
         void WriteLine();
+        string GetLastMessage();
     }
     public class ConsoleLog : IConsoleLog
     {
@@ -22,6 +23,7 @@
         //public static void LogMessage(string message) { LogMessage(message, false); }
         //public static void LogMessage(string message, bool OnNewLine) { if (OnNewLine) { Console.Write(System.Environment.NewLine); } Console.Write(message); }
         private Control LogControl = null;
+        private string CurrentMessage = "";
         public ConsoleLog()
         {
             this.LogControl = null;
@@ -35,6 +37,7 @@
 
         public void Write(string message)
         {
+            this.CurrentMessage = message;
             Console.Write(message);
             if (this.LogControl != null)
             {
@@ -45,13 +48,14 @@
         public void WriteLine() { this.WriteLine(""); }
         public void WriteLine(string message)
         {
+            this.CurrentMessage = message;
             Console.WriteLine(message);
             if (this.LogControl != null)
             {
                 this.LogControl.Text = this.LogControl.Text + System.Environment.NewLine + message;
             }
         }
-
+        public string GetLastMessage()        {            return this.CurrentMessage;        }
         #endregion
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22