[mapguide-commits] r4473 - in trunk/Tools/Maestro: Localization/da-DK/MgCooker/Strings Maestro MgCooker MgCooker/Strings

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Dec 24 06:41:31 EST 2009


Author: ksgeograf
Date: 2009-12-24 06:41:31 -0500 (Thu, 24 Dec 2009)
New Revision: 4473

Modified:
   trunk/Tools/Maestro/Localization/da-DK/MgCooker/Strings/Progress.da-DK.resx
   trunk/Tools/Maestro/Maestro/FormMain.cs
   trunk/Tools/Maestro/MgCooker/BatchSettings.cs
   trunk/Tools/Maestro/MgCooker/Progress.Designer.cs
   trunk/Tools/Maestro/MgCooker/Progress.cs
   trunk/Tools/Maestro/MgCooker/Progress.resx
   trunk/Tools/Maestro/MgCooker/Strings/Progress.Designer.cs
   trunk/Tools/Maestro/MgCooker/Strings/Progress.resx
Log:
Maestro:
Fixed issue #1217.

Modified: trunk/Tools/Maestro/Localization/da-DK/MgCooker/Strings/Progress.da-DK.resx
===================================================================
--- trunk/Tools/Maestro/Localization/da-DK/MgCooker/Strings/Progress.da-DK.resx	2009-12-24 11:19:00 UTC (rev 4472)
+++ trunk/Tools/Maestro/Localization/da-DK/MgCooker/Strings/Progress.da-DK.resx	2009-12-24 11:41:31 UTC (rev 4473)
@@ -142,4 +142,8 @@
     <value>({0} tiles fejlede)</value>
     <comment>Text inserted in the CurrentTileCounter if any tiles are failed</comment>
   </data>
+  <data name="PauseMessage" xml:space="preserve">
+    <value>MgCooker er på pause, klik OK for at for at fortsætte</value>
+    <comment>A text message displayed when MgCooker is paused</comment>
+  </data>
 </root>
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro/FormMain.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/FormMain.cs	2009-12-24 11:19:00 UTC (rev 4472)
+++ trunk/Tools/Maestro/Maestro/FormMain.cs	2009-12-24 11:41:31 UTC (rev 4473)
@@ -2539,6 +2539,7 @@
                     System.Reflection.PropertyInfo pi = ei.Resource.GetType().GetProperty("CurrentConnection");
                     if (pi != null && pi.CanWrite)
                         pi.SetValue(ei.Resource, this.CurrentConnection, null);
+
                     try
                     {
                         pi = ei.Resource.GetType().GetProperty("ResourceId");

Modified: trunk/Tools/Maestro/MgCooker/BatchSettings.cs
===================================================================
--- trunk/Tools/Maestro/MgCooker/BatchSettings.cs	2009-12-24 11:19:00 UTC (rev 4472)
+++ trunk/Tools/Maestro/MgCooker/BatchSettings.cs	2009-12-24 11:41:31 UTC (rev 4473)
@@ -121,6 +121,11 @@
         /// </summary>
         private bool m_cancel;
 
+        /// <summary>
+        /// An event that can be used to pause MgCooker
+        /// </summary>
+        public System.Threading.ManualResetEvent PauseEvent = new System.Threading.ManualResetEvent(true);
+
         #region Events
         /// <summary>
         /// All maps are being rendered
@@ -171,6 +176,7 @@
         {
             if (this.BeginRenderingMap != null)
                 this.BeginRenderingMap(CallbackStates.StartRenderMap, batchMap, null, -1, -1, -1, ref m_cancel);
+            PauseEvent.WaitOne();
         }
 
         internal void InvokeFinishRendering(BatchMap batchMap)
@@ -183,6 +189,7 @@
         {
             if (this.BeginRenderingGroup != null)
                 this.BeginRenderingGroup(CallbackStates.StartRenderGroup, batchMap, group, -1, -1, -1, ref m_cancel);
+            PauseEvent.WaitOne();
         }
 
         internal void InvokeFinishRendering(BatchMap batchMap, string group)
@@ -195,6 +202,7 @@
         {
             if (this.BeginRenderingScale != null)
                 this.BeginRenderingScale(CallbackStates.StartRenderScale, batchMap, group, scaleindex, -1, -1, ref m_cancel);
+            PauseEvent.WaitOne();
         }
 
         internal void InvokeFinishRendering(BatchMap batchMap, string group, int scaleindex)
@@ -207,6 +215,7 @@
         {
             if (this.BeginRenderingTile != null)
                 this.BeginRenderingTile(CallbackStates.StartRenderTile, batchMap, group, scaleindex, row, col, ref m_cancel);
+            PauseEvent.WaitOne();
         }
 
         internal void InvokeFinishRendering(BatchMap batchMap, string group, int scaleindex, int row, int col)

Modified: trunk/Tools/Maestro/MgCooker/Progress.Designer.cs
===================================================================
--- trunk/Tools/Maestro/MgCooker/Progress.Designer.cs	2009-12-24 11:19:00 UTC (rev 4472)
+++ trunk/Tools/Maestro/MgCooker/Progress.Designer.cs	2009-12-24 11:41:31 UTC (rev 4473)
@@ -36,10 +36,10 @@
             this.tilePG = new System.Windows.Forms.ProgressBar();
             this.totalPG = new System.Windows.Forms.ProgressBar();
             this.button1 = new System.Windows.Forms.Button();
-            this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
             this.label4 = new System.Windows.Forms.Label();
             this.finishEstimate = new System.Windows.Forms.Label();
             this.tileCounter = new System.Windows.Forms.Label();
+            this.PauseBtn = new System.Windows.Forms.Button();
             this.SuspendLayout();
             // 
             // label1
@@ -101,10 +101,18 @@
             this.tileCounter.AutoEllipsis = true;
             this.tileCounter.Name = "tileCounter";
             // 
+            // PauseBtn
+            // 
+            resources.ApplyResources(this.PauseBtn, "PauseBtn");
+            this.PauseBtn.Name = "PauseBtn";
+            this.PauseBtn.UseVisualStyleBackColor = true;
+            this.PauseBtn.Click += new System.EventHandler(this.PauseBtn_Click);
+            // 
             // Progress
             // 
             resources.ApplyResources(this, "$this");
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.PauseBtn);
             this.Controls.Add(this.tileCounter);
             this.Controls.Add(this.label4);
             this.Controls.Add(this.finishEstimate);
@@ -135,9 +143,9 @@
         private System.Windows.Forms.ProgressBar tilePG;
         private System.Windows.Forms.ProgressBar totalPG;
         private System.Windows.Forms.Button button1;
-        private System.ComponentModel.BackgroundWorker backgroundWorker1;
         private System.Windows.Forms.Label label4;
         private System.Windows.Forms.Label finishEstimate;
         private System.Windows.Forms.Label tileCounter;
+        private System.Windows.Forms.Button PauseBtn;
     }
 }
\ No newline at end of file

Modified: trunk/Tools/Maestro/MgCooker/Progress.cs
===================================================================
--- trunk/Tools/Maestro/MgCooker/Progress.cs	2009-12-24 11:19:00 UTC (rev 4472)
+++ trunk/Tools/Maestro/MgCooker/Progress.cs	2009-12-24 11:41:31 UTC (rev 4473)
@@ -208,5 +208,13 @@
                 e.Cancel = true;
             }
         }
+
+        private void PauseBtn_Click(object sender, EventArgs e)
+        {
+            m_bx.PauseEvent.Reset();
+            MessageBox.Show(this, Strings.Progress.PauseMessage, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
+            m_bx.PauseEvent.Set();
+        }
+
     }
 }
\ No newline at end of file

Modified: trunk/Tools/Maestro/MgCooker/Progress.resx
===================================================================
--- trunk/Tools/Maestro/MgCooker/Progress.resx	2009-12-24 11:19:00 UTC (rev 4472)
+++ trunk/Tools/Maestro/MgCooker/Progress.resx	2009-12-24 11:41:31 UTC (rev 4473)
@@ -145,7 +145,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
-    <value>9</value>
+    <value>10</value>
   </data>
   <data name="label2.AutoSize" type="System.Boolean, mscorlib">
     <value>True</value>
@@ -172,7 +172,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
-    <value>8</value>
+    <value>9</value>
   </data>
   <data name="label3.AutoSize" type="System.Boolean, mscorlib">
     <value>True</value>
@@ -199,7 +199,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
-    <value>7</value>
+    <value>8</value>
   </data>
   <data name="label5.AutoSize" type="System.Boolean, mscorlib">
     <value>True</value>
@@ -226,7 +226,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;label5.ZOrder" xml:space="preserve">
-    <value>6</value>
+    <value>7</value>
   </data>
   <data name="tilePG.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Top, Left, Right</value>
@@ -250,7 +250,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;tilePG.ZOrder" xml:space="preserve">
-    <value>5</value>
+    <value>6</value>
   </data>
   <data name="totalPG.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Top, Left, Right</value>
@@ -274,7 +274,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;totalPG.ZOrder" xml:space="preserve">
-    <value>4</value>
+    <value>5</value>
   </data>
   <data name="button1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Bottom</value>
@@ -301,11 +301,8 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;button1.ZOrder" xml:space="preserve">
-    <value>3</value>
+    <value>4</value>
   </data>
-  <metadata name="backgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
   <data name="label4.AutoSize" type="System.Boolean, mscorlib">
     <value>True</value>
   </data>
@@ -331,7 +328,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
-    <value>1</value>
+    <value>2</value>
   </data>
   <data name="finishEstimate.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Top, Left, Right</value>
@@ -358,7 +355,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;finishEstimate.ZOrder" xml:space="preserve">
-    <value>2</value>
+    <value>3</value>
   </data>
   <data name="tileCounter.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Top, Left, Right</value>
@@ -382,6 +379,36 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;tileCounter.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="PauseBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Bottom, Right</value>
+  </data>
+  <data name="PauseBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="PauseBtn.Location" type="System.Drawing.Point, System.Drawing">
+    <value>424, 152</value>
+  </data>
+  <data name="PauseBtn.Size" type="System.Drawing.Size, System.Drawing">
+    <value>75, 24</value>
+  </data>
+  <data name="PauseBtn.TabIndex" type="System.Int32, mscorlib">
+    <value>14</value>
+  </data>
+  <data name="PauseBtn.Text" xml:space="preserve">
+    <value>Pause</value>
+  </data>
+  <data name="&gt;&gt;PauseBtn.Name" xml:space="preserve">
+    <value>PauseBtn</value>
+  </data>
+  <data name="&gt;&gt;PauseBtn.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;PauseBtn.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;PauseBtn.ZOrder" xml:space="preserve">
     <value>0</value>
   </data>
   <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -899,12 +926,6 @@
   <data name="$this.Text" xml:space="preserve">
     <value>Progress</value>
   </data>
-  <data name="&gt;&gt;backgroundWorker1.Name" xml:space="preserve">
-    <value>backgroundWorker1</value>
-  </data>
-  <data name="&gt;&gt;backgroundWorker1.Type" xml:space="preserve">
-    <value>System.ComponentModel.BackgroundWorker, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
   <data name="&gt;&gt;$this.Name" xml:space="preserve">
     <value>Progress</value>
   </data>

Modified: trunk/Tools/Maestro/MgCooker/Strings/Progress.Designer.cs
===================================================================
--- trunk/Tools/Maestro/MgCooker/Strings/Progress.Designer.cs	2009-12-24 11:19:00 UTC (rev 4472)
+++ trunk/Tools/Maestro/MgCooker/Strings/Progress.Designer.cs	2009-12-24 11:41:31 UTC (rev 4473)
@@ -98,6 +98,15 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to MgCooker is now paused, click OK to resume rendering.
+        /// </summary>
+        internal static string PauseMessage {
+            get {
+                return ResourceManager.GetString("PauseMessage", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to {0}, remaining time: {1}.
         /// </summary>
         internal static string RemainingTime {

Modified: trunk/Tools/Maestro/MgCooker/Strings/Progress.resx
===================================================================
--- trunk/Tools/Maestro/MgCooker/Strings/Progress.resx	2009-12-24 11:19:00 UTC (rev 4472)
+++ trunk/Tools/Maestro/MgCooker/Strings/Progress.resx	2009-12-24 11:41:31 UTC (rev 4473)
@@ -134,6 +134,10 @@
     <value>&lt; Inaccurate measure of remaining time &gt;</value>
     <comment>Text displayed when it is not possible to predict the remaning time</comment>
   </data>
+  <data name="PauseMessage" xml:space="preserve">
+    <value>MgCooker is now paused, click OK to resume rendering</value>
+    <comment>A text message displayed when MgCooker is paused</comment>
+  </data>
   <data name="RemainingTime" xml:space="preserve">
     <value>{0}, remaining time: {1}</value>
     <comment>Label that displays the remaining time</comment>



More information about the mapguide-commits mailing list