/[xmltv_parser]/trunk/GBPVRProgramDatabaseFixer/Program.cs
ViewVC logotype

Diff of /trunk/GBPVRProgramDatabaseFixer/Program.cs

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

--- trunk/GBPVRProgramDatabaseFixer/Program.cs	2013/03/16 18:30:41	183
+++ trunk/GBPVRProgramDatabaseFixer/Program.cs	2013/03/16 23:00:07	205
@@ -126,59 +126,63 @@
             //    }
             //}
 
-            object k = e.UserState;
-            if (k == null)
+            object k = e.UserState; // we will assum that is a status message
+            if (k == null) // assume we do not have a user status message (ie: is only a progress message)
             {
                 if (sender == null)
                 {
-                    if (LAST_REPORTED_PROGRESS != e.Progress)
-                    {
-                        ConsoleOverwritePreviosLine("Progress: {0} ", e.Progress);
-                        LAST_REPORTED_PROGRESS = e.Progress;
-                        if (e.Progress == 100)
-                        {
-                            Console.WriteLine("Progress: {0} ", e.Progress);
-                        }
-                    }
+                    //if (LAST_REPORTED_PROGRESS != e.Progress)
+                    //{
+                    //    ConsoleOverwritePreviosLine("Progress: {0} ", e.Progress);
+                    //    LAST_REPORTED_PROGRESS = e.Progress;
+                    //    if (e.Progress == 100)
+                    //    {
+                    //        Console.WriteLine("Progress: {0} ", e.Progress);
+                    //    }
+                    //}
+                    ConsoleOverwritePreviosLine("Progress: {0} ", e.Progress);
                 }
                 else
                 {
-                    if (LAST_REPORTED_PROGRESS != e.Progress)
-                    {
-                        ConsoleOverwritePreviosLine("{0}: Progress: {1:00}%", sender.GetType().Name, e.Progress);
-                        LAST_REPORTED_PROGRESS = e.Progress;
-                        if (e.Progress == 100)
-                        {
-                            Console.WriteLine("{0}: Progress: {1:00}%", sender.GetType().Name, e.Progress);
-                        }
-                    }
+                    //if (LAST_REPORTED_PROGRESS != e.Progress)
+                    //{
+                    //    ConsoleOverwritePreviosLine("{0}: Progress: {1:00}%", sender.GetType().Name, e.Progress);
+                    //    LAST_REPORTED_PROGRESS = e.Progress;
+                    //    if (e.Progress == 100)
+                    //    {
+                    //        Console.WriteLine("{0}: Progress: {1:00}%", sender.GetType().Name, e.Progress);
+                    //    }
+                    //}
+                    ConsoleOverwritePreviosLine("{0}: Progress: {1:00}%", sender.GetType().Name, e.Progress);
                 }
             }
-            else
+            else // assume we have a user status message
             {
                 if (sender == null)
                 {
-                    if (LAST_REPORTED_PROGRESS != e.Progress)
-                    {
-                        ConsoleOverwritePreviosLine("Progress: {0} ", k.ToString());
-                        LAST_REPORTED_PROGRESS = e.Progress;
-                        if (e.Progress == 100)
-                        {
-                            Console.WriteLine("Progress: {0} ", k.ToString());
-                        }
-                    }
+                    //if (LAST_REPORTED_PROGRESS != e.Progress)
+                    //{
+                    //    ConsoleOverwritePreviosLine("Progress: {0} ", k.ToString());
+                    //    LAST_REPORTED_PROGRESS = e.Progress;
+                    //    if (e.Progress == 100)
+                    //    {
+                    //        Console.WriteLine("Progress: {0} ", k.ToString());
+                    //    }
+                    //}
+                    ConsoleOverwritePreviosLine("{0} ", k.ToString());
                 }
                 else
                 {
-                    if (LAST_REPORTED_PROGRESS != e.Progress)
-                    {
-                        ConsoleOverwritePreviosLine("{0}: {1}", sender.GetType().Name, k.ToString());
-                        LAST_REPORTED_PROGRESS = e.Progress;
-                        if (e.Progress == 100)
-                        {
-                            Console.WriteLine("{0}: {1}", sender.GetType().Name, k.ToString());
-                        }
-                    }
+                    //if (LAST_REPORTED_PROGRESS != e.Progress)
+                    //{
+                    //    ConsoleOverwritePreviosLine("{0}: {1}", sender.GetType().Name, k.ToString());
+                    //    LAST_REPORTED_PROGRESS = e.Progress;
+                    //    if (e.Progress == 100)
+                    //    {
+                    //        Console.WriteLine("{0}: {1}", sender.GetType().Name, k.ToString());
+                    //    }
+                    //}
+                    ConsoleOverwritePreviosLine("{0}: {1}", sender.GetType().Name, k.ToString());
                 }
             }
         }

 

  ViewVC Help
Powered by ViewVC 1.1.22