[mapguide-commits] r6997 - trunk/Tools/Maestro/Maestro.Login
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Sep 10 09:56:38 PDT 2012
Author: jng
Date: 2012-09-10 09:56:38 -0700 (Mon, 10 Sep 2012)
New Revision: 6997
Modified:
trunk/Tools/Maestro/Maestro.Login/HttpLoginCtrl.cs
trunk/Tools/Maestro/Maestro.Login/HttpLoginCtrl.resx
trunk/Tools/Maestro/Maestro.Login/LocalLoginCtrl.Designer.cs
trunk/Tools/Maestro/Maestro.Login/LocalLoginCtrl.resx
trunk/Tools/Maestro/Maestro.Login/LocalNativeLoginCtrl.cs
trunk/Tools/Maestro/Maestro.Login/LoginDialog.cs
trunk/Tools/Maestro/Maestro.Login/PreferedSite.cs
Log:
#2110: Localization review of Maestro.Login
Modified: trunk/Tools/Maestro/Maestro.Login/HttpLoginCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Login/HttpLoginCtrl.cs 2012-09-10 16:47:43 UTC (rev 6996)
+++ trunk/Tools/Maestro/Maestro.Login/HttpLoginCtrl.cs 2012-09-10 16:56:38 UTC (rev 6997)
@@ -25,6 +25,7 @@
using System.Text;
using System.Windows.Forms;
using System.Globalization;
+using OSGeo.MapGuide.MaestroAPI;
namespace Maestro.Login
{
@@ -35,6 +36,10 @@
public HttpLoginCtrl()
{
InitializeComponent();
+ cmbServerUrl.Text = DefaultValues.Server;
+ txtUsername.Text = DefaultValues.Username;
+ txtStartingpoint.Text = DefaultValues.StartingPoint;
+ txtPassword.Text = DefaultValues.Password;
}
protected override void OnLoad(EventArgs e)
@@ -42,10 +47,10 @@
base.OnLoad(e);
List<CultureInfo> supported = new List<CultureInfo>();
- supported.Add(CultureInfo.GetCultureInfo("en-US"));
+ supported.Add(CultureInfo.GetCultureInfo("en-US")); //NOXLATE
//Probe for language bundles and add them as well
- System.Text.RegularExpressions.Regex cix = new System.Text.RegularExpressions.Regex("[A-z][A-z](\\-[A-z][A-z])?");
+ System.Text.RegularExpressions.Regex cix = new System.Text.RegularExpressions.Regex("[A-z][A-z](\\-[A-z][A-z])?"); //NOXLATE
foreach (string f in System.IO.Directory.GetDirectories(Application.StartupPath))
{
if (cix.Match(System.IO.Path.GetFileName(f)).Length == System.IO.Path.GetFileName(f).Length)
@@ -58,8 +63,8 @@
}
}
- cmbLanguage.DisplayMember = "DisplayName";
- cmbLanguage.ValueMember = "Name";
+ cmbLanguage.DisplayMember = "DisplayName"; //NOXLATE
+ cmbLanguage.ValueMember = "Name"; //NOXLATE
//Set default language based on current thread culture
int selected = -1;
@@ -201,7 +206,7 @@
if (site.SavePassword)
txtPassword.Text = site.UnscrambledPassword;
else
- txtPassword.Text = "";
+ txtPassword.Text = string.Empty;
CheckSavedPassword(this, EventArgs.Empty);
}
@@ -214,4 +219,12 @@
DisabledOk(this, EventArgs.Empty);
}
}
+
+ static class DefaultValues
+ {
+ public const string Server = "http://localhost/mapguide/mapagent/mapagent.fcgi"; //NOXLATE
+ public const string StartingPoint = StringConstants.RootIdentifier;
+ public const string Username = "Administrator"; //NOXLATE
+ public const string Password = "admin"; //NOXLATE
+ }
}
Modified: trunk/Tools/Maestro/Maestro.Login/HttpLoginCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Login/HttpLoginCtrl.resx 2012-09-10 16:47:43 UTC (rev 6996)
+++ trunk/Tools/Maestro/Maestro.Login/HttpLoginCtrl.resx 2012-09-10 16:56:38 UTC (rev 6997)
@@ -112,23 +112,23 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
- <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="cmbLanguage.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
- <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="cmbLanguage.Location" type="System.Drawing.Point, System.Drawing">
<value>82, 108</value>
</data>
<data name="cmbLanguage.Size" type="System.Drawing.Size, System.Drawing">
<value>279, 21</value>
</data>
- <assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="cmbLanguage.TabIndex" type="System.Int32, mscorlib">
<value>23</value>
</data>
@@ -136,7 +136,7 @@
<value>cmbLanguage</value>
</data>
<data name=">>cmbLanguage.Type" xml:space="preserve">
- <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name=">>cmbLanguage.Parent" xml:space="preserve">
<value>$this</value>
@@ -163,7 +163,7 @@
<value>label5</value>
</data>
<data name=">>label5.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name=">>label5.Parent" xml:space="preserve">
<value>$this</value>
@@ -186,14 +186,11 @@
<data name="txtPassword.TabIndex" type="System.Int32, mscorlib">
<value>21</value>
</data>
- <data name="txtPassword.Text" xml:space="preserve">
- <value>admin</value>
- </data>
<data name=">>txtPassword.Name" xml:space="preserve">
<value>txtPassword</value>
</data>
<data name=">>txtPassword.Type" xml:space="preserve">
- <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name=">>txtPassword.Parent" xml:space="preserve">
<value>$this</value>
@@ -213,14 +210,11 @@
<data name="txtUsername.TabIndex" type="System.Int32, mscorlib">
<value>20</value>
</data>
- <data name="txtUsername.Text" xml:space="preserve">
- <value>Administrator</value>
- </data>
<data name=">>txtUsername.Name" xml:space="preserve">
<value>txtUsername</value>
</data>
<data name=">>txtUsername.Type" xml:space="preserve">
- <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name=">>txtUsername.Parent" xml:space="preserve">
<value>$this</value>
@@ -243,14 +237,11 @@
<data name="txtStartingpoint.TabIndex" type="System.Int32, mscorlib">
<value>17</value>
</data>
- <data name="txtStartingpoint.Text" xml:space="preserve">
- <value>Library://</value>
- </data>
<data name=">>txtStartingpoint.Name" xml:space="preserve">
<value>txtStartingpoint</value>
</data>
<data name=">>txtStartingpoint.Type" xml:space="preserve">
- <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name=">>txtStartingpoint.Parent" xml:space="preserve">
<value>$this</value>
@@ -277,7 +268,7 @@
<value>label4</value>
</data>
<data name=">>label4.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name=">>label4.Parent" xml:space="preserve">
<value>$this</value>
@@ -304,7 +295,7 @@
<value>label3</value>
</data>
<data name=">>label3.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name=">>label3.Parent" xml:space="preserve">
<value>$this</value>
@@ -334,7 +325,7 @@
<value>label2</value>
</data>
<data name=">>label2.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name=">>label2.Parent" xml:space="preserve">
<value>$this</value>
@@ -354,14 +345,11 @@
<data name="cmbServerUrl.TabIndex" type="System.Int32, mscorlib">
<value>15</value>
</data>
- <data name="cmbServerUrl.Text" xml:space="preserve">
- <value>http://localhost/mapguide/mapagent/mapagent.fcgi</value>
- </data>
<data name=">>cmbServerUrl.Name" xml:space="preserve">
<value>cmbServerUrl</value>
</data>
<data name=">>cmbServerUrl.Type" xml:space="preserve">
- <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name=">>cmbServerUrl.Parent" xml:space="preserve">
<value>$this</value>
@@ -388,7 +376,7 @@
<value>label1</value>
</data>
<data name=">>label1.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name=">>label1.Parent" xml:space="preserve">
<value>$this</value>
@@ -396,7 +384,7 @@
<data name=">>label1.ZOrder" xml:space="preserve">
<value>9</value>
</data>
- <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
@@ -406,6 +394,6 @@
<value>HttpLoginCtrl</value>
</data>
<data name=">>$this.Type" xml:space="preserve">
- <value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>
\ No newline at end of file
Modified: trunk/Tools/Maestro/Maestro.Login/LocalLoginCtrl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Login/LocalLoginCtrl.Designer.cs 2012-09-10 16:47:43 UTC (rev 6996)
+++ trunk/Tools/Maestro/Maestro.Login/LocalLoginCtrl.Designer.cs 2012-09-10 16:56:38 UTC (rev 6997)
@@ -28,6 +28,7 @@
/// </summary>
private void InitializeComponent()
{
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LocalLoginCtrl));
this.btnBrowse = new System.Windows.Forms.Button();
this.txtPlatformConfig = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
@@ -35,44 +36,29 @@
//
// btnBrowse
//
- this.btnBrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.btnBrowse.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.btnBrowse.Location = new System.Drawing.Point(410, 30);
+ resources.ApplyResources(this.btnBrowse, "btnBrowse");
this.btnBrowse.Name = "btnBrowse";
- this.btnBrowse.Size = new System.Drawing.Size(26, 23);
- this.btnBrowse.TabIndex = 31;
- this.btnBrowse.Text = "...";
this.btnBrowse.UseVisualStyleBackColor = true;
this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click);
//
- // txtWebConfig
+ // txtPlatformConfig
//
- this.txtPlatformConfig.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.txtPlatformConfig.Location = new System.Drawing.Point(19, 32);
- this.txtPlatformConfig.Name = "txtWebConfig";
- this.txtPlatformConfig.Size = new System.Drawing.Size(385, 20);
- this.txtPlatformConfig.TabIndex = 30;
+ resources.ApplyResources(this.txtPlatformConfig, "txtPlatformConfig");
+ this.txtPlatformConfig.Name = "txtPlatformConfig";
//
// label1
//
- this.label1.AutoSize = true;
- this.label1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.label1.Location = new System.Drawing.Point(16, 15);
+ resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(129, 13);
- this.label1.TabIndex = 29;
- this.label1.Text = "Platform Configuration File";
//
// LocalLoginCtrl
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.btnBrowse);
this.Controls.Add(this.txtPlatformConfig);
this.Controls.Add(this.label1);
this.Name = "LocalLoginCtrl";
- this.Size = new System.Drawing.Size(453, 165);
this.ResumeLayout(false);
this.PerformLayout();
Modified: trunk/Tools/Maestro/Maestro.Login/LocalLoginCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Login/LocalLoginCtrl.resx 2012-09-10 16:47:43 UTC (rev 6996)
+++ trunk/Tools/Maestro/Maestro.Login/LocalLoginCtrl.resx 2012-09-10 16:56:38 UTC (rev 6997)
@@ -112,9 +112,111 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
+ <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="btnBrowse.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+ <value>Top, Right</value>
+ </data>
+ <data name="btnBrowse.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+ <value>NoControl</value>
+ </data>
+ <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <data name="btnBrowse.Location" type="System.Drawing.Point, System.Drawing">
+ <value>410, 30</value>
+ </data>
+ <data name="btnBrowse.Size" type="System.Drawing.Size, System.Drawing">
+ <value>26, 23</value>
+ </data>
+ <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="btnBrowse.TabIndex" type="System.Int32, mscorlib">
+ <value>31</value>
+ </data>
+ <data name="btnBrowse.Text" xml:space="preserve">
+ <value>...</value>
+ </data>
+ <data name=">>btnBrowse.Name" xml:space="preserve">
+ <value>btnBrowse</value>
+ </data>
+ <data name=">>btnBrowse.Type" xml:space="preserve">
+ <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name=">>btnBrowse.Parent" xml:space="preserve">
+ <value>$this</value>
+ </data>
+ <data name=">>btnBrowse.ZOrder" xml:space="preserve">
+ <value>0</value>
+ </data>
+ <data name="txtPlatformConfig.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+ <value>Top, Left, Right</value>
+ </data>
+ <data name="txtPlatformConfig.Location" type="System.Drawing.Point, System.Drawing">
+ <value>19, 32</value>
+ </data>
+ <data name="txtPlatformConfig.Size" type="System.Drawing.Size, System.Drawing">
+ <value>385, 20</value>
+ </data>
+ <data name="txtPlatformConfig.TabIndex" type="System.Int32, mscorlib">
+ <value>30</value>
+ </data>
+ <data name=">>txtPlatformConfig.Name" xml:space="preserve">
+ <value>txtPlatformConfig</value>
+ </data>
+ <data name=">>txtPlatformConfig.Type" xml:space="preserve">
+ <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name=">>txtPlatformConfig.Parent" xml:space="preserve">
+ <value>$this</value>
+ </data>
+ <data name=">>txtPlatformConfig.ZOrder" xml:space="preserve">
+ <value>1</value>
+ </data>
+ <data name="label1.AutoSize" type="System.Boolean, mscorlib">
+ <value>True</value>
+ </data>
+ <data name="label1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+ <value>NoControl</value>
+ </data>
+ <data name="label1.Location" type="System.Drawing.Point, System.Drawing">
+ <value>16, 15</value>
+ </data>
+ <data name="label1.Size" type="System.Drawing.Size, System.Drawing">
+ <value>129, 13</value>
+ </data>
+ <data name="label1.TabIndex" type="System.Int32, mscorlib">
+ <value>29</value>
+ </data>
+ <data name="label1.Text" xml:space="preserve">
+ <value>Platform Configuration File</value>
+ </data>
+ <data name=">>label1.Name" xml:space="preserve">
+ <value>label1</value>
+ </data>
+ <data name=">>label1.Type" xml:space="preserve">
+ <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name=">>label1.Parent" xml:space="preserve">
+ <value>$this</value>
+ </data>
+ <data name=">>label1.ZOrder" xml:space="preserve">
+ <value>2</value>
+ </data>
+ <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
+ <data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
+ <value>6, 13</value>
+ </data>
+ <data name="$this.Size" type="System.Drawing.Size, System.Drawing">
+ <value>453, 165</value>
+ </data>
+ <data name=">>$this.Name" xml:space="preserve">
+ <value>LocalLoginCtrl</value>
+ </data>
+ <data name=">>$this.Type" xml:space="preserve">
+ <value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
</root>
\ No newline at end of file
Modified: trunk/Tools/Maestro/Maestro.Login/LocalNativeLoginCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Login/LocalNativeLoginCtrl.cs 2012-09-10 16:47:43 UTC (rev 6996)
+++ trunk/Tools/Maestro/Maestro.Login/LocalNativeLoginCtrl.cs 2012-09-10 16:56:38 UTC (rev 6997)
@@ -87,8 +87,8 @@
dlg.InitialDirectory = Application.StartupPath;
//WTF does this default to false??? Does MS not realize that changing directories
//via this dialog absolutely screws up file/assembly loading from relative paths?
- dlg.RestoreDirectory = true;
- dlg.Filter = "*.ini|*.ini";
+ dlg.RestoreDirectory = true;
+ dlg.Filter = "*.ini|*.ini"; //NOXLATE
if (dlg.ShowDialog() == DialogResult.OK)
{
txtWebConfig.Text = dlg.FileName;
Modified: trunk/Tools/Maestro/Maestro.Login/LoginDialog.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Login/LoginDialog.cs 2012-09-10 16:47:43 UTC (rev 6996)
+++ trunk/Tools/Maestro/Maestro.Login/LoginDialog.cs 2012-09-10 16:56:38 UTC (rev 6997)
@@ -101,10 +101,10 @@
if (_siteList.Sites.Length == 0)
{
- _http.Server = "http://localhost/mapguide/mapagent/mapagent.fcgi";
- _http.StartingPoint = "Library://";
- _http.Username = "Administrator";
- _http.Password = "admin";
+ _http.Server = DefaultValues.Server;
+ _http.StartingPoint = DefaultValues.StartingPoint;
+ _http.Username = DefaultValues.Username;
+ _http.Password = DefaultValues.Password;
chkSavePassword.Checked = true;
//chkAutoConnect.Checked = false;
}
@@ -127,12 +127,12 @@
var providers = ConnectionProviderRegistry.GetProviders();
foreach (var prv in providers)
{
- if (prv.Name.ToUpper().Equals("MAESTRO.LOCALNATIVE"))
+ if (prv.Name.ToUpper().Equals("MAESTRO.LOCALNATIVE")) //NOXLATE
{
isNativeApiAvailable = true;
break;
}
- else if (prv.Name.ToUpper().Equals("MAESTRO.LOCAL"))
+ else if (prv.Name.ToUpper().Equals("MAESTRO.LOCAL")) //NOXLATE
{
isLocalApiAvailable = true;
break;
@@ -209,20 +209,17 @@
if (_selectedIndex == 0) //HTTP
{
- //string format = "Url={0};Username={1};Password={2};Locale={3};AllowUntestedVersion={4}";
- //string connStr = string.Format(format, _http.Server, _http.Username, _http.Password, _http.Language, true);
-
var builder = new System.Data.Common.DbConnectionStringBuilder();
- builder["Url"] = _http.Server;
- builder["Username"] = _http.Username;
- builder["Password"] = _http.Password;
- builder["Locale"] = _http.Language;
- builder["AllowUntestedVersion"] = true;
+ builder["Url"] = _http.Server; //NOXLATE
+ builder["Username"] = _http.Username; //NOXLATE
+ builder["Password"] = _http.Password; //NOXLATE
+ builder["Locale"] = _http.Language; //NOXLATE
+ builder["AllowUntestedVersion"] = true; //NOXLATE
- string agent = "MapGuide Maestro v" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
+ string agent = "MapGuide Maestro v" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); //NOXLATE
- _conn = ConnectionProviderRegistry.CreateConnection("Maestro.Http", builder.ToString());
- _conn.SetCustomProperty("UserAgent", agent);
+ _conn = ConnectionProviderRegistry.CreateConnection("Maestro.Http", builder.ToString()); //NOXLATE
+ _conn.SetCustomProperty("UserAgent", agent); //NOXLATE
//Update preferred site entry if it exists
int index = 0;
@@ -259,7 +256,7 @@
if (ps.SavePassword)
ps.UnscrambledPassword = _http.Password;
else
- ps.ScrambledPassword = "";
+ ps.ScrambledPassword = string.Empty;
if (index >= _siteList.Sites.Length)
_siteList.AddSite(ps);
@@ -281,17 +278,17 @@
else if (_selectedIndex == 1) //Native
{
System.Data.Common.DbConnectionStringBuilder builder = new System.Data.Common.DbConnectionStringBuilder();
- builder["ConfigFile"] = _localNative.WebConfigPath;
- builder["Username"] = _localNative.Username;
- builder["Password"] = _localNative.Password;
- builder["Locale"] = System.Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName;
- _conn = ConnectionProviderRegistry.CreateConnection("Maestro.LocalNative", builder.ToString());
+ builder["ConfigFile"] = _localNative.WebConfigPath; //NOXLATE
+ builder["Username"] = _localNative.Username; //NOXLATE
+ builder["Password"] = _localNative.Password; //NOXLATE
+ builder["Locale"] = System.Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName; //NOXLATE
+ _conn = ConnectionProviderRegistry.CreateConnection("Maestro.LocalNative", builder.ToString()); //NOXLATE
}
else //Local
{
NameValueCollection param = new NameValueCollection();
- param["ConfigFile"] = _local.PlatformConfigPath;
- _conn = ConnectionProviderRegistry.CreateConnection("Maestro.Local", param);
+ param["ConfigFile"] = _local.PlatformConfigPath; //NOXLATE
+ _conn = ConnectionProviderRegistry.CreateConnection("Maestro.Local", param); //NOXLATE
}
_conn.AutoRestartSession = true;
Modified: trunk/Tools/Maestro/Maestro.Login/PreferedSite.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Login/PreferedSite.cs 2012-09-10 16:47:43 UTC (rev 6996)
+++ trunk/Tools/Maestro/Maestro.Login/PreferedSite.cs 2012-09-10 16:56:38 UTC (rev 6997)
@@ -23,15 +23,15 @@
namespace Maestro.Login
{
- /// <summary>
- /// Simple list style container for sites
- /// </summary>
- public class PreferredSiteList
- {
- private PreferedSite[] m_sites;
+ /// <summary>
+ /// Simple list style container for sites
+ /// </summary>
+ public class PreferredSiteList
+ {
+ private PreferedSite[] m_sites;
private string m_systemBrowser;
- private int m_initialSite;
- private bool m_autoconnect;
+ private int m_initialSite;
+ private bool m_autoconnect;
private bool m_useFusionPreview;
private bool m_maximizedWindow;
private int m_windowLeft;
@@ -44,16 +44,16 @@
/// Gets or sets the sites.
/// </summary>
/// <value>The sites.</value>
- public PreferedSite[] Sites
- {
- get
- {
- if (m_sites == null)
- m_sites = new PreferedSite[0];
- return m_sites;
- }
- set { m_sites = value; }
- }
+ public PreferedSite[] Sites
+ {
+ get
+ {
+ if (m_sites == null)
+ m_sites = new PreferedSite[0];
+ return m_sites;
+ }
+ set { m_sites = value; }
+ }
/// <summary>
/// Gets or sets the GUI language.
@@ -89,8 +89,8 @@
if (string.IsNullOrEmpty(m_systemBrowser))
{
//Windows, use system default by url handler
- if (System.IO.Path.DirectorySeparatorChar == '\\')
- m_systemBrowser = "";
+ if (System.IO.Path.DirectorySeparatorChar == '\\') //NOXLATE
+ m_systemBrowser = string.Empty;
//Linux, assume firefox
else
m_systemBrowser = "firefox";
@@ -106,23 +106,23 @@
/// Gets or sets the prefered site.
/// </summary>
/// <value>The prefered site.</value>
- [System.Xml.Serialization.XmlAttribute()]
- public int PreferedSite
- {
- get { return m_initialSite; }
- set { m_initialSite = value; }
- }
+ [System.Xml.Serialization.XmlAttribute()]
+ public int PreferedSite
+ {
+ get { return m_initialSite; }
+ set { m_initialSite = value; }
+ }
/// <summary>
/// Gets or sets a value indicating whether [auto connect].
/// </summary>
/// <value><c>true</c> if [auto connect]; otherwise, <c>false</c>.</value>
- [System.Xml.Serialization.XmlAttribute()]
- public bool AutoConnect
- {
- get { return m_autoconnect; }
- set { m_autoconnect = value; }
- }
+ [System.Xml.Serialization.XmlAttribute()]
+ public bool AutoConnect
+ {
+ get { return m_autoconnect; }
+ set { m_autoconnect = value; }
+ }
/// <summary>
/// Gets or sets a value indicating whether [maximized window].
@@ -183,14 +183,14 @@
/// Adds the site.
/// </summary>
/// <param name="site">The site.</param>
- public void AddSite(PreferedSite site)
- {
- //A generic collection would be nice :/
- PreferedSite[] n = new PreferedSite[m_sites.Length + 1];
- Array.Copy(m_sites, 0, n, 0, m_sites.Length);
- n[n.Length-1] = site;
- m_sites = n;
- }
+ public void AddSite(PreferedSite site)
+ {
+ //A generic collection would be nice :/
+ PreferedSite[] n = new PreferedSite[m_sites.Length + 1];
+ Array.Copy(m_sites, 0, n, 0, m_sites.Length);
+ n[n.Length-1] = site;
+ m_sites = n;
+ }
private static string AppSettingFile
{
@@ -199,9 +199,9 @@
string path = System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData), Application.ProductName);
if (!System.IO.Directory.Exists(path))
System.IO.Directory.CreateDirectory(path);
- path = System.IO.Path.Combine(path, "sitelist.xml");
+ path = System.IO.Path.Combine(path, "sitelist.xml"); //NOXLATE
- string oldPath = System.IO.Path.Combine(System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData), "Maestro"), "sitelist.xml");
+ string oldPath = System.IO.Path.Combine(System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData), "Maestro"), "sitelist.xml"); //NOXLATE
if (System.IO.File.Exists(oldPath) && !System.IO.File.Exists(path))
try { System.IO.File.Move(oldPath, path); }
catch { }
@@ -266,113 +266,113 @@
return System.Threading.Thread.CurrentThread.CurrentUICulture.Name;
}
- }
+ }
- /// <summary>
- /// Simple container class for sites
- /// </summary>
- public class PreferedSite
- {
- private string m_siteURL;
- private string m_startingPoint;
- private string m_username;
- private string m_scrambledPassword;
- private bool m_savePassword;
- private Version m_approvedVersion;
+ /// <summary>
+ /// Simple container class for sites
+ /// </summary>
+ public class PreferedSite
+ {
+ private string m_siteURL;
+ private string m_startingPoint;
+ private string m_username;
+ private string m_scrambledPassword;
+ private bool m_savePassword;
+ private Version m_approvedVersion;
/// <summary>
/// Initializes a new instance of the <see cref="PreferedSite"/> class.
/// </summary>
- public PreferedSite()
- {
- }
+ public PreferedSite()
+ {
+ }
/// <summary>
/// Gets or sets the site URL.
/// </summary>
/// <value>The site URL.</value>
- public string SiteURL
- {
- get { return m_siteURL; }
- set { m_siteURL = value; }
- }
+ public string SiteURL
+ {
+ get { return m_siteURL; }
+ set { m_siteURL = value; }
+ }
/// <summary>
/// Gets or sets the starting point.
/// </summary>
/// <value>The starting point.</value>
- public string StartingPoint
- {
- get { return m_startingPoint; }
- set { m_startingPoint = value; }
- }
+ public string StartingPoint
+ {
+ get { return m_startingPoint; }
+ set { m_startingPoint = value; }
+ }
/// <summary>
/// Gets or sets the username.
/// </summary>
/// <value>The username.</value>
- public string Username
- {
- get { return m_username; }
- set { m_username = value; }
- }
+ public string Username
+ {
+ get { return m_username; }
+ set { m_username = value; }
+ }
/// <summary>
/// Gets or sets the scrambled password.
/// </summary>
/// <value>The scrambled password.</value>
- public string ScrambledPassword
- {
- get { return m_scrambledPassword; }
- set { m_scrambledPassword = value; }
- }
+ public string ScrambledPassword
+ {
+ get { return m_scrambledPassword; }
+ set { m_scrambledPassword = value; }
+ }
/// <summary>
/// Gets or sets a value indicating whether [save password].
/// </summary>
/// <value><c>true</c> if [save password]; otherwise, <c>false</c>.</value>
- public bool SavePassword
- {
- get { return m_savePassword; }
- set { m_savePassword = value; }
- }
+ public bool SavePassword
+ {
+ get { return m_savePassword; }
+ set { m_savePassword = value; }
+ }
/// <summary>
/// Gets or sets the approved version string.
/// </summary>
/// <value>The approved version string.</value>
- public string ApprovedVersionString
- {
- get { return ApprovedVersion.ToString(); }
- set { ApprovedVersion = new Version(value); }
- }
+ public string ApprovedVersionString
+ {
+ get { return ApprovedVersion.ToString(); }
+ set { ApprovedVersion = new Version(value); }
+ }
/// <summary>
/// Gets or sets the approved version.
/// </summary>
/// <value>The approved version.</value>
- [System.Xml.Serialization.XmlIgnore()]
- public Version ApprovedVersion
- {
- get
- {
- if (m_approvedVersion == null)
- m_approvedVersion = new Version(0, 0, 0, 0);
- return m_approvedVersion;
- }
- set { m_approvedVersion = value; }
- }
+ [System.Xml.Serialization.XmlIgnore()]
+ public Version ApprovedVersion
+ {
+ get
+ {
+ if (m_approvedVersion == null)
+ m_approvedVersion = new Version(0, 0, 0, 0);
+ return m_approvedVersion;
+ }
+ set { m_approvedVersion = value; }
+ }
/// <summary>
/// Gets or sets the unscrambled password.
/// </summary>
/// <value>The unscrambled password.</value>
- [System.Xml.Serialization.XmlIgnore()]
- public string UnscrambledPassword
- {
- get { return System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(m_scrambledPassword == null ? "" : m_scrambledPassword)); }
- set { m_scrambledPassword = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(value)); }
- }
+ [System.Xml.Serialization.XmlIgnore()]
+ public string UnscrambledPassword
+ {
+ get { return System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(m_scrambledPassword == null ? string.Empty : m_scrambledPassword)); }
+ set { m_scrambledPassword = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(value)); }
+ }
/// <summary>
@@ -381,10 +381,10 @@
/// <returns>
/// A <see cref="System.String"/> that represents this instance.
/// </returns>
- public override string ToString()
- {
- return m_siteURL;
- }
+ public override string ToString()
+ {
+ return m_siteURL;
+ }
- }
+ }
}
More information about the mapguide-commits
mailing list