[mapguide-commits] r6162 - in trunk/Tools/Maestro/MgCooker: . Properties

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Sun Oct 2 22:32:29 EDT 2011


Author: jng
Date: 2011-10-02 19:32:28 -0700 (Sun, 02 Oct 2011)
New Revision: 6162

Modified:
   trunk/Tools/Maestro/MgCooker/Progress.cs
   trunk/Tools/Maestro/MgCooker/Properties/Resources.Designer.cs
   trunk/Tools/Maestro/MgCooker/Properties/Resources.resx
   trunk/Tools/Maestro/MgCooker/SetupRun.cs
Log:
Do not close down MgCooker on success for interactive tiling runs. Also show how long the operation took.

Modified: trunk/Tools/Maestro/MgCooker/Progress.cs
===================================================================
--- trunk/Tools/Maestro/MgCooker/Progress.cs	2011-10-03 00:45:29 UTC (rev 6161)
+++ trunk/Tools/Maestro/MgCooker/Progress.cs	2011-10-03 02:32:28 UTC (rev 6162)
@@ -76,10 +76,14 @@
             exception = null; //Eat it
         }
 
+        public TimeSpan TotalTime { get; private set; }
+
         private void DoClose()
         {
             m_allowClose = true;
 
+            this.TotalTime = DateTime.Now - m_grandBegin;
+
             if (m_cancel)
                 this.DialogResult = DialogResult.Cancel;
             else

Modified: trunk/Tools/Maestro/MgCooker/Properties/Resources.Designer.cs
===================================================================
--- trunk/Tools/Maestro/MgCooker/Properties/Resources.Designer.cs	2011-10-03 00:45:29 UTC (rev 6161)
+++ trunk/Tools/Maestro/MgCooker/Properties/Resources.Designer.cs	2011-10-03 02:32:28 UTC (rev 6162)
@@ -1,7 +1,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:2.0.50727.4952
+//     Runtime Version:2.0.50727.4961
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.
@@ -313,5 +313,14 @@
                 return ResourceManager.GetString("TileErrorCount", resourceCulture);
             }
         }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Tile Generation Complete. The operation completed in {0}h {1}m {2}s.
+        /// </summary>
+        internal static string TileGenerationCompleted {
+            get {
+                return ResourceManager.GetString("TileGenerationCompleted", resourceCulture);
+            }
+        }
     }
 }

Modified: trunk/Tools/Maestro/MgCooker/Properties/Resources.resx
===================================================================
--- trunk/Tools/Maestro/MgCooker/Properties/Resources.resx	2011-10-03 00:45:29 UTC (rev 6161)
+++ trunk/Tools/Maestro/MgCooker/Properties/Resources.resx	2011-10-03 02:32:28 UTC (rev 6162)
@@ -231,4 +231,7 @@
     <value>({0} failed tiles)</value>
     <comment>Text inserted in the CurrentTileCounter if any tiles are failed</comment>
   </data>
+  <data name="TileGenerationCompleted" xml:space="preserve">
+    <value>Tile Generation Complete. The operation completed in {0}h {1}m {2}s</value>
+  </data>
 </root>
\ No newline at end of file

Modified: trunk/Tools/Maestro/MgCooker/SetupRun.cs
===================================================================
--- trunk/Tools/Maestro/MgCooker/SetupRun.cs	2011-10-03 00:45:29 UTC (rev 6161)
+++ trunk/Tools/Maestro/MgCooker/SetupRun.cs	2011-10-03 02:32:28 UTC (rev 6162)
@@ -256,7 +256,10 @@
 
                 Progress p = new Progress(bx);
                 if (p.ShowDialog(this) != DialogResult.Cancel)
-                    this.Close();
+                {
+                    var ts = p.TotalTime;
+                    MessageBox.Show(string.Format(Properties.Resources.TileGenerationCompleted, ((ts.Days * 24) + ts.Hours), ts.Minutes, ts.Seconds));
+                }
             }
             catch (Exception ex)
             {



More information about the mapguide-commits mailing list