[mapguide-commits] r4899 - trunk/Tools/Maestro/Maestro/LoginForm

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon May 17 20:13:52 EDT 2010


Author: jng
Date: 2010-05-17 20:13:51 -0400 (Mon, 17 May 2010)
New Revision: 4899

Modified:
   trunk/Tools/Maestro/Maestro/LoginForm/FormLogin.cs
   trunk/Tools/Maestro/Maestro/LoginForm/HttpLoginCtrl.cs
Log:
#1360: Add a new Locale property to the http login control. This returns the neutral language code (eg. en), the Language property returns the specific language code (eg. en-us).

Modified: trunk/Tools/Maestro/Maestro/LoginForm/FormLogin.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/LoginForm/FormLogin.cs	2010-05-17 17:53:07 UTC (rev 4898)
+++ trunk/Tools/Maestro/Maestro/LoginForm/FormLogin.cs	2010-05-18 00:13:51 UTC (rev 4899)
@@ -149,7 +149,7 @@
 
                     if (_selectedIndex == 0) //HTTP
                     {
-                        _conn = ConnectionFactory.CreateHttpConnection(new Uri(_http.Server), _http.Username, _http.Password, _http.Language, true);
+                        _conn = ConnectionFactory.CreateHttpConnection(new Uri(_http.Server), _http.Username, _http.Password, _http.Locale, true);
                         (_conn as HttpServerConnection).UserAgent = "MapGuide Maestro v" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
 
                         //Update preferred site entry if it exists

Modified: trunk/Tools/Maestro/Maestro/LoginForm/HttpLoginCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/LoginForm/HttpLoginCtrl.cs	2010-05-17 17:53:07 UTC (rev 4898)
+++ trunk/Tools/Maestro/Maestro/LoginForm/HttpLoginCtrl.cs	2010-05-18 00:13:51 UTC (rev 4899)
@@ -134,6 +134,19 @@
                 var ci = cmbLanguage.SelectedItem as CultureInfo;
                 if (ci != null)
                 {
+                    return ci.Name;
+                }
+                return null;
+            }
+        }
+
+        public string Locale
+        {
+            get
+            {
+                var ci = cmbLanguage.SelectedItem as CultureInfo;
+                if (ci != null)
+                {
                     return ci.TwoLetterISOLanguageName;
                 }
                 return null;



More information about the mapguide-commits mailing list