[mapguide-commits] r5634 - in
trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers:
. SQLite Sdf Shp
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Mar 17 06:07:18 EDT 2011
Author: jng
Date: 2011-03-17 03:07:18 -0700 (Thu, 17 Mar 2011)
New Revision: 5634
Modified:
trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/FileBasedCtrl.Designer.cs
trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/FileBasedCtrl.cs
trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/FileBasedCtrl.resx
trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.Designer.cs
trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.cs
trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.resx
trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Sdf/SdfFileCtrl.Designer.cs
trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Sdf/SdfFileCtrl.cs
trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Sdf/SdfFileCtrl.resx
trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Shp/ShpFileCtrl.Designer.cs
trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Shp/ShpFileCtrl.cs
trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Shp/ShpFileCtrl.resx
Log:
Fix #1634: Fix dirty state notification for file-based editors. Also add a test connection button for these editors
Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/FileBasedCtrl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/FileBasedCtrl.Designer.cs 2011-03-16 11:10:20 UTC (rev 5633)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/FileBasedCtrl.Designer.cs 2011-03-17 10:07:18 UTC (rev 5634)
@@ -76,6 +76,7 @@
//
resources.ApplyResources(this.txtAlias, "txtAlias");
this.txtAlias.Name = "txtAlias";
+ this.txtAlias.TextChanged += new System.EventHandler(this.txtAlias_TextChanged);
//
// btnBrowseAlias
//
Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/FileBasedCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/FileBasedCtrl.cs 2011-03-16 11:10:20 UTC (rev 5633)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/FileBasedCtrl.cs 2011-03-17 10:07:18 UTC (rev 5634)
@@ -26,6 +26,7 @@
using System.Windows.Forms;
using Maestro.Shared.UI;
using Maestro.Editors.Common;
+using OSGeo.MapGuide.ObjectModels.FeatureSource;
namespace Maestro.Editors.FeatureSource.Providers
{
@@ -77,9 +78,21 @@
}
}
+ protected virtual string FileFdoProperty { get { return "File"; } }
+
protected virtual bool CanSelectFolders()
{
return false;
}
+
+ private void txtAlias_TextChanged(object sender, EventArgs e)
+ {
+ if (rdUnmanaged.Checked)
+ {
+ var fs = (IFeatureSource)_service.GetEditedResource();
+ fs.SetConnectionProperty(this.FileFdoProperty, txtAlias.Text);
+ OnResourceChanged();
+ }
+ }
}
}
Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/FileBasedCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/FileBasedCtrl.resx 2011-03-16 11:10:20 UTC (rev 5633)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/FileBasedCtrl.resx 2011-03-17 10:07:18 UTC (rev 5634)
@@ -301,7 +301,7 @@
<value>resDataCtrl</value>
</data>
<data name=">>resDataCtrl.Type" xml:space="preserve">
- <value>Maestro.Editors.Common.ResourceDataCtrl, Maestro.Editors, Version=3.0.0.5334, Culture=neutral, PublicKeyToken=null</value>
+ <value>Maestro.Editors.Common.ResourceDataCtrl, Maestro.Editors, Version=3.0.0.5610, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name=">>resDataCtrl.Parent" xml:space="preserve">
<value>contentPanel</value>
@@ -334,6 +334,6 @@
<value>FileBasedCtrl</value>
</data>
<data name=">>$this.Type" xml:space="preserve">
- <value>Maestro.Editors.Common.EditorBindableCollapsiblePanel, Maestro.Editors, Version=3.0.0.5334, Culture=neutral, PublicKeyToken=null</value>
+ <value>Maestro.Editors.Common.EditorBindableCollapsiblePanel, Maestro.Editors, Version=3.0.0.5610, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>
\ No newline at end of file
Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.Designer.cs 2011-03-16 11:10:20 UTC (rev 5633)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.Designer.cs 2011-03-17 10:07:18 UTC (rev 5634)
@@ -30,16 +30,22 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SQLiteFileCtrl));
this.chkUseFdoMetadata = new System.Windows.Forms.CheckBox();
+ this.btnTest = new System.Windows.Forms.Button();
+ this.txtStatus = new System.Windows.Forms.TextBox();
this.contentPanel.SuspendLayout();
this.SuspendLayout();
//
// contentPanel
//
+ this.contentPanel.Controls.Add(this.txtStatus);
this.contentPanel.Controls.Add(this.chkUseFdoMetadata);
+ this.contentPanel.Controls.Add(this.btnTest);
+ this.contentPanel.Controls.SetChildIndex(this.btnTest, 0);
this.contentPanel.Controls.SetChildIndex(this.chkUseFdoMetadata, 0);
this.contentPanel.Controls.SetChildIndex(this.resDataCtrl, 0);
this.contentPanel.Controls.SetChildIndex(this.rdManaged, 0);
this.contentPanel.Controls.SetChildIndex(this.rdUnmanaged, 0);
+ this.contentPanel.Controls.SetChildIndex(this.txtStatus, 0);
//
// chkUseFdoMetadata
//
@@ -48,9 +54,21 @@
this.chkUseFdoMetadata.UseVisualStyleBackColor = true;
this.chkUseFdoMetadata.CheckedChanged += new System.EventHandler(this.chkUseFdoMetadata_CheckedChanged);
//
+ // btnTest
+ //
+ resources.ApplyResources(this.btnTest, "btnTest");
+ this.btnTest.Name = "btnTest";
+ this.btnTest.UseVisualStyleBackColor = true;
+ this.btnTest.Click += new System.EventHandler(this.btnTest_Click);
+ //
+ // txtStatus
+ //
+ resources.ApplyResources(this.txtStatus, "txtStatus");
+ this.txtStatus.Name = "txtStatus";
+ this.txtStatus.ReadOnly = true;
+ //
// SQLiteFileCtrl
//
- resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.HeaderText = "SQLite Feature Source";
this.Name = "SQLiteFileCtrl";
@@ -63,5 +81,7 @@
#endregion
private System.Windows.Forms.CheckBox chkUseFdoMetadata;
+ private System.Windows.Forms.Button btnTest;
+ private System.Windows.Forms.TextBox txtStatus;
}
}
Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.cs 2011-03-16 11:10:20 UTC (rev 5633)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.cs 2011-03-17 10:07:18 UTC (rev 5634)
@@ -56,7 +56,7 @@
private void MarkSelected()
{
- var file = _fs.GetConnectionProperty("File");
+ var file = _fs.GetConnectionProperty(this.FileFdoProperty);
if (!string.IsNullOrEmpty(file))
{
if (_fs.UsesEmbeddedDataFiles)
@@ -66,9 +66,9 @@
resDataCtrl.MarkedFile = df;
}
else //if (_fs.UsesAliasedDataFiles)
- {
+ {
+ txtAlias.Text = file;
rdUnmanaged.Checked = true;
- txtAlias.Text = file;
}
}
}
@@ -82,9 +82,9 @@
protected override void OnResourceMarked(string dataName)
{
string fileProp = "%MG_DATA_FILE_PATH%" + dataName;
- string currFileProp = _fs.GetConnectionProperty("File");
+ string currFileProp = _fs.GetConnectionProperty(this.FileFdoProperty);
if (!currFileProp.Equals(fileProp))
- _fs.SetConnectionProperty("File", fileProp);
+ _fs.SetConnectionProperty(this.FileFdoProperty, fileProp);
}
private void chkUseFdoMetadata_CheckedChanged(object sender, EventArgs e)
@@ -94,5 +94,10 @@
if (!newValue.Equals(currValue))
_fs.SetConnectionProperty("UseFdoMetadata", newValue);
}
+
+ private void btnTest_Click(object sender, EventArgs e)
+ {
+ txtStatus.Text = string.Format(Properties.Resources.FdoConnectionStatus, _fs.TestConnection());
+ }
}
}
Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.resx 2011-03-16 11:10:20 UTC (rev 5633)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.resx 2011-03-17 10:07:18 UTC (rev 5634)
@@ -121,13 +121,13 @@
<value>resDataCtrl</value>
</data>
<data name=">>resDataCtrl.Type" xml:space="preserve">
- <value>Maestro.Editors.Common.ResourceDataCtrl, Maestro.Editors, Version=3.0.0.5334, Culture=neutral, PublicKeyToken=null</value>
+ <value>Maestro.Editors.Common.ResourceDataCtrl, Maestro.Editors, Version=3.0.0.5610, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name=">>resDataCtrl.Parent" xml:space="preserve">
<value>contentPanel</value>
</data>
<data name=">>resDataCtrl.ZOrder" xml:space="preserve">
- <value>2</value>
+ <value>3</value>
</data>
<data name=">>btnBrowseAlias.Name" xml:space="preserve">
<value>btnBrowseAlias</value>
@@ -163,7 +163,7 @@
<value>contentPanel</value>
</data>
<data name=">>rdUnmanaged.ZOrder" xml:space="preserve">
- <value>0</value>
+ <value>1</value>
</data>
<data name=">>rdManaged.Name" xml:space="preserve">
<value>rdManaged</value>
@@ -175,15 +175,43 @@
<value>contentPanel</value>
</data>
<data name=">>rdManaged.ZOrder" xml:space="preserve">
- <value>1</value>
+ <value>2</value>
</data>
+ <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="txtStatus.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" />
+ <data name="txtStatus.Location" type="System.Drawing.Point, System.Drawing">
+ <value>132, 250</value>
+ </data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="txtStatus.Multiline" type="System.Boolean, mscorlib">
+ <value>True</value>
+ </data>
+ <data name="txtStatus.Size" type="System.Drawing.Size, System.Drawing">
+ <value>294, 20</value>
+ </data>
+ <data name="txtStatus.TabIndex" type="System.Int32, mscorlib">
+ <value>11</value>
+ </data>
+ <data name=">>txtStatus.Name" xml:space="preserve">
+ <value>txtStatus</value>
+ </data>
+ <data name=">>txtStatus.Type" xml:space="preserve">
+ <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name=">>txtStatus.Parent" xml:space="preserve">
+ <value>contentPanel</value>
+ </data>
+ <data name=">>txtStatus.ZOrder" xml:space="preserve">
+ <value>0</value>
+ </data>
<data name="chkUseFdoMetadata.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
- <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="chkUseFdoMetadata.Location" type="System.Drawing.Point, System.Drawing">
- <value>25, 236</value>
+ <value>19, 225</value>
</data>
<data name="chkUseFdoMetadata.Size" type="System.Drawing.Size, System.Drawing">
<value>118, 17</value>
@@ -204,8 +232,35 @@
<value>contentPanel</value>
</data>
<data name=">>chkUseFdoMetadata.ZOrder" xml:space="preserve">
- <value>3</value>
+ <value>4</value>
</data>
+ <data name="btnTest.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+ <value>NoControl</value>
+ </data>
+ <data name="btnTest.Location" type="System.Drawing.Point, System.Drawing">
+ <value>19, 248</value>
+ </data>
+ <data name="btnTest.Size" type="System.Drawing.Size, System.Drawing">
+ <value>105, 23</value>
+ </data>
+ <data name="btnTest.TabIndex" type="System.Int32, mscorlib">
+ <value>10</value>
+ </data>
+ <data name="btnTest.Text" xml:space="preserve">
+ <value>Test Connection</value>
+ </data>
+ <data name=">>btnTest.Name" xml:space="preserve">
+ <value>btnTest</value>
+ </data>
+ <data name=">>btnTest.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=">>btnTest.Parent" xml:space="preserve">
+ <value>contentPanel</value>
+ </data>
+ <data name=">>btnTest.ZOrder" xml:space="preserve">
+ <value>5</value>
+ </data>
<data name=">>contentPanel.Name" xml:space="preserve">
<value>contentPanel</value>
</data>
@@ -221,13 +276,10 @@
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.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.Name" xml:space="preserve">
<value>SQLiteFileCtrl</value>
</data>
<data name=">>$this.Type" xml:space="preserve">
- <value>Maestro.Editors.FeatureSource.Providers.FileBasedCtrl, Maestro.Editors, Version=3.0.0.5334, Culture=neutral, PublicKeyToken=null</value>
+ <value>Maestro.Editors.FeatureSource.Providers.FileBasedCtrl, Maestro.Editors, Version=3.0.0.5610, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>
\ No newline at end of file
Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Sdf/SdfFileCtrl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Sdf/SdfFileCtrl.Designer.cs 2011-03-16 11:10:20 UTC (rev 5633)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Sdf/SdfFileCtrl.Designer.cs 2011-03-17 10:07:18 UTC (rev 5634)
@@ -30,16 +30,22 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SdfFileCtrl));
this.chkReadOnly = new System.Windows.Forms.CheckBox();
+ this.btnTest = new System.Windows.Forms.Button();
+ this.txtStatus = new System.Windows.Forms.TextBox();
this.contentPanel.SuspendLayout();
this.SuspendLayout();
//
// contentPanel
//
+ this.contentPanel.Controls.Add(this.txtStatus);
+ this.contentPanel.Controls.Add(this.btnTest);
this.contentPanel.Controls.Add(this.chkReadOnly);
this.contentPanel.Controls.SetChildIndex(this.resDataCtrl, 0);
this.contentPanel.Controls.SetChildIndex(this.rdManaged, 0);
this.contentPanel.Controls.SetChildIndex(this.rdUnmanaged, 0);
this.contentPanel.Controls.SetChildIndex(this.chkReadOnly, 0);
+ this.contentPanel.Controls.SetChildIndex(this.btnTest, 0);
+ this.contentPanel.Controls.SetChildIndex(this.txtStatus, 0);
//
// chkReadOnly
//
@@ -48,6 +54,19 @@
this.chkReadOnly.UseVisualStyleBackColor = true;
this.chkReadOnly.CheckedChanged += new System.EventHandler(this.chkReadOnly_CheckedChanged);
//
+ // btnTest
+ //
+ resources.ApplyResources(this.btnTest, "btnTest");
+ this.btnTest.Name = "btnTest";
+ this.btnTest.UseVisualStyleBackColor = true;
+ this.btnTest.Click += new System.EventHandler(this.btnTest_Click);
+ //
+ // txtStatus
+ //
+ resources.ApplyResources(this.txtStatus, "txtStatus");
+ this.txtStatus.Name = "txtStatus";
+ this.txtStatus.ReadOnly = true;
+ //
// SdfFileCtrl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -62,5 +81,7 @@
#endregion
private System.Windows.Forms.CheckBox chkReadOnly;
+ private System.Windows.Forms.Button btnTest;
+ private System.Windows.Forms.TextBox txtStatus;
}
}
Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Sdf/SdfFileCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Sdf/SdfFileCtrl.cs 2011-03-16 11:10:20 UTC (rev 5633)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Sdf/SdfFileCtrl.cs 2011-03-17 10:07:18 UTC (rev 5634)
@@ -56,7 +56,7 @@
private void MarkSelected()
{
- var file = _fs.GetConnectionProperty("File");
+ var file = _fs.GetConnectionProperty(this.FileFdoProperty);
if (!string.IsNullOrEmpty(file))
{
if (_fs.UsesEmbeddedDataFiles)
@@ -65,10 +65,10 @@
var df = _fs.GetEmbeddedDataName();
resDataCtrl.MarkedFile = df;
}
- else if (_fs.UsesAliasedDataFiles)
+ else //if (_fs.UsesAliasedDataFiles)
{
+ txtAlias.Text = file;
rdUnmanaged.Checked = true;
- txtAlias.Text = file;
}
}
}
@@ -90,9 +90,14 @@
protected override void OnResourceMarked(string dataName)
{
string fileProp = "%MG_DATA_FILE_PATH%" + dataName;
- string currFileProp = _fs.GetConnectionProperty("File");
+ string currFileProp = _fs.GetConnectionProperty(this.FileFdoProperty);
if (!currFileProp.Equals(fileProp))
- _fs.SetConnectionProperty("File", fileProp);
+ _fs.SetConnectionProperty(this.FileFdoProperty, fileProp);
}
+
+ private void btnTest_Click(object sender, EventArgs e)
+ {
+ txtStatus.Text = string.Format(Properties.Resources.FdoConnectionStatus, _fs.TestConnection());
+ }
}
}
Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Sdf/SdfFileCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Sdf/SdfFileCtrl.resx 2011-03-16 11:10:20 UTC (rev 5633)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Sdf/SdfFileCtrl.resx 2011-03-17 10:07:18 UTC (rev 5634)
@@ -121,13 +121,13 @@
<value>resDataCtrl</value>
</data>
<data name=">>resDataCtrl.Type" xml:space="preserve">
- <value>Maestro.Editors.Common.ResourceDataCtrl, Maestro.Editors, Version=3.0.0.5334, Culture=neutral, PublicKeyToken=null</value>
+ <value>Maestro.Editors.Common.ResourceDataCtrl, Maestro.Editors, Version=3.0.0.5610, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name=">>resDataCtrl.Parent" xml:space="preserve">
<value>contentPanel</value>
</data>
<data name=">>resDataCtrl.ZOrder" xml:space="preserve">
- <value>3</value>
+ <value>5</value>
</data>
<data name=">>btnBrowseAlias.Name" xml:space="preserve">
<value>btnBrowseAlias</value>
@@ -163,7 +163,7 @@
<value>contentPanel</value>
</data>
<data name=">>rdUnmanaged.ZOrder" xml:space="preserve">
- <value>1</value>
+ <value>3</value>
</data>
<data name=">>rdManaged.Name" xml:space="preserve">
<value>rdManaged</value>
@@ -175,15 +175,67 @@
<value>contentPanel</value>
</data>
<data name=">>rdManaged.ZOrder" xml:space="preserve">
- <value>2</value>
+ <value>4</value>
</data>
+ <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="txtStatus.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" />
+ <data name="txtStatus.Location" type="System.Drawing.Point, System.Drawing">
+ <value>130, 252</value>
+ </data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="txtStatus.Multiline" type="System.Boolean, mscorlib">
+ <value>True</value>
+ </data>
+ <data name="txtStatus.Size" type="System.Drawing.Size, System.Drawing">
+ <value>294, 20</value>
+ </data>
+ <data name="txtStatus.TabIndex" type="System.Int32, mscorlib">
+ <value>10</value>
+ </data>
+ <data name=">>txtStatus.Name" xml:space="preserve">
+ <value>txtStatus</value>
+ </data>
+ <data name=">>txtStatus.Type" xml:space="preserve">
+ <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name=">>txtStatus.Parent" xml:space="preserve">
+ <value>contentPanel</value>
+ </data>
+ <data name=">>txtStatus.ZOrder" xml:space="preserve">
+ <value>0</value>
+ </data>
+ <data name="btnTest.Location" type="System.Drawing.Point, System.Drawing">
+ <value>19, 252</value>
+ </data>
+ <data name="btnTest.Size" type="System.Drawing.Size, System.Drawing">
+ <value>105, 23</value>
+ </data>
+ <data name="btnTest.TabIndex" type="System.Int32, mscorlib">
+ <value>9</value>
+ </data>
+ <data name="btnTest.Text" xml:space="preserve">
+ <value>Test Connection</value>
+ </data>
+ <data name=">>btnTest.Name" xml:space="preserve">
+ <value>btnTest</value>
+ </data>
+ <data name=">>btnTest.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=">>btnTest.Parent" xml:space="preserve">
+ <value>contentPanel</value>
+ </data>
+ <data name=">>btnTest.ZOrder" xml:space="preserve">
+ <value>1</value>
+ </data>
<data name="chkReadOnly.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
- <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="chkReadOnly.Location" type="System.Drawing.Point, System.Drawing">
- <value>19, 240</value>
+ <value>19, 229</value>
</data>
<data name="chkReadOnly.Size" type="System.Drawing.Size, System.Drawing">
<value>162, 17</value>
@@ -204,7 +256,7 @@
<value>contentPanel</value>
</data>
<data name=">>chkReadOnly.ZOrder" xml:space="preserve">
- <value>0</value>
+ <value>2</value>
</data>
<data name=">>contentPanel.Name" xml:space="preserve">
<value>contentPanel</value>
@@ -225,6 +277,6 @@
<value>SdfFileCtrl</value>
</data>
<data name=">>$this.Type" xml:space="preserve">
- <value>Maestro.Editors.FeatureSource.Providers.FileBasedCtrl, Maestro.Editors, Version=3.0.0.5334, Culture=neutral, PublicKeyToken=null</value>
+ <value>Maestro.Editors.FeatureSource.Providers.FileBasedCtrl, Maestro.Editors, Version=3.0.0.5610, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>
\ No newline at end of file
Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Shp/ShpFileCtrl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Shp/ShpFileCtrl.Designer.cs 2011-03-16 11:10:20 UTC (rev 5633)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Shp/ShpFileCtrl.Designer.cs 2011-03-17 10:07:18 UTC (rev 5634)
@@ -28,9 +28,35 @@
/// </summary>
private void InitializeComponent()
{
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShpFileCtrl));
+ this.btnTest = new System.Windows.Forms.Button();
+ this.txtStatus = new System.Windows.Forms.TextBox();
this.contentPanel.SuspendLayout();
this.SuspendLayout();
//
+ // contentPanel
+ //
+ this.contentPanel.Controls.Add(this.txtStatus);
+ this.contentPanel.Controls.Add(this.btnTest);
+ this.contentPanel.Controls.SetChildIndex(this.resDataCtrl, 0);
+ this.contentPanel.Controls.SetChildIndex(this.rdManaged, 0);
+ this.contentPanel.Controls.SetChildIndex(this.rdUnmanaged, 0);
+ this.contentPanel.Controls.SetChildIndex(this.btnTest, 0);
+ this.contentPanel.Controls.SetChildIndex(this.txtStatus, 0);
+ //
+ // btnTest
+ //
+ resources.ApplyResources(this.btnTest, "btnTest");
+ this.btnTest.Name = "btnTest";
+ this.btnTest.UseVisualStyleBackColor = true;
+ this.btnTest.Click += new System.EventHandler(this.btnTest_Click);
+ //
+ // txtStatus
+ //
+ resources.ApplyResources(this.txtStatus, "txtStatus");
+ this.txtStatus.Name = "txtStatus";
+ this.txtStatus.ReadOnly = true;
+ //
// ShpFileCtrl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -43,5 +69,8 @@
}
#endregion
+
+ private System.Windows.Forms.Button btnTest;
+ private System.Windows.Forms.TextBox txtStatus;
}
}
Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Shp/ShpFileCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Shp/ShpFileCtrl.cs 2011-03-16 11:10:20 UTC (rev 5633)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Shp/ShpFileCtrl.cs 2011-03-17 10:07:18 UTC (rev 5634)
@@ -73,9 +73,17 @@
}
}
+ protected override string FileFdoProperty
+ {
+ get
+ {
+ return "DefaultFileLocation";
+ }
+ }
+
private void MarkSelected()
{
- var file = _fs.GetConnectionProperty("DefaultFileLocation");
+ var file = _fs.GetConnectionProperty(this.FileFdoProperty);
if (!string.IsNullOrEmpty(file))
{
if (_fs.UsesEmbeddedDataFiles)
@@ -84,10 +92,10 @@
var df = _fs.GetEmbeddedDataName();
resDataCtrl.MarkedFile = df;
}
- else if (_fs.UsesAliasedDataFiles)
+ else //if (_fs.UsesAliasedDataFiles)
{
+ txtAlias.Text = file;
rdUnmanaged.Checked = true;
- txtAlias.Text = file;
}
}
}
@@ -101,14 +109,19 @@
protected override void OnResourceMarked(string dataName)
{
var newValue = "%MG_DATA_FILE_PATH%" + dataName;
- var currValue = _fs.GetConnectionProperty("DefaultFileLocation");
+ var currValue = _fs.GetConnectionProperty(this.FileFdoProperty);
if (!newValue.Equals(currValue))
- _fs.SetConnectionProperty("DefaultFileLocation", newValue);
+ _fs.SetConnectionProperty(this.FileFdoProperty, newValue);
}
protected override bool CanSelectFolders()
{
return true;
}
+
+ private void btnTest_Click(object sender, EventArgs e)
+ {
+ txtStatus.Text = string.Format(Properties.Resources.FdoConnectionStatus, _fs.TestConnection());
+ }
}
}
Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Shp/ShpFileCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Shp/ShpFileCtrl.resx 2011-03-16 11:10:20 UTC (rev 5633)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Shp/ShpFileCtrl.resx 2011-03-17 10:07:18 UTC (rev 5634)
@@ -121,13 +121,13 @@
<value>resDataCtrl</value>
</data>
<data name=">>resDataCtrl.Type" xml:space="preserve">
- <value>Maestro.Editors.Common.ResourceDataCtrl, Maestro.Editors, Version=3.0.0.5334, Culture=neutral, PublicKeyToken=null</value>
+ <value>Maestro.Editors.Common.ResourceDataCtrl, Maestro.Editors, Version=3.0.0.5610, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name=">>resDataCtrl.Parent" xml:space="preserve">
<value>contentPanel</value>
</data>
<data name=">>resDataCtrl.ZOrder" xml:space="preserve">
- <value>3</value>
+ <value>4</value>
</data>
<data name=">>btnBrowseAlias.Name" xml:space="preserve">
<value>btnBrowseAlias</value>
@@ -163,7 +163,7 @@
<value>contentPanel</value>
</data>
<data name=">>rdUnmanaged.ZOrder" xml:space="preserve">
- <value>1</value>
+ <value>2</value>
</data>
<data name=">>rdManaged.Name" xml:space="preserve">
<value>rdManaged</value>
@@ -175,8 +175,65 @@
<value>contentPanel</value>
</data>
<data name=">>rdManaged.ZOrder" xml:space="preserve">
- <value>2</value>
+ <value>3</value>
</data>
+ <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="txtStatus.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" />
+ <data name="txtStatus.Location" type="System.Drawing.Point, System.Drawing">
+ <value>132, 227</value>
+ </data>
+ <assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="txtStatus.Multiline" type="System.Boolean, mscorlib">
+ <value>True</value>
+ </data>
+ <data name="txtStatus.Size" type="System.Drawing.Size, System.Drawing">
+ <value>294, 20</value>
+ </data>
+ <data name="txtStatus.TabIndex" type="System.Int32, mscorlib">
+ <value>11</value>
+ </data>
+ <data name=">>txtStatus.Name" xml:space="preserve">
+ <value>txtStatus</value>
+ </data>
+ <data name=">>txtStatus.Type" xml:space="preserve">
+ <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name=">>txtStatus.Parent" xml:space="preserve">
+ <value>contentPanel</value>
+ </data>
+ <data name=">>txtStatus.ZOrder" xml:space="preserve">
+ <value>0</value>
+ </data>
+ <data name="btnTest.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+ <value>NoControl</value>
+ </data>
+ <data name="btnTest.Location" type="System.Drawing.Point, System.Drawing">
+ <value>19, 225</value>
+ </data>
+ <data name="btnTest.Size" type="System.Drawing.Size, System.Drawing">
+ <value>105, 23</value>
+ </data>
+ <data name="btnTest.TabIndex" type="System.Int32, mscorlib">
+ <value>10</value>
+ </data>
+ <data name="btnTest.Text" xml:space="preserve">
+ <value>Test Connection</value>
+ </data>
+ <data name=">>btnTest.Name" xml:space="preserve">
+ <value>btnTest</value>
+ </data>
+ <data name=">>btnTest.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=">>btnTest.Parent" xml:space="preserve">
+ <value>contentPanel</value>
+ </data>
+ <data name=">>btnTest.ZOrder" xml:space="preserve">
+ <value>1</value>
+ </data>
<data name=">>contentPanel.Name" xml:space="preserve">
<value>contentPanel</value>
</data>
@@ -196,6 +253,6 @@
<value>ShpFileCtrl</value>
</data>
<data name=">>$this.Type" xml:space="preserve">
- <value>Maestro.Editors.FeatureSource.Providers.FileBasedCtrl, Maestro.Editors, Version=3.0.0.5334, Culture=neutral, PublicKeyToken=null</value>
+ <value>Maestro.Editors.FeatureSource.Providers.FileBasedCtrl, Maestro.Editors, Version=3.0.0.5610, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>
\ No newline at end of file
More information about the mapguide-commits
mailing list