[mapguide-commits] r5221 - in sandbox/maestro-3.0: Maestro.Base
Maestro.Base/Commands Maestro.Base/Commands/Conditions
Maestro.Base/Commands/Test Maestro.Base/Editor
Maestro.Base/Properties Maestro.Base/UI
Maestro.Base/UI/Packaging Maestro.Editors
Maestro.Editors/Common Maestro.Editors/FeatureSource
Maestro.Editors/FeatureSource/Providers
Maestro.Editors/LayerDefinition/Vector
Maestro.Editors/Properties OSGeo.MapGuide.MaestroAPI
OSGeo.MapGuide.MaestroAPI/Services OSGeo.MapGuide.MaestroAPI.Http
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Sep 30 06:10:13 EDT 2010
Author: jng
Date: 2010-09-30 10:10:13 +0000 (Thu, 30 Sep 2010)
New Revision: 5221
Added:
sandbox/maestro-3.0/Maestro.Base/Commands/Test/TestCommands.cs
Modified:
sandbox/maestro-3.0/Maestro.Base/Commands/Conditions/ActiveEditorConditionEvaluator.cs
sandbox/maestro-3.0/Maestro.Base/Commands/SaveResourceAsCommand.cs
sandbox/maestro-3.0/Maestro.Base/Commands/Test/OpenResourceCommand.cs
sandbox/maestro-3.0/Maestro.Base/Commands/Test/OpenSymbolBrowserCommand.cs
sandbox/maestro-3.0/Maestro.Base/Commands/Test/OpenUnmanagedResourceCommand.cs
sandbox/maestro-3.0/Maestro.Base/Editor/EditorContentBase.cs
sandbox/maestro-3.0/Maestro.Base/Editor/IEditorViewContent.cs
sandbox/maestro-3.0/Maestro.Base/Editor/ResourceEditorService.cs
sandbox/maestro-3.0/Maestro.Base/Maestro.Base.addin
sandbox/maestro-3.0/Maestro.Base/Maestro.Base.csproj
sandbox/maestro-3.0/Maestro.Base/Properties/Resources.Designer.cs
sandbox/maestro-3.0/Maestro.Base/Properties/Resources.resx
sandbox/maestro-3.0/Maestro.Base/UI/NewResourceDialog.cs
sandbox/maestro-3.0/Maestro.Base/UI/Packaging/CreatePackageDialog.cs
sandbox/maestro-3.0/Maestro.Editors/Common/GenericItemSelectionDialog.Designer.cs
sandbox/maestro-3.0/Maestro.Editors/Common/GenericItemSelectionDialog.cs
sandbox/maestro-3.0/Maestro.Editors/Common/ResourcePicker.cs
sandbox/maestro-3.0/Maestro.Editors/Common/ResourcePicker.resx
sandbox/maestro-3.0/Maestro.Editors/Common/UnmanagedFileBrowser.Designer.cs
sandbox/maestro-3.0/Maestro.Editors/Common/UnmanagedFileBrowser.cs
sandbox/maestro-3.0/Maestro.Editors/Common/UnmanagedFileBrowser.resx
sandbox/maestro-3.0/Maestro.Editors/FeatureSource/ExtensionsCtrl.cs
sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/GenericCtrl.Designer.cs
sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/GenericCtrl.cs
sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/GenericCtrl.resx
sandbox/maestro-3.0/Maestro.Editors/IEditorService.cs
sandbox/maestro-3.0/Maestro.Editors/LayerDefinition/Vector/VectorLayerSettingsSectionCtrl.cs
sandbox/maestro-3.0/Maestro.Editors/Properties/Resources.Designer.cs
sandbox/maestro-3.0/Maestro.Editors/Properties/Resources.resx
sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI.Http/HttpServerConnection.cs
sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI.Http/RequestBuilder.cs
sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ServerConnectionBase.cs
sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Services/IFeatureService.cs
Log:
More 3.0 sandbox changes:
- Update ResourcePicker to support 3 modes:
- Open Resource (default)
- Open Folder
- Save Resource
- Add missing EnumerateDataStores API for IFeatureService
- Fix UnmanagedFileBrowser to return correct %MG_DATA_PATH_ALIAS% syntax
- Show "New Resource" as tab title for newly created resources. Only when saved into the site repostiory will the title change to match the resource id.
- Feature Source Editor updates
- Implement value fetching for generic editor
- Implement Save As command
- Fix condition check of Save command. It should be enabled when edited resource is *not* new and is dirty.
Modified: sandbox/maestro-3.0/Maestro.Base/Commands/Conditions/ActiveEditorConditionEvaluator.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Commands/Conditions/ActiveEditorConditionEvaluator.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Base/Commands/Conditions/ActiveEditorConditionEvaluator.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -45,7 +45,7 @@
case "CANVALIDATE":
return ed != null && ed.CanBeValidated;
case "CANSAVE":
- return ed != null && ed.IsDirty;
+ return ed != null && !ed.IsNew && ed.IsDirty;
case "CANPROFILE":
return ed != null && ed.CanProfile;
case "CANEDITASXML":
Modified: sandbox/maestro-3.0/Maestro.Base/Commands/SaveResourceAsCommand.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Commands/SaveResourceAsCommand.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Base/Commands/SaveResourceAsCommand.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -21,6 +21,10 @@
using System.Collections.Generic;
using System.Text;
using ICSharpCode.Core;
+using Maestro.Base.Editor;
+using Maestro.Shared.UI;
+using Maestro.Editors.Generic;
+using Maestro.Base.Services;
namespace Maestro.Base.Commands
{
@@ -28,7 +32,25 @@
{
public override void Run()
{
- throw new NotImplementedException();
+ var wb = Workbench.Instance;
+ var exp = wb.ActiveSiteExplorer;
+ var connMgr = ServiceRegistry.GetService<ServerConnectionManager>();
+ var conn = connMgr.GetConnection(exp.ConnectionName);
+ var ed = wb.ActiveDocumentView as IEditorViewContent;
+
+ if (ed != null)
+ {
+ using (var picker = new ResourcePicker(conn.ResourceService, ed.Resource.ResourceType, ResourcePickerMode.SaveResource))
+ {
+ if (picker.ShowDialog() == System.Windows.Forms.DialogResult.OK)
+ {
+ using (new WaitCursor(wb))
+ {
+ ed.EditorService.SaveAs(picker.ResourceID);
+ }
+ }
+ }
+ }
}
}
}
Modified: sandbox/maestro-3.0/Maestro.Base/Commands/Test/OpenResourceCommand.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Commands/Test/OpenResourceCommand.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Base/Commands/Test/OpenResourceCommand.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -56,8 +56,7 @@
var mgr = ServiceRegistry.GetService<ServerConnectionManager>();
var conn = mgr.GetConnection(exp.ConnectionName);
- var picker = new ResourcePicker(conn.ResourceService);
- picker.SelectFoldersOnly = true;
+ var picker = new ResourcePicker(conn.ResourceService, ResourcePickerMode.OpenFolder);
if (picker.ShowDialog(wb) == System.Windows.Forms.DialogResult.OK)
{
MessageService.ShowMessage(picker.ResourceID);
@@ -79,7 +78,7 @@
var mgr = ServiceRegistry.GetService<ServerConnectionManager>();
var conn = mgr.GetConnection(exp.ConnectionName);
- var picker = new ResourcePicker(conn.ResourceService, OSGeo.MapGuide.MaestroAPI.ResourceTypes.FeatureSource);
+ var picker = new ResourcePicker(conn.ResourceService, OSGeo.MapGuide.MaestroAPI.ResourceTypes.FeatureSource, ResourcePickerMode.OpenResource);
if (picker.ShowDialog(wb) == System.Windows.Forms.DialogResult.OK)
{
MessageService.ShowMessage(picker.ResourceID);
Modified: sandbox/maestro-3.0/Maestro.Base/Commands/Test/OpenSymbolBrowserCommand.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Commands/Test/OpenSymbolBrowserCommand.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Base/Commands/Test/OpenSymbolBrowserCommand.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -37,7 +37,7 @@
var mgr = ServiceRegistry.GetService<ServerConnectionManager>();
var conn = mgr.GetConnection(exp.ConnectionName);
- var picker = new ResourcePicker(conn.ResourceService, ResourceTypes.SymbolLibrary);
+ var picker = new ResourcePicker(conn.ResourceService, ResourceTypes.SymbolLibrary, ResourcePickerMode.OpenResource);
if (picker.ShowDialog(wb) == System.Windows.Forms.DialogResult.OK)
{
var browser = new SymbolPicker(picker.ResourceID, conn);
Modified: sandbox/maestro-3.0/Maestro.Base/Commands/Test/OpenUnmanagedResourceCommand.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Commands/Test/OpenUnmanagedResourceCommand.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Base/Commands/Test/OpenUnmanagedResourceCommand.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -38,7 +38,7 @@
var picker = new UnmanagedFileBrowser(conn.ResourceService);
if (picker.ShowDialog(wb) == System.Windows.Forms.DialogResult.OK)
{
- MessageService.ShowMessage(picker.SelectedFile);
+ MessageService.ShowMessage(picker.SelectedItem);
}
else
{
Added: sandbox/maestro-3.0/Maestro.Base/Commands/Test/TestCommands.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Commands/Test/TestCommands.cs (rev 0)
+++ sandbox/maestro-3.0/Maestro.Base/Commands/Test/TestCommands.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -0,0 +1,71 @@
+#region Disclaimer / License
+// Copyright (C) 2010, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+//
+#endregion
+using System;
+using System.Collections.Generic;
+using System.Text;
+using ICSharpCode.Core;
+using Maestro.Editors.Generic;
+using Maestro.Base.Services;
+using OSGeo.MapGuide.MaestroAPI;
+
+namespace Maestro.Base.Commands.Test
+{
+ internal class SaveResourceCommand : AbstractMenuCommand
+ {
+ public override void Run()
+ {
+ var wb = Workbench.Instance;
+ var exp = wb.ActiveSiteExplorer;
+ var mgr = ServiceRegistry.GetService<ServerConnectionManager>();
+ var conn = mgr.GetConnection(exp.ConnectionName);
+
+ var picker = new ResourcePicker(conn.ResourceService, ResourcePickerMode.SaveResource);
+ if (picker.ShowDialog(wb) == System.Windows.Forms.DialogResult.OK)
+ {
+ MessageService.ShowMessage(picker.ResourceID);
+ }
+ else
+ {
+ MessageService.ShowMessage("Cancelled");
+ }
+ }
+ }
+
+ internal class SaveResourceWithFilterCommand : AbstractMenuCommand
+ {
+ public override void Run()
+ {
+ var wb = Workbench.Instance;
+ var exp = wb.ActiveSiteExplorer;
+ var mgr = ServiceRegistry.GetService<ServerConnectionManager>();
+ var conn = mgr.GetConnection(exp.ConnectionName);
+
+ var picker = new ResourcePicker(conn.ResourceService, ResourceTypes.FeatureSource, ResourcePickerMode.SaveResource);
+ if (picker.ShowDialog(wb) == System.Windows.Forms.DialogResult.OK)
+ {
+ MessageService.ShowMessage(picker.ResourceID);
+ }
+ else
+ {
+ MessageService.ShowMessage("Cancelled");
+ }
+ }
+ }
+}
Modified: sandbox/maestro-3.0/Maestro.Base/Editor/EditorContentBase.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Editor/EditorContentBase.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Base/Editor/EditorContentBase.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -36,16 +36,28 @@
{
_svc = value;
_svc.DirtyStateChanged += new EventHandler(OnDirtyStateChanged);
+ _svc.Saved += new EventHandler(OnSaved);
this.Resource = _svc.GetEditedResource();
- this.Title = ResourceIdentifier.GetName(_svc.ResourceID);
- this.Description = _svc.ResourceID;
+ UpdateTitle();
+
this.CanUpgrade = _svc.IsUpgradeAvailable;
Bind(_svc);
}
}
+ void OnSaved(object sender, EventArgs e)
+ {
+ UpdateTitle();
+ }
+
+ private void UpdateTitle()
+ {
+ this.Title = this.IsNew ? Properties.Resources.NewResource : ResourceIdentifier.GetName(_svc.ResourceID);
+ this.Description = this.IsNew ? Properties.Resources.NewResource : _svc.ResourceID;
+ }
+
const string DIRTY_PREFIX = "* ";
void OnDirtyStateChanged(object sender, EventArgs e)
@@ -114,6 +126,11 @@
}
}
+ public bool IsNew
+ {
+ get { return _svc.IsNew; }
+ }
+
public virtual bool CanProfile
{
get { return false; }
Modified: sandbox/maestro-3.0/Maestro.Base/Editor/IEditorViewContent.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Editor/IEditorViewContent.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Base/Editor/IEditorViewContent.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -39,6 +39,11 @@
IResource Resource { get; }
/// <summary>
+ /// Indicates whether this current resource is a newly created resource
+ /// </summary>
+ bool IsNew { get; }
+
+ /// <summary>
/// Indicates whether this current resource can be edited with the xml editor
/// </summary>
bool CanEditAsXml { get; }
Modified: sandbox/maestro-3.0/Maestro.Base/Editor/ResourceEditorService.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Editor/ResourceEditorService.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Base/Editor/ResourceEditorService.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -123,7 +123,7 @@
public string SelectResource(OSGeo.MapGuide.MaestroAPI.ResourceTypes resType)
{
- var picker = new ResourcePicker(_conn.ResourceService, resType);
+ var picker = new ResourcePicker(_conn.ResourceService, resType, ResourcePickerMode.OpenResource);
if (picker.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
return picker.ResourceID;
@@ -133,8 +133,7 @@
public string SelectFolder()
{
- var picker = new ResourcePicker(_conn.ResourceService);
- picker.SelectFoldersOnly = true;
+ var picker = new ResourcePicker(_conn.ResourceService, ResourcePickerMode.OpenFolder);
if (picker.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
return picker.ResourceID;
@@ -155,6 +154,7 @@
this.IsDirty = false;
OnDirtyStateChanged();
+ OnSaved();
}
}
@@ -170,6 +170,7 @@
this.IsNew = false;
this.IsDirty = false;
OnDirtyStateChanged();
+ OnSaved();
}
}
@@ -298,5 +299,14 @@
{
_siteExp.RefreshModel(folderId);
}
+
+ private void OnSaved()
+ {
+ var handler = this.Saved;
+ if (handler != null)
+ handler(this, EventArgs.Empty);
+ }
+
+ public event EventHandler Saved;
}
}
Modified: sandbox/maestro-3.0/Maestro.Base/Maestro.Base.addin
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Maestro.Base.addin 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Base/Maestro.Base.addin 2010-09-30 10:10:13 UTC (rev 5221)
@@ -103,6 +103,12 @@
<MenuItem id="Menu_Test_OpenFolder"
label="Open Folder"
class="Maestro.Base.Commands.Test.OpenFolderCommand" />
+ <MenuItem id="Menu_Test_SaveResource"
+ label="Save Resource"
+ class="Maestro.Base.Commands.Test.SaveResourceCommand" />
+ <MenuItem id="Menu_Test_SaveResourceWithFilter"
+ label="Save Resource (with filter)"
+ class="Maestro.Base.Commands.Test.SaveResourceWithFilterCommand" />
<MenuItem id="Menu_Test_OpenUnmanagedFile"
label="Open Unmanaged Resource"
class="Maestro.Base.Commands.Test.OpenUnmanagedResourceCommand" />
Modified: sandbox/maestro-3.0/Maestro.Base/Maestro.Base.csproj
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Maestro.Base.csproj 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Base/Maestro.Base.csproj 2010-09-30 10:10:13 UTC (rev 5221)
@@ -81,6 +81,7 @@
<Compile Include="Commands\Test\OpenSymbolBrowserCommand.cs" />
<Compile Include="Commands\Test\OpenUnmanagedResourceCommand.cs" />
<Compile Include="Commands\Test\SelectFdoProviderCommand.cs" />
+ <Compile Include="Commands\Test\TestCommands.cs" />
<Compile Include="Commands\ValidateResourceCommand.cs" />
<Compile Include="Commands\XmlEditCommand.cs" />
<Compile Include="Editor\DrawingSourceEditor.cs">
Modified: sandbox/maestro-3.0/Maestro.Base/Properties/Resources.Designer.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Properties/Resources.Designer.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Base/Properties/Resources.Designer.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -815,6 +815,15 @@
}
/// <summary>
+ /// Looks up a localized string similar to New Resource.
+ /// </summary>
+ internal static string NewResource {
+ get {
+ return ResourceManager.GetString("NewResource", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Skipping registration of editor: {0} because an existing editor is already registered to handle {1} v{2}.
/// </summary>
internal static string OpenResourceManager_SkipEditorRegistration {
Modified: sandbox/maestro-3.0/Maestro.Base/Properties/Resources.resx
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Properties/Resources.resx 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Base/Properties/Resources.resx 2010-09-30 10:10:13 UTC (rev 5221)
@@ -670,4 +670,7 @@
<data name="ItemsCut" xml:space="preserve">
<value>{0} items cut and placed in clipboard</value>
</data>
+ <data name="NewResource" xml:space="preserve">
+ <value>New Resource</value>
+ </data>
</root>
\ No newline at end of file
Modified: sandbox/maestro-3.0/Maestro.Base/UI/NewResourceDialog.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/UI/NewResourceDialog.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Base/UI/NewResourceDialog.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -31,6 +31,10 @@
namespace Maestro.Base.UI
{
+ //FIXME: Name field is not needed. Because any new resource will be loaded into
+ //the session repository FIRST before being saved via Save As, which will
+ //ask where you want to save it.
+
public partial class NewResourceDialog : Form
{
private NewResourceDialog()
@@ -58,8 +62,7 @@
private void btnBrowse_Click(object sender, EventArgs e)
{
- var picker = new ResourcePicker(_resSvc);
- picker.SelectFoldersOnly = true;
+ var picker = new ResourcePicker(_resSvc, ResourcePickerMode.OpenFolder);
if (picker.ShowDialog() == DialogResult.OK)
{
txtParentFolder.Text = picker.ResourceID;
Modified: sandbox/maestro-3.0/Maestro.Base/UI/Packaging/CreatePackageDialog.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/UI/Packaging/CreatePackageDialog.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Base/UI/Packaging/CreatePackageDialog.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -135,9 +135,8 @@
private void BrowseResourcePath_Click(object sender, EventArgs e)
{
- using (var picker = new ResourcePicker(_conn.ResourceService))
+ using (var picker = new ResourcePicker(_conn.ResourceService, ResourcePickerMode.OpenFolder))
{
- picker.SelectFoldersOnly = true;
if (picker.ShowDialog() == DialogResult.OK)
{
this.FolderToPackage = picker.ResourceID;
@@ -195,9 +194,8 @@
private void btnBrowseRestorePath_Click(object sender, EventArgs e)
{
- using (var picker = new ResourcePicker(_conn.ResourceService))
+ using (var picker = new ResourcePicker(_conn.ResourceService, ResourcePickerMode.OpenFolder))
{
- picker.SelectFoldersOnly = true;
if (picker.ShowDialog() == DialogResult.OK)
{
this.FolderToPackage = picker.ResourceID;
Modified: sandbox/maestro-3.0/Maestro.Editors/Common/GenericItemSelectionDialog.Designer.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/Common/GenericItemSelectionDialog.Designer.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Editors/Common/GenericItemSelectionDialog.Designer.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -78,7 +78,7 @@
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
- // ItemSelectionDialog
+ // GenericItemSelectionDialog
//
this.AcceptButton = this.btnOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -90,9 +90,9 @@
this.Controls.Add(this.btnOK);
this.Controls.Add(this.lblPrompt);
this.Controls.Add(this.lstItems);
- this.Name = "ItemSelectionDialog";
+ this.Name = "GenericItemSelectionDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "ItemSelectionDialog";
+ this.Text = "Select Item";
this.ResumeLayout(false);
this.PerformLayout();
Modified: sandbox/maestro-3.0/Maestro.Editors/Common/GenericItemSelectionDialog.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/Common/GenericItemSelectionDialog.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Editors/Common/GenericItemSelectionDialog.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -50,8 +50,10 @@
public static T SelectItem<T>(string title, string prompt, T[] items, string displayMember, string valueMember) where T : class
{
var dlg = new GenericItemSelectionDialog();
- dlg.Text = title;
- dlg.lblPrompt.Text = prompt;
+ if (!string.IsNullOrEmpty(title))
+ dlg.Text = title;
+ if (!string.IsNullOrEmpty(prompt))
+ dlg.lblPrompt.Text = prompt;
dlg.lstItems.DataSource = items;
if (!string.IsNullOrEmpty(displayMember))
@@ -76,8 +78,10 @@
public static string SelectItem(string title, string prompt, string[] items)
{
var dlg = new GenericItemSelectionDialog();
- dlg.Text = title;
- dlg.lblPrompt.Text = prompt;
+ if (!string.IsNullOrEmpty(title))
+ dlg.Text = title;
+ if (!string.IsNullOrEmpty(prompt))
+ dlg.lblPrompt.Text = prompt;
dlg.lstItems.DataSource = items;
Modified: sandbox/maestro-3.0/Maestro.Editors/Common/ResourcePicker.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/Common/ResourcePicker.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Editors/Common/ResourcePicker.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -74,20 +74,52 @@
private bool _resourceMode = false;
+ public ResourcePicker(IResourceService resSvc)
+ : this(resSvc, ResourcePickerMode.OpenResource)
+ { }
+
/// <summary>
/// Constructs a new instance. Use this overload to select any resource type. If only
/// folder selection is desired, set <see cref="SelectFoldersOnly"/> to true before
/// showing the dialog
/// </summary>
/// <param name="resSvc"></param>
- public ResourcePicker(IResourceService resSvc)
+ public ResourcePicker(IResourceService resSvc, ResourcePickerMode mode)
: this()
{
_resSvc = resSvc;
trvFolders.Model = new RepositoryFolderTreeModel(_resSvc);
this.UseFilter = true;
+ this.Mode = mode;
}
+ private ResourcePickerMode _mode = ResourcePickerMode.OpenResource;
+
+ public ResourcePickerMode Mode
+ {
+ get { return _mode; }
+ private set
+ {
+ _mode = value;
+ txtResourceId.ReadOnly = true;
+ switch (_mode)
+ {
+ case ResourcePickerMode.OpenFolder:
+ {
+ this.Text = Properties.Resources.SelectFolder;
+ this.SelectFoldersOnly = true;
+ }
+ break;
+ case ResourcePickerMode.SaveResource:
+ {
+ this.Text = Properties.Resources.SaveResource;
+ txtResourceId.ReadOnly = false;
+ }
+ break;
+ }
+ }
+ }
+
/// <summary>
/// Constructs a new instance. Use this overload to select only resources of a specific type.
/// You cannot select folders in this mode. Attempting to set <see cref="SelectFoldersOnly"/> to
@@ -95,9 +127,12 @@
/// </summary>
/// <param name="resSvc"></param>
/// <param name="resFilter"></param>
- public ResourcePicker(IResourceService resSvc, ResourceTypes resFilter)
- : this(resSvc)
+ public ResourcePicker(IResourceService resSvc, ResourceTypes resFilter, ResourcePickerMode mode)
+ : this(resSvc, mode)
{
+ if (mode == ResourcePickerMode.OpenFolder)
+ throw new InvalidOperationException(string.Format(Properties.Resources.ModeNotAllowed, mode));
+
this.Filter = resFilter;
this.UseFilter = true;
@@ -140,7 +175,7 @@
/// Gets or sets whether to select folders only. If true, the document view is disabled and
/// <see cref="UseFilter"/> is set to false
/// </summary>
- public bool SelectFoldersOnly
+ private bool SelectFoldersOnly
{
get { return splitContainer1.Panel2Collapsed; }
set
@@ -170,6 +205,30 @@
private void btnOK_Click(object sender, EventArgs e)
{
+ if (_mode == ResourcePickerMode.SaveResource)
+ {
+ if (ResourceIdentifier.IsFolderResource(txtResourceId.Text))
+ {
+ MessageBox.Show(Properties.Resources.InvalidResourceIdFolder);
+ return;
+ }
+ else
+ {
+ if (!ResourceIdentifier.Validate(txtResourceId.Text))
+ {
+ MessageBox.Show(Properties.Resources.InvalidResourceId);
+ return;
+ }
+ else
+ {
+ if (ResourceIdentifier.GetResourceType(txtResourceId.Text) != (ResourceTypes)cmbResourceFilter.SelectedItem)
+ {
+ MessageBox.Show(Properties.Resources.InvalidResourceIdNotSpecifiedType);
+ return;
+ }
+ }
+ }
+ }
this.DialogResult = DialogResult.OK;
}
@@ -180,7 +239,8 @@
{
RepositoryFolder folder = node.Tag as RepositoryFolder;
btnOK.Enabled = false;
- if (this.SelectFoldersOnly)
+
+ if (this.SelectFoldersOnly || _mode == ResourcePickerMode.SaveResource)
{
txtResourceId.Text = folder.ResourceId;
btnOK.Enabled = true;
@@ -299,6 +359,13 @@
}
}
+ public enum ResourcePickerMode
+ {
+ OpenResource,
+ SaveResource,
+ OpenFolder
+ }
+
internal class RepositoryFolder
{
private IRepositoryItem _item;
Modified: sandbox/maestro-3.0/Maestro.Editors/Common/ResourcePicker.resx
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/Common/ResourcePicker.resx 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Editors/Common/ResourcePicker.resx 2010-09-30 10:10:13 UTC (rev 5221)
@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADQ
- EQAAAk1TRnQBSQFMAgEBCQEAAWgBAAFoAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+ EQAAAk1TRnQBSQFMAgEBCQEAAXABAAFwAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAATADAAEBAQABCAYAAQwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
Modified: sandbox/maestro-3.0/Maestro.Editors/Common/UnmanagedFileBrowser.Designer.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/Common/UnmanagedFileBrowser.Designer.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Editors/Common/UnmanagedFileBrowser.Designer.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -36,12 +36,12 @@
this.NODE_ICON = new Aga.Controls.Tree.NodeControls.NodeIcon();
this.NODE_NAME = new Aga.Controls.Tree.NodeControls.NodeTextBox();
this.lstResources = new System.Windows.Forms.ListView();
+ this.imgFileList = new System.Windows.Forms.ImageList(this.components);
this.label4 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
- this.txtFile = new System.Windows.Forms.TextBox();
+ this.txtItem = new System.Windows.Forms.TextBox();
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
- this.imgFileList = new System.Windows.Forms.ImageList(this.components);
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
@@ -129,6 +129,26 @@
this.lstResources.View = System.Windows.Forms.View.List;
this.lstResources.SelectedIndexChanged += new System.EventHandler(this.lstResources_SelectedIndexChanged);
//
+ // imgFileList
+ //
+ this.imgFileList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imgFileList.ImageStream")));
+ this.imgFileList.TransparentColor = System.Drawing.Color.Transparent;
+ this.imgFileList.Images.SetKeyName(0, "document.png");
+ this.imgFileList.Images.SetKeyName(1, "application.png");
+ this.imgFileList.Images.SetKeyName(2, "document-word.png");
+ this.imgFileList.Images.SetKeyName(3, "document-access.png");
+ this.imgFileList.Images.SetKeyName(4, "document-excel.png");
+ this.imgFileList.Images.SetKeyName(5, "document-excel-csv.png");
+ this.imgFileList.Images.SetKeyName(6, "document-film.png");
+ this.imgFileList.Images.SetKeyName(7, "document-globe.png");
+ this.imgFileList.Images.SetKeyName(8, "document-image.png");
+ this.imgFileList.Images.SetKeyName(9, "document-pdf.png");
+ this.imgFileList.Images.SetKeyName(10, "document-php.png");
+ this.imgFileList.Images.SetKeyName(11, "document-powerpoint.png");
+ this.imgFileList.Images.SetKeyName(12, "document-text.png");
+ this.imgFileList.Images.SetKeyName(13, "document-zipper.png");
+ this.imgFileList.Images.SetKeyName(14, "document-code.png");
+ //
// label4
//
this.label4.AutoSize = true;
@@ -144,20 +164,20 @@
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(9, 283);
this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(68, 13);
+ this.label1.Size = new System.Drawing.Size(72, 13);
this.label1.TabIndex = 12;
- this.label1.Text = "Selected File";
+ this.label1.Text = "Selected Item";
//
- // txtFile
+ // txtItem
//
- this.txtFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ this.txtItem.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.txtFile.Location = new System.Drawing.Point(83, 280);
- this.txtFile.Name = "txtFile";
- this.txtFile.ReadOnly = true;
- this.txtFile.Size = new System.Drawing.Size(512, 20);
- this.txtFile.TabIndex = 13;
- this.txtFile.TextChanged += new System.EventHandler(this.txtFile_TextChanged);
+ this.txtItem.Location = new System.Drawing.Point(87, 280);
+ this.txtItem.Name = "txtItem";
+ this.txtItem.ReadOnly = true;
+ this.txtItem.Size = new System.Drawing.Size(508, 20);
+ this.txtItem.TabIndex = 13;
+ this.txtItem.TextChanged += new System.EventHandler(this.txtFile_TextChanged);
//
// btnOK
//
@@ -182,26 +202,6 @@
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
//
- // imgFileList
- //
- this.imgFileList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imgFileList.ImageStream")));
- this.imgFileList.TransparentColor = System.Drawing.Color.Transparent;
- this.imgFileList.Images.SetKeyName(0, "document.png");
- this.imgFileList.Images.SetKeyName(1, "application.png");
- this.imgFileList.Images.SetKeyName(2, "document-word.png");
- this.imgFileList.Images.SetKeyName(3, "document-access.png");
- this.imgFileList.Images.SetKeyName(4, "document-excel.png");
- this.imgFileList.Images.SetKeyName(5, "document-excel-csv.png");
- this.imgFileList.Images.SetKeyName(6, "document-film.png");
- this.imgFileList.Images.SetKeyName(7, "document-globe.png");
- this.imgFileList.Images.SetKeyName(8, "document-image.png");
- this.imgFileList.Images.SetKeyName(9, "document-pdf.png");
- this.imgFileList.Images.SetKeyName(10, "document-php.png");
- this.imgFileList.Images.SetKeyName(11, "document-powerpoint.png");
- this.imgFileList.Images.SetKeyName(12, "document-text.png");
- this.imgFileList.Images.SetKeyName(13, "document-zipper.png");
- this.imgFileList.Images.SetKeyName(14, "document-code.png");
- //
// UnmanagedFileBrowser
//
this.AcceptButton = this.btnOK;
@@ -212,7 +212,7 @@
this.ControlBox = false;
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
- this.Controls.Add(this.txtFile);
+ this.Controls.Add(this.txtItem);
this.Controls.Add(this.label1);
this.Controls.Add(this.splitContainer1);
this.Name = "UnmanagedFileBrowser";
@@ -236,7 +236,7 @@
private System.Windows.Forms.ListView lstResources;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label1;
- private System.Windows.Forms.TextBox txtFile;
+ private System.Windows.Forms.TextBox txtItem;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private Aga.Controls.Tree.NodeControls.NodeIcon NODE_ICON;
Modified: sandbox/maestro-3.0/Maestro.Editors/Common/UnmanagedFileBrowser.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/Common/UnmanagedFileBrowser.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Editors/Common/UnmanagedFileBrowser.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -120,7 +120,18 @@
public event EventHandler<TreePathEventArgs> StructureChanged;
}
+ private bool _selectFoldersOnly;
+ public bool SelectFoldersOnly
+ {
+ get { return _selectFoldersOnly; }
+ set
+ {
+ _selectFoldersOnly = value;
+ splitContainer1.Panel2Collapsed = value;
+ }
+ }
+
private UnmanagedFileBrowser()
{
InitializeComponent();
@@ -135,9 +146,15 @@
trvFolders.Model = new FolderTreeModel(_resSvc);
}
- public string SelectedFile
+ public string SelectedItem
{
- get { return txtFile.Text; }
+ get
+ {
+ var path = txtItem.Text;
+ var leftpart = path.Substring(0, path.IndexOf("]"));
+ var rightpart = path.Substring(path.IndexOf("]") + 1);
+ return "%MG_DATA_PATH_ALIAS" + leftpart + "]%" + rightpart;
+ }
}
private void trvFolders_SelectionChanged(object sender, EventArgs e)
@@ -147,9 +164,17 @@
var mdl = trvFolders.SelectedNode.Tag as FolderModel;
if (mdl != null)
{
- //TODO: file filter
- var list = _resSvc.EnumerateUnmanagedData(mdl.Tag.UnmanagedDataId, null, false, OSGeo.MapGuide.MaestroAPI.UnmanagedDataTypes.Files);
- PopulateFileList(list);
+ if (this.SelectFoldersOnly)
+ {
+ txtItem.Text = mdl.Name;
+ return;
+ }
+ else
+ {
+ //TODO: file filter
+ var list = _resSvc.EnumerateUnmanagedData(mdl.Tag.UnmanagedDataId, null, false, OSGeo.MapGuide.MaestroAPI.UnmanagedDataTypes.Files);
+ PopulateFileList(list);
+ }
}
}
}
@@ -252,13 +277,13 @@
{
if (lstResources.SelectedItems.Count == 1)
{
- txtFile.Text = lstResources.SelectedItems[0].Name;
+ txtItem.Text = lstResources.SelectedItems[0].Name;
}
}
private void txtFile_TextChanged(object sender, EventArgs e)
{
- btnOK.Enabled = !string.IsNullOrEmpty(txtFile.Text);
+ btnOK.Enabled = !string.IsNullOrEmpty(txtItem.Text);
}
private void btnOK_Click(object sender, EventArgs e)
Modified: sandbox/maestro-3.0/Maestro.Editors/Common/UnmanagedFileBrowser.resx
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/Common/UnmanagedFileBrowser.resx 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Editors/Common/UnmanagedFileBrowser.resx 2010-09-30 10:10:13 UTC (rev 5221)
@@ -124,8 +124,8 @@
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
- ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADg
- GAAAAk1TRnQBSQFMAgEBDwEAARMBAAEEAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+ ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACI
+ GAAAAk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BwAEDAcABAwEAAQMBAAED
+ AcABAwHAAQMBwAEHAcABBwHAAQcBwAEHAcABDwHAAQ8BwAEPAcABDwIAAv8MAAHAAQMCAAHAAQMBwAED
+ AcABAwIAAcABAwHAAQMBwAEDAgABwAEDAcABAwHAAQMDAAEDAQABAwHAAQMDAAEDAQABAwHAAQMDAAED
+ AQABAwHAAQMDAAEDAQABAwHAAQMDAAEDAQABAwHAAQMDAAEDAQABAwHAAQMDAAEDAQABAwHAAQMDAAED
+ AQABAwHAAQMDAAEDAQABAwHAAQcCAAHAAQcBwAEHAcABDwL/AcABDwHAAQ8L
</value>
</data>
</root>
\ No newline at end of file
Modified: sandbox/maestro-3.0/Maestro.Editors/FeatureSource/ExtensionsCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FeatureSource/ExtensionsCtrl.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Editors/FeatureSource/ExtensionsCtrl.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -30,6 +30,7 @@
using OSGeo.MapGuide.MaestroAPI;
using OSGeo.MapGuide.MaestroAPI.ObjectModels;
using Maestro.Editors.Common;
+using System.Diagnostics;
namespace Maestro.Editors.FeatureSource
{
@@ -52,8 +53,8 @@
public override void Bind(IEditorService service)
{
_edSvc = service;
+ _edSvc.Saved += OnResourceSaved;
_fs = (FeatureSourceType)_edSvc.GetEditedResource();
- _cachedSchema = _fs.Describe();
//Build tree
if (_fs.Extension != null)
@@ -63,7 +64,7 @@
TreeNode node = new TreeNode();
node.Tag = ext;
node.ImageIndex = node.SelectedImageIndex = IDX_EXTENSION;
-
+
node.Text = ext.Name;
node.ToolTipText = string.Format(Properties.Resources.ExtendedClassTooltip, ext.FeatureClass);
@@ -133,8 +134,26 @@
}
}
+ protected override void UnsubscribeEventHandlers()
+ {
+ base.UnsubscribeEventHandlers();
+ _edSvc.Saved -= OnResourceSaved;
+ }
+
+ void OnResourceSaved(object sender, EventArgs e)
+ {
+ Debug.Assert(!_edSvc.IsNew);
+ _cachedSchema = _fs.Describe();
+ }
+
private void btnNewExtension_Click(object sender, EventArgs e)
{
+ if (_edSvc.IsNew)
+ {
+ MessageBox.Show(Properties.Resources.SaveResourceFirst);
+ return;
+ }
+
if (_fs.Extension == null)
{
_fs.Extension = new BindingList<FeatureSourceTypeExtension>();
@@ -164,6 +183,12 @@
private void btnNewCalculation_Click(object sender, EventArgs e)
{
+ if (_edSvc.IsNew)
+ {
+ MessageBox.Show(Properties.Resources.SaveResourceFirst);
+ return;
+ }
+
var node = trvExtensions.SelectedNode;
if (node != null)
{
@@ -201,6 +226,12 @@
private void btnNewJoin_Click(object sender, EventArgs e)
{
+ if (_edSvc.IsNew)
+ {
+ MessageBox.Show(Properties.Resources.SaveResourceFirst);
+ return;
+ }
+
var node = trvExtensions.SelectedNode;
if (node != null)
{
@@ -286,6 +317,11 @@
private void trvExtensions_AfterSelect(object sender, TreeViewEventArgs e)
{
+ if (_edSvc.IsNew)
+ {
+ return;
+ }
+
var ext = e.Node.Tag as FeatureSourceTypeExtension;
var join = e.Node.Tag as AttributeRelateType;
var calc = e.Node.Tag as CalculatedPropertyType;
Modified: sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/GenericCtrl.Designer.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/GenericCtrl.Designer.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/GenericCtrl.Designer.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -28,6 +28,7 @@
/// </summary>
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
this.label1 = new System.Windows.Forms.Label();
this.txtProvider = new System.Windows.Forms.TextBox();
this.grdConnectionParameters = new System.Windows.Forms.DataGridView();
@@ -39,8 +40,17 @@
this.btnTest = new System.Windows.Forms.Button();
this.txtTestResult = new System.Windows.Forms.TextBox();
this.resDataCtrl = new Maestro.Editors.Common.ResourceDataCtrl();
+ this.ctxEnumerable = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.pickAValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.ctxProperty = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.pickAnAliasedFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.pickAnAliasedDirectoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.mGDATAFILEPATHToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.pickADataStoreFromListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.contentPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.grdConnectionParameters)).BeginInit();
+ this.ctxEnumerable.SuspendLayout();
+ this.ctxProperty.SuspendLayout();
this.SuspendLayout();
//
// contentPanel
@@ -89,6 +99,8 @@
this.grdConnectionParameters.RowHeadersVisible = false;
this.grdConnectionParameters.Size = new System.Drawing.Size(654, 85);
this.grdConnectionParameters.TabIndex = 2;
+ this.grdConnectionParameters.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.grdConnectionParameters_CellValueChanged);
+ this.grdConnectionParameters.MouseClick += new System.Windows.Forms.MouseEventHandler(this.grdConnectionParameters_MouseClick);
this.grdConnectionParameters.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.grdConnectionParameters_CellPainting);
this.grdConnectionParameters.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.grdConnectionParameters_EditingControlShowing);
//
@@ -176,6 +188,58 @@
this.resDataCtrl.Size = new System.Drawing.Size(654, 102);
this.resDataCtrl.TabIndex = 5;
//
+ // ctxEnumerable
+ //
+ this.ctxEnumerable.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.pickAValueToolStripMenuItem,
+ this.pickADataStoreFromListToolStripMenuItem});
+ this.ctxEnumerable.Name = "ctxEnumerable";
+ this.ctxEnumerable.Size = new System.Drawing.Size(208, 70);
+ //
+ // pickAValueToolStripMenuItem
+ //
+ this.pickAValueToolStripMenuItem.Name = "pickAValueToolStripMenuItem";
+ this.pickAValueToolStripMenuItem.Size = new System.Drawing.Size(207, 22);
+ this.pickAValueToolStripMenuItem.Text = "Pick a value from list";
+ this.pickAValueToolStripMenuItem.Click += new System.EventHandler(this.pickAValueToolStripMenuItem_Click);
+ //
+ // ctxProperty
+ //
+ this.ctxProperty.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.pickAnAliasedFileToolStripMenuItem,
+ this.pickAnAliasedDirectoryToolStripMenuItem,
+ this.mGDATAFILEPATHToolStripMenuItem});
+ this.ctxProperty.Name = "ctxProperty";
+ this.ctxProperty.Size = new System.Drawing.Size(221, 70);
+ //
+ // pickAnAliasedFileToolStripMenuItem
+ //
+ this.pickAnAliasedFileToolStripMenuItem.Name = "pickAnAliasedFileToolStripMenuItem";
+ this.pickAnAliasedFileToolStripMenuItem.Size = new System.Drawing.Size(220, 22);
+ this.pickAnAliasedFileToolStripMenuItem.Text = "Pick an aliased file";
+ this.pickAnAliasedFileToolStripMenuItem.Click += new System.EventHandler(this.pickAnAliasedFileToolStripMenuItem_Click);
+ //
+ // pickAnAliasedDirectoryToolStripMenuItem
+ //
+ this.pickAnAliasedDirectoryToolStripMenuItem.Name = "pickAnAliasedDirectoryToolStripMenuItem";
+ this.pickAnAliasedDirectoryToolStripMenuItem.Size = new System.Drawing.Size(220, 22);
+ this.pickAnAliasedDirectoryToolStripMenuItem.Text = "Pick an aliased directory";
+ this.pickAnAliasedDirectoryToolStripMenuItem.Click += new System.EventHandler(this.pickAnAliasedDirectoryToolStripMenuItem_Click);
+ //
+ // mGDATAFILEPATHToolStripMenuItem
+ //
+ this.mGDATAFILEPATHToolStripMenuItem.Name = "mGDATAFILEPATHToolStripMenuItem";
+ this.mGDATAFILEPATHToolStripMenuItem.Size = new System.Drawing.Size(220, 22);
+ this.mGDATAFILEPATHToolStripMenuItem.Text = "Use active resource data file";
+ this.mGDATAFILEPATHToolStripMenuItem.Click += new System.EventHandler(this.useActiveResourceDataFile_Click);
+ //
+ // pickADataStoreFromListToolStripMenuItem
+ //
+ this.pickADataStoreFromListToolStripMenuItem.Name = "pickADataStoreFromListToolStripMenuItem";
+ this.pickADataStoreFromListToolStripMenuItem.Size = new System.Drawing.Size(207, 22);
+ this.pickADataStoreFromListToolStripMenuItem.Text = "Pick a data store from list";
+ this.pickADataStoreFromListToolStripMenuItem.Click += new System.EventHandler(this.pickADataStoreFromListToolStripMenuItem_Click);
+ //
// GenericCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -183,9 +247,12 @@
this.HeaderText = "Feature Source (using Generic Editor)";
this.Name = "GenericCtrl";
this.Size = new System.Drawing.Size(683, 399);
+ this.Controls.SetChildIndex(this.contentPanel, 0);
this.contentPanel.ResumeLayout(false);
this.contentPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.grdConnectionParameters)).EndInit();
+ this.ctxEnumerable.ResumeLayout(false);
+ this.ctxProperty.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -203,5 +270,12 @@
private System.Windows.Forms.Button btnTest;
private System.Windows.Forms.ComboBox cmbLongTransaction;
private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.ContextMenuStrip ctxEnumerable;
+ private System.Windows.Forms.ContextMenuStrip ctxProperty;
+ private System.Windows.Forms.ToolStripMenuItem pickAValueToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem pickAnAliasedFileToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem pickAnAliasedDirectoryToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem mGDATAFILEPATHToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem pickADataStoreFromListToolStripMenuItem;
}
}
Modified: sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/GenericCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/GenericCtrl.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/GenericCtrl.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -46,45 +46,29 @@
public override void Bind(IEditorService service)
{
_service = service;
+ _service.RegisterCustomNotifier(this);
_fs = _service.GetEditedResource() as FeatureSourceType;
txtProvider.Text = _fs.Provider;
Debug.Assert(_fs != null);
resDataCtrl.DataListChanged += (sender, e) => { OnResourceChanged(); };
+ resDataCtrl.Init(service);
InitGrid();
- InitEnumerableProperties();
}
- private void InitEnumerableProperties()
- {
- string provider = txtProvider.Text;
- string ps = GetPartialConnectionString();
-
- foreach (var cell in _enumCells)
- {
- string[] values = _service.FeatureService.GetConnectionPropertyValues(provider, cell.Key, ps);
- var val = _fs.GetConnectionProperty(cell.Key);
-
- cell.Value.DataSource = values;
- if (Array.IndexOf(values, val) >= 0)
- cell.Value.Value = val;
- }
- }
-
private string GetPartialConnectionString()
{
- List<string> values = new List<string>();
+ var builder = new System.Data.Common.DbConnectionStringBuilder();
foreach (DataGridViewRow row in grdConnectionParameters.Rows)
{
if (row.Cells[0].Value != null && row.Cells[1].Value != null)
{
- values.Add(string.Format("{0}={1}",
- row.Cells[0].Value,
- row.Cells[1].Value));
+ if (!string.IsNullOrEmpty(row.Cells[1].Value.ToString()))
+ builder[row.Cells[0].Value.ToString()] = row.Cells[1].Value;
}
}
- return string.Join(";", values.ToArray());
+ return builder.ToString();
}
private Dictionary<string, DataGridViewComboBoxCell> _enumCells = new Dictionary<string, DataGridViewComboBoxCell>();
@@ -117,14 +101,14 @@
DataGridViewCell valueCell = null;
if (p.Enumerable)
{
- var cell = new DataGridViewComboBoxCell();
- cell.DataSource = p.Value;
- valueCell = cell;
- _enumCells.Add(p.Name, cell);
+ valueCell = new DataGridViewTextBoxCell();
+ valueCell.Tag = p;
+ valueCell.Value = _fs.GetConnectionProperty(p.Name);
}
else
{
valueCell = new DataGridViewTextBoxCell();
+ valueCell.Tag = p;
valueCell.Value = _fs.GetConnectionProperty(p.Name);
}
@@ -196,9 +180,13 @@
{
txtTestResult.Text = string.Empty;
- string msg = _service.FeatureService.TestConnection(
- txtProvider.Text,
- GetConnectionParameters());
+ var param = GetConnectionParameters();
+ foreach (var key in param.AllKeys)
+ {
+ _fs.SetConnectionProperty(key, param[key]);
+ }
+ _service.ResourceService.SaveResource(_fs);
+ string msg = _service.FeatureService.TestConnection(_fs.ResourceID);
if (string.IsNullOrEmpty(msg))
msg = Properties.Resources.TestConnectionNoErrors;
@@ -210,5 +198,174 @@
{
}
+
+ private void pickAValueToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ if (grdConnectionParameters.SelectedCells.Count != 1)
+ return;
+
+ var cell = grdConnectionParameters.SelectedCells[0];
+ List<string> values = new List<string>();
+ try
+ {
+ var prop = grdConnectionParameters.Rows[cell.RowIndex].Cells[0].Value.ToString();
+
+ var p = cell.Tag as OSGeo.MapGuide.ObjectModels.Common.FeatureProviderRegistryFeatureProviderConnectionProperty;
+ if (p != null)
+ {
+ if (p.Enumerable && p.Value.Count > 0)
+ {
+ values.AddRange(p.Value);
+ }
+ else
+ {
+ values.AddRange(_service.FeatureService.GetConnectionPropertyValues(txtProvider.Text, prop, GetPartialConnectionString()));
+ }
+ }
+ }
+ catch
+ {
+ }
+
+ if (values.Count > 0)
+ {
+ var selected = GenericItemSelectionDialog.SelectItem(null, null, values.ToArray());
+ if (!string.IsNullOrEmpty(selected))
+ {
+ cell.Value = selected;
+ }
+ }
+ else
+ {
+ MessageBox.Show(Properties.Resources.PropEnumNoValues);
+ }
+ }
+
+ private void pickADataStoreFromListToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ if (grdConnectionParameters.SelectedCells.Count != 1)
+ return;
+
+ var cell = grdConnectionParameters.SelectedCells[0];
+ var values = new List<string>();
+ try
+ {
+ var prop = grdConnectionParameters.Rows[cell.RowIndex].Cells[0].Value.ToString();
+
+ var p = cell.Tag as OSGeo.MapGuide.ObjectModels.Common.FeatureProviderRegistryFeatureProviderConnectionProperty;
+ if (p != null && p.Enumerable)
+ {
+ var list = _service.FeatureService.EnumerateDataStores(txtProvider.Text, GetPartialConnectionString());
+ foreach(var ds in list.DataStore)
+ {
+ values.Add(ds.Name);
+ }
+ }
+ }
+ catch { }
+
+ if (values.Count > 0)
+ {
+ var selected = GenericItemSelectionDialog.SelectItem(null, null, values.ToArray());
+ if (!string.IsNullOrEmpty(selected))
+ {
+ cell.Value = selected;
+ }
+ }
+ else
+ {
+ MessageBox.Show(Properties.Resources.PropEnumNoValues);
+ }
+ }
+
+ private void grdConnectionParameters_MouseClick(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Right)
+ {
+ var ht = grdConnectionParameters.HitTest(e.X, e.Y);
+ if (ht.ColumnIndex >= 0 && ht.RowIndex >= 0)
+ {
+ var cell = grdConnectionParameters[ht.ColumnIndex, ht.RowIndex];
+ //Right clicked a "Value" cell
+ if (cell != null && ht.ColumnIndex == 1)
+ {
+ grdConnectionParameters.ClearSelection();
+ cell.Selected = true;
+
+ var pt = grdConnectionParameters.PointToScreen(new Point(e.X, e.Y));
+
+ var p = cell.Tag as OSGeo.MapGuide.ObjectModels.Common.FeatureProviderRegistryFeatureProviderConnectionProperty;
+ if (p.Enumerable)
+ ctxEnumerable.Show(pt.X, pt.Y);
+ else
+ ctxProperty.Show(pt.X, pt.Y);
+ }
+ }
+ }
+ }
+
+ private void pickAnAliasedFileToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ if (grdConnectionParameters.SelectedCells.Count != 1)
+ return;
+
+ var cell = grdConnectionParameters.SelectedCells[0];
+
+ using (var dlg = new UnmanagedFileBrowser(_service.ResourceService))
+ {
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ cell.Value = dlg.SelectedItem;
+ }
+ }
+ }
+
+ private void pickAnAliasedDirectoryToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ if (grdConnectionParameters.SelectedCells.Count != 1)
+ return;
+
+ var cell = grdConnectionParameters.SelectedCells[0];
+
+ using (var dlg = new UnmanagedFileBrowser(_service.ResourceService))
+ {
+ dlg.SelectFoldersOnly = true;
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ var value = dlg.SelectedItem;
+ cell.Value = value;
+ }
+ }
+ }
+
+ private void useActiveResourceDataFile_Click(object sender, EventArgs e)
+ {
+ if (grdConnectionParameters.SelectedCells.Count != 1)
+ return;
+
+ var cell = grdConnectionParameters.SelectedCells[0];
+
+ var file = resDataCtrl.MarkedFile;
+ if (!string.IsNullOrEmpty(file))
+ {
+ var value = "%MG_DATA_FILE_PATH%" + file;
+ cell.Value = value;
+ }
+ else
+ {
+ MessageBox.Show(Properties.Resources.NoActiveDataFile);
+ }
+ }
+
+ private void grdConnectionParameters_CellValueChanged(object sender, DataGridViewCellEventArgs e)
+ {
+ //Only care about changes in "Value" cells
+ if (e.ColumnIndex == 1)
+ {
+ var name = grdConnectionParameters[0, e.RowIndex].Value.ToString();
+ var value = grdConnectionParameters[e.ColumnIndex, e.RowIndex].Value;
+ _fs.SetConnectionProperty(name, value == null ? string.Empty : value.ToString());
+ }
+ }
}
}
Modified: sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/GenericCtrl.resx
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/GenericCtrl.resx 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/GenericCtrl.resx 2010-09-30 10:10:13 UTC (rev 5221)
@@ -117,4 +117,10 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
+ <metadata name="ctxEnumerable.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+ <metadata name="ctxProperty.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>149, 17</value>
+ </metadata>
</root>
\ No newline at end of file
Modified: sandbox/maestro-3.0/Maestro.Editors/IEditorService.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/IEditorService.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Editors/IEditorService.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -194,5 +194,10 @@
/// </summary>
/// <param name="folderId"></param>
void RequestRefresh(string folderId);
+
+ /// <summary>
+ /// Raised when the edited resource is saved
+ /// </summary>
+ event EventHandler Saved;
}
}
Modified: sandbox/maestro-3.0/Maestro.Editors/LayerDefinition/Vector/VectorLayerSettingsSectionCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/LayerDefinition/Vector/VectorLayerSettingsSectionCtrl.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Editors/LayerDefinition/Vector/VectorLayerSettingsSectionCtrl.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -119,7 +119,7 @@
private void btnBrowseFeatureSource_Click(object sender, EventArgs e)
{
- var picker = new ResourcePicker(_edsvc.ResourceService, ResourceTypes.FeatureSource);
+ var picker = new ResourcePicker(_edsvc.ResourceService, ResourceTypes.FeatureSource, ResourcePickerMode.OpenResource);
if (picker.ShowDialog() == DialogResult.OK)
{
txtFeatureSource.Text = picker.ResourceID;
Modified: sandbox/maestro-3.0/Maestro.Editors/Properties/Resources.Designer.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/Properties/Resources.Designer.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Editors/Properties/Resources.Designer.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -1294,6 +1294,33 @@
}
/// <summary>
+ /// Looks up a localized string similar to Not a valid resource identifier.
+ /// </summary>
+ internal static string InvalidResourceId {
+ get {
+ return ResourceManager.GetString("InvalidResourceId", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Must be valid resource id. Cannot be a folder.
+ /// </summary>
+ internal static string InvalidResourceIdFolder {
+ get {
+ return ResourceManager.GetString("InvalidResourceIdFolder", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Invalid Resource Identifier. Not the specified type.
+ /// </summary>
+ internal static string InvalidResourceIdNotSpecifiedType {
+ get {
+ return ResourceManager.GetString("InvalidResourceIdNotSpecifiedType", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to An error occured while validating the restore path: {0}\nIt should have the format: \"Libray://folder/folder/\"..
/// </summary>
internal static string InvalidRestorePathError {
@@ -1413,6 +1440,15 @@
}
/// <summary>
+ /// Looks up a localized string similar to Mode not allowed: {0}.
+ /// </summary>
+ internal static string ModeNotAllowed {
+ get {
+ return ResourceManager.GetString("ModeNotAllowed", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to More colors....
/// </summary>
internal static string MoreColorsName {
@@ -1440,6 +1476,15 @@
}
/// <summary>
+ /// Looks up a localized string similar to No active resource data file selected.
+ /// </summary>
+ internal static string NoActiveDataFile {
+ get {
+ return ResourceManager.GetString("NoActiveDataFile", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to No values found in selected column.
/// </summary>
internal static string NoColumnValuesError {
@@ -1547,6 +1592,15 @@
}
}
+ /// <summary>
+ /// Looks up a localized string similar to Could not find possible values for enumerable property.
+ /// </summary>
+ internal static string PropEnumNoValues {
+ get {
+ return ResourceManager.GetString("PropEnumNoValues", resourceCulture);
+ }
+ }
+
internal static System.Drawing.Bitmap property {
get {
object obj = ResourceManager.GetObject("property", resourceCulture);
@@ -1599,6 +1653,24 @@
}
}
+ /// <summary>
+ /// Looks up a localized string similar to Save Resource.
+ /// </summary>
+ internal static string SaveResource {
+ get {
+ return ResourceManager.GetString("SaveResource", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Please save this resource first.
+ /// </summary>
+ internal static string SaveResourceFirst {
+ get {
+ return ResourceManager.GetString("SaveResourceFirst", resourceCulture);
+ }
+ }
+
internal static System.Drawing.Bitmap scissors_blue {
get {
object obj = ResourceManager.GetObject("scissors-blue", resourceCulture);
@@ -1632,6 +1704,15 @@
}
/// <summary>
+ /// Looks up a localized string similar to Select Folder.
+ /// </summary>
+ internal static string SelectFolder {
+ get {
+ return ResourceManager.GetString("SelectFolder", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Select the package file to edit.
/// </summary>
internal static string SelectPackageFile {
Modified: sandbox/maestro-3.0/Maestro.Editors/Properties/Resources.resx
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/Properties/Resources.resx 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/Maestro.Editors/Properties/Resources.resx 2010-09-30 10:10:13 UTC (rev 5221)
@@ -870,4 +870,31 @@
<value>An error occured while validating the output file path: {0}</value>
<comment>A message that is displayed to the user when the output path is invalid</comment>
</data>
+ <data name="SaveResourceFirst" xml:space="preserve">
+ <value>Please save this resource first</value>
+ </data>
+ <data name="PropEnumNoValues" xml:space="preserve">
+ <value>Could not find possible values for enumerable property</value>
+ </data>
+ <data name="NoActiveDataFile" xml:space="preserve">
+ <value>No active resource data file selected</value>
+ </data>
+ <data name="SaveResource" xml:space="preserve">
+ <value>Save Resource</value>
+ </data>
+ <data name="SelectFolder" xml:space="preserve">
+ <value>Select Folder</value>
+ </data>
+ <data name="ModeNotAllowed" xml:space="preserve">
+ <value>Mode not allowed: {0}</value>
+ </data>
+ <data name="InvalidResourceId" xml:space="preserve">
+ <value>Not a valid resource identifier</value>
+ </data>
+ <data name="InvalidResourceIdFolder" xml:space="preserve">
+ <value>Must be valid resource id. Cannot be a folder</value>
+ </data>
+ <data name="InvalidResourceIdNotSpecifiedType" xml:space="preserve">
+ <value>Invalid Resource Identifier. Not the specified type</value>
+ </data>
</root>
\ No newline at end of file
Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ServerConnectionBase.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ServerConnectionBase.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ServerConnectionBase.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -1639,5 +1639,7 @@
if (handler != null)
handler(this, new RequestEventArgs(data));
}
+
+ public abstract OSGeo.MapGuide.ObjectModels.Common.DataStoreList EnumerateDataStores(string providerName, string partialConnString);
}
}
Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Services/IFeatureService.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Services/IFeatureService.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Services/IFeatureService.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -101,5 +101,13 @@
/// <param name="classname">The classname of the feature, including schema</param>
/// <returns>A string array with the found identities</returns>
string[] GetIdentityProperties(string resourceID, string classname);
+
+ /// <summary>
+ /// Enumerates all the data stores and if they are FDO enabled for the specified provider and partial connection string
+ /// </summary>
+ /// <param name="providerName"></param>
+ /// <param name="partialConnString"></param>
+ /// <returns></returns>
+ OSGeo.MapGuide.ObjectModels.Common.DataStoreList EnumerateDataStores(string providerName, string partialConnString);
}
}
Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI.Http/HttpServerConnection.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI.Http/HttpServerConnection.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI.Http/HttpServerConnection.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -1242,8 +1242,8 @@
try
{
var httpreq = HttpWebRequest.Create(req);
- var httpresp = httpreq.GetResponse();
-
+ var httpresp = (HttpWebResponse)httpreq.GetResponse();
+ OnRequestDispatched(string.Format("{0:d} {1} {2} {3}", httpresp.StatusCode, httpresp.StatusDescription, httpresp.Method, httpresp.ResponseUri));
using (var st = httpresp.GetResponseStream())
{
using (var ms = new MemoryStream())
@@ -1724,6 +1724,16 @@
return this.OpenRead(req);
}
+ public override DataStoreList EnumerateDataStores(string providerName, string partialConnString)
+ {
+ string req = m_reqBuilder.EnumerateDataStores(providerName, partialConnString);
+ using (System.IO.Stream s = this.OpenRead(req))
+ {
+ var list = this.DeserializeObject<OSGeo.MapGuide.ObjectModels.Common.DataStoreList>(s);
+ return list;
+ }
+ }
+
ApplicationDefinitionTemplateInfoSet IFusionService.GetApplicationTemplates()
{
throw new NotImplementedException();
@@ -1739,7 +1749,6 @@
throw new NotImplementedException();
}
-
public FdoProviderCapabilities GetProviderCapabilities(string provider)
{
if (m_cachedProviderCapabilities == null)
Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI.Http/RequestBuilder.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI.Http/RequestBuilder.cs 2010-09-30 09:04:33 UTC (rev 5220)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI.Http/RequestBuilder.cs 2010-09-30 10:10:13 UTC (rev 5221)
@@ -1270,6 +1270,23 @@
return m_hosturi + "?" + EncodeParameters(param);
}
+ internal string EnumerateDataStores(string providerName, string partialConnString)
+ {
+ NameValueCollection param = new NameValueCollection();
+ param.Add("OPERATION", "ENUMERATEDATASTORES");
+ param.Add("VERSION", "1.0.0");
+ param.Add("SESSION", m_sessionID);
+ param.Add("FORMAT", "text/xml");
+ param.Add("CLIENTAGENT", m_userAgent);
+ if (m_locale != null)
+ param.Add("LOCALE", m_locale);
+
+ param.Add("PROVIDER", providerName);
+ param.Add("CONNECTIONSTRING", partialConnString);
+
+ return m_hosturi + "?" + EncodeParameters(param);
+ }
+
public string UserAgent
{
get { return m_userAgent; }
More information about the mapguide-commits
mailing list