[mapguide-commits] r4418 - in trunk/Tools/Maestro: Maestro Maestro/Strings MaestroAPI

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Dec 11 18:21:03 EST 2009


Author: ksgeograf
Date: 2009-12-11 18:21:02 -0500 (Fri, 11 Dec 2009)
New Revision: 4418

Modified:
   trunk/Tools/Maestro/Maestro/EditorInterface.cs
   trunk/Tools/Maestro/Maestro/FormAbout.cs
   trunk/Tools/Maestro/Maestro/FormAbout.resx
   trunk/Tools/Maestro/Maestro/FormMain.cs
   trunk/Tools/Maestro/Maestro/Strings/EditorInterface.Designer.cs
   trunk/Tools/Maestro/Maestro/Strings/EditorInterface.resx
   trunk/Tools/Maestro/Maestro/Strings/FormAbout.Designer.cs
   trunk/Tools/Maestro/Maestro/Strings/FormAbout.resx
   trunk/Tools/Maestro/MaestroAPI/ServerConnectionBase.cs
   trunk/Tools/Maestro/MaestroAPI/SiteVersion.cs
Log:
Maestro: 
Fixed issue #1149.
Also added the server version number to the about screen,
and added MGOS 2.1 as a recognized version.

Modified: trunk/Tools/Maestro/Maestro/EditorInterface.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/EditorInterface.cs	2009-12-11 20:06:16 UTC (rev 4417)
+++ trunk/Tools/Maestro/Maestro/EditorInterface.cs	2009-12-11 23:21:02 UTC (rev 4418)
@@ -230,11 +230,28 @@
                         {
                             string msg;
 
+                            string fullmsg;
                             if (errors.Count > 0)
-                                msg = string.Format(Strings.EditorInterface.SaveWithErrorsConfirmation, string.Join("\n", errors.ToArray()));
+                            {
+                                for (int i = 0; i < errors.Count; i++)
+                                    errors[i] = errors[i].Trim();
+                                fullmsg = string.Join("\n", errors.ToArray());
+                            }
                             else
-                                msg = string.Format(Strings.EditorInterface.SaveWithWarningsConfirmation, string.Join("\n", warnings.ToArray()));
+                            {
+                                for (int i = 0; i < warnings.Count; i++)
+                                    warnings[i] = warnings[i].Trim();
+                                fullmsg = string.Join("\n", warnings.ToArray());
+                            }
 
+                            if (fullmsg.Length > 512)
+                                fullmsg = string.Format(Strings.EditorInterface.ValidationMessageTooLong, fullmsg.Substring(1024));
+
+                            if (errors.Count > 0)
+                                msg = string.Format(Strings.EditorInterface.SaveWithErrorsConfirmation, fullmsg);
+                            else
+                                msg = string.Format(Strings.EditorInterface.SaveWithWarningsConfirmation, fullmsg);
+
                             if (MessageBox.Show(m_editor, msg, Application.ProductName, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning) != DialogResult.Yes)
                                 return false;
                         }

Modified: trunk/Tools/Maestro/Maestro/FormAbout.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/FormAbout.cs	2009-12-11 20:06:16 UTC (rev 4417)
+++ trunk/Tools/Maestro/Maestro/FormAbout.cs	2009-12-11 23:21:02 UTC (rev 4418)
@@ -47,9 +47,11 @@
         private LinkLabel tfnetLinkLabel;
         private Label label2;
         private LinkLabel ziplibLinkLabel;
+        private Label ServerVersion;
         private LinkLabel colorBrewerlinkLabel;
+        private MaestroAPI.ServerConnectionI m_connection;
 
-		public FormAbout()
+		private FormAbout()
 		{
 			//
 			// Required for Windows Form Designer support
@@ -58,6 +60,12 @@
             this.Icon = FormMain.MaestroIcon;
         }
 
+        public FormAbout(MaestroAPI.ServerConnectionI connection)
+            : this()
+        {
+            m_connection = connection;
+        }
+
 		/// <summary>
 		/// Clean up any resources being used.
 		/// </summary>
@@ -99,6 +107,7 @@
             this.ziplibLinkLabel = new System.Windows.Forms.LinkLabel();
             this.tfnetLinkLabel = new System.Windows.Forms.LinkLabel();
             this.label2 = new System.Windows.Forms.Label();
+            this.ServerVersion = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.PayPalImage)).BeginInit();
             this.tabControl.SuspendLayout();
@@ -216,9 +225,15 @@
             resources.ApplyResources(this.label2, "label2");
             this.label2.Name = "label2";
             // 
+            // ServerVersion
+            // 
+            resources.ApplyResources(this.ServerVersion, "ServerVersion");
+            this.ServerVersion.Name = "ServerVersion";
+            // 
             // FormAbout
             // 
             resources.ApplyResources(this, "$this");
+            this.Controls.Add(this.ServerVersion);
             this.Controls.Add(this.tabControl);
             this.Controls.Add(this.Localization);
             this.Controls.Add(this.PayPalImage);
@@ -249,6 +264,13 @@
 		{
 			Version.Text = string.Format(Strings.FormAbout.VersionLabel, Application.ProductVersion);
 			Localization.Text = string.Format(Strings.FormAbout.LanguageLabel,  System.Threading.Thread.CurrentThread.CurrentUICulture, System.Globalization.CultureInfo.InstalledUICulture);
+
+            string match = "unknown version";
+            for(int i = 0; i < MaestroAPI.SiteVersions.SiteVersionNumbers.Length; i++)
+                if (m_connection.SiteVersion == MaestroAPI.SiteVersions.SiteVersionNumbers[i])
+                    match = ((MaestroAPI.KnownSiteVersions)i).ToString();
+
+            ServerVersion.Text = string.Format(Strings.FormAbout.ServerVersionLabel, m_connection.SiteVersion, match);
 		}
 
 		private void PayPalImage_Click(object sender, System.EventArgs e)

Modified: trunk/Tools/Maestro/Maestro/FormAbout.resx
===================================================================
--- trunk/Tools/Maestro/Maestro/FormAbout.resx	2009-12-11 20:06:16 UTC (rev 4417)
+++ trunk/Tools/Maestro/Maestro/FormAbout.resx	2009-12-11 23:21:02 UTC (rev 4418)
@@ -1014,10 +1014,10 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;pictureBox1.ZOrder" xml:space="preserve">
-    <value>6</value>
+    <value>7</value>
   </data>
   <data name="linkLabel.Location" type="System.Drawing.Point, System.Drawing">
-    <value>16, 240</value>
+    <value>16, 256</value>
   </data>
   <data name="linkLabel.Size" type="System.Drawing.Size, System.Drawing">
     <value>328, 16</value>
@@ -1038,7 +1038,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;linkLabel.ZOrder" xml:space="preserve">
-    <value>5</value>
+    <value>6</value>
   </data>
   <data name="label1.Font" type="System.Drawing.Font, System.Drawing">
     <value>Microsoft Sans Serif, 14.25pt</value>
@@ -1065,7 +1065,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
-    <value>4</value>
+    <value>5</value>
   </data>
   <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   <data name="License.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
@@ -1138,7 +1138,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;Version.ZOrder" xml:space="preserve">
-    <value>3</value>
+    <value>4</value>
   </data>
   <data name="PayPalImage.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
@@ -1194,10 +1194,10 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;PayPalImage.ZOrder" xml:space="preserve">
-    <value>2</value>
+    <value>3</value>
   </data>
   <data name="Localization.Location" type="System.Drawing.Point, System.Drawing">
-    <value>16, 48</value>
+    <value>16, 64</value>
   </data>
   <data name="Localization.Size" type="System.Drawing.Size, System.Drawing">
     <value>328, 16</value>
@@ -1218,7 +1218,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;Localization.ZOrder" xml:space="preserve">
-    <value>1</value>
+    <value>2</value>
   </data>
   <data name="licenseTab.Location" type="System.Drawing.Point, System.Drawing">
     <value>4, 22</value>
@@ -1445,7 +1445,7 @@
     <value>2</value>
   </data>
   <data name="tabControl.Location" type="System.Drawing.Point, System.Drawing">
-    <value>16, 64</value>
+    <value>16, 80</value>
   </data>
   <data name="tabControl.Size" type="System.Drawing.Size, System.Drawing">
     <value>328, 168</value>
@@ -1463,6 +1463,33 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;tabControl.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="ServerVersion.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="ServerVersion.Location" type="System.Drawing.Point, System.Drawing">
+    <value>16, 48</value>
+  </data>
+  <data name="ServerVersion.Size" type="System.Drawing.Size, System.Drawing">
+    <value>328, 16</value>
+  </data>
+  <data name="ServerVersion.TabIndex" type="System.Int32, mscorlib">
+    <value>8</value>
+  </data>
+  <data name="ServerVersion.Text" xml:space="preserve">
+    <value>label2</value>
+  </data>
+  <data name="&gt;&gt;ServerVersion.Name" xml:space="preserve">
+    <value>ServerVersion</value>
+  </data>
+  <data name="&gt;&gt;ServerVersion.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;ServerVersion.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;ServerVersion.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">
@@ -1472,7 +1499,7 @@
     <value>5, 13</value>
   </data>
   <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
-    <value>632, 269</value>
+    <value>632, 287</value>
   </data>
   <data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
     <value>CenterParent</value>

Modified: trunk/Tools/Maestro/Maestro/FormMain.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/FormMain.cs	2009-12-11 20:06:16 UTC (rev 4417)
+++ trunk/Tools/Maestro/Maestro/FormMain.cs	2009-12-11 23:21:02 UTC (rev 4418)
@@ -2197,7 +2197,7 @@
 
 		private void MainMenuAbout_Click(object sender, System.EventArgs e)
 		{
-			FormAbout dlg = new FormAbout();
+			FormAbout dlg = new FormAbout(m_connection);
 			dlg.ShowDialog(this);
 		}
 

Modified: trunk/Tools/Maestro/Maestro/Strings/EditorInterface.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/Strings/EditorInterface.Designer.cs	2009-12-11 20:06:16 UTC (rev 4417)
+++ trunk/Tools/Maestro/Maestro/Strings/EditorInterface.Designer.cs	2009-12-11 23:21:02 UTC (rev 4418)
@@ -110,5 +110,15 @@
                 return ResourceManager.GetString("SaveWithWarningsConfirmation", resourceCulture);
             }
         }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to {0}... (text truncated)
+        ///.
+        /// </summary>
+        internal static string ValidationMessageTooLong {
+            get {
+                return ResourceManager.GetString("ValidationMessageTooLong", resourceCulture);
+            }
+        }
     }
 }

Modified: trunk/Tools/Maestro/Maestro/Strings/EditorInterface.resx
===================================================================
--- trunk/Tools/Maestro/Maestro/Strings/EditorInterface.resx	2009-12-11 20:06:16 UTC (rev 4417)
+++ trunk/Tools/Maestro/Maestro/Strings/EditorInterface.resx	2009-12-11 23:21:02 UTC (rev 4418)
@@ -143,4 +143,9 @@
 Do you want to save it anyway?</value>
     <comment>A confirmation message displayed if the resource has warnings</comment>
   </data>
+  <data name="ValidationMessageTooLong" xml:space="preserve">
+    <value>{0}... (text truncated)
+</value>
+    <comment>A message displayed when the validation message is truncated</comment>
+  </data>
 </root>
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro/Strings/FormAbout.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/Strings/FormAbout.Designer.cs	2009-12-11 20:06:16 UTC (rev 4417)
+++ trunk/Tools/Maestro/Maestro/Strings/FormAbout.Designer.cs	2009-12-11 23:21:02 UTC (rev 4418)
@@ -70,6 +70,15 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to MapGuide Version: {0} ({1}).
+        /// </summary>
+        internal static string ServerVersionLabel {
+            get {
+                return ResourceManager.GetString("ServerVersionLabel", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to Version: {0}.
         /// </summary>
         internal static string VersionLabel {

Modified: trunk/Tools/Maestro/Maestro/Strings/FormAbout.resx
===================================================================
--- trunk/Tools/Maestro/Maestro/Strings/FormAbout.resx	2009-12-11 20:06:16 UTC (rev 4417)
+++ trunk/Tools/Maestro/Maestro/Strings/FormAbout.resx	2009-12-11 23:21:02 UTC (rev 4418)
@@ -121,6 +121,10 @@
     <value>Selected language: {0}, OS Language: {1}</value>
     <comment>A label that displays the current language settings</comment>
   </data>
+  <data name="ServerVersionLabel" xml:space="preserve">
+    <value>MapGuide Version: {0} ({1})</value>
+    <comment>A label that displays the version of the current MapGuide server</comment>
+  </data>
   <data name="VersionLabel" xml:space="preserve">
     <value>Version: {0}</value>
     <comment>A label that displays the current version</comment>

Modified: trunk/Tools/Maestro/MaestroAPI/ServerConnectionBase.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPI/ServerConnectionBase.cs	2009-12-11 20:06:16 UTC (rev 4417)
+++ trunk/Tools/Maestro/MaestroAPI/ServerConnectionBase.cs	2009-12-11 23:21:02 UTC (rev 4418)
@@ -305,7 +305,7 @@
 		/// </summary>
 		virtual public Version MaxTestedVersion
 		{
-			get { return SiteVersions.GetVersion(KnownSiteVersions.MapGuideEP2010_SP1); }
+			get { return SiteVersions.GetVersion(KnownSiteVersions.MapGuideOS2_1); }
 		}
 
 		/// <summary>

Modified: trunk/Tools/Maestro/MaestroAPI/SiteVersion.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPI/SiteVersion.cs	2009-12-11 20:06:16 UTC (rev 4417)
+++ trunk/Tools/Maestro/MaestroAPI/SiteVersion.cs	2009-12-11 23:21:02 UTC (rev 4418)
@@ -37,6 +37,7 @@
         MapGuideEP2009_SP1,
         MapGuideEP2010,
         MapGuideEP2010_SP1,
+        MapGuideOS2_1,
 	}
 
 	public class SiteVersions
@@ -55,6 +56,7 @@
             new Version(2,0,2,3402),
             new Version(2,1,0,3001),
             new Version(2,1,0,3505),
+            new Version(2,1,0,4283),
 		};
 
 		public static Version GetVersion(KnownSiteVersions index)



More information about the mapguide-commits mailing list