[mapguide-commits] r6019 - in trunk/Tools/Maestro: Maestro Maestro.Editors Maestro.Editors/Common Maestro.Editors/Fusion Maestro.Editors/Fusion/WidgetEditors Maestro.Editors/LayerDefinition/Raster Maestro.Editors/LayerDefinition/Vector Maestro.Editors/LayerDefinition/Vector/Scales Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceEditors Maestro.Editors/MapDefinition Maestro.Editors/Migration Maestro.Editors/PrintLayout Maestro.Editors/SymbolDefinition Maestro.Editors/SymbolDefinition/GraphicsEditors Maestro.Editors/WatermarkDefinition Maestro.Editors/WebLayout

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Aug 1 07:37:08 EDT 2011


Author: jng
Date: 2011-08-01 04:37:08 -0700 (Mon, 01 Aug 2011)
New Revision: 6019

Added:
   trunk/Tools/Maestro/Maestro.Editors/LastSelectedFolder.cs
Modified:
   trunk/Tools/Maestro/Maestro.Editors/Common/ResourcePicker.cs
   trunk/Tools/Maestro/Maestro.Editors/Common/SymbolPicker.cs
   trunk/Tools/Maestro/Maestro.Editors/Fusion/MapCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/Fusion/MapSettingsCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/Fusion/WidgetEditors/MapMenuWidgetCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Raster/RasterLayerSettingsSectionCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceEditors/ReferenceCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstancesDialog.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerSettingsSectionCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj
   trunk/Tools/Maestro/Maestro.Editors/MapDefinition/LayerPropertiesCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/MapDefinition/MapLayersSectionCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/Migration/MigrateDialog.cs
   trunk/Tools/Maestro/Maestro.Editors/PrintLayout/LogoDialog.cs
   trunk/Tools/Maestro/Maestro.Editors/SymbolDefinition/CompoundSymbolDefinitionEditorCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/SymbolDefinition/GraphicsEditors/ImageDialog.cs
   trunk/Tools/Maestro/Maestro.Editors/SymbolDefinition/SimpleSymbolReferenceCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/WatermarkDefinition/WatermarkCollectionEditorCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/WatermarkDefinition/WatermarkInstanceEditor.cs
   trunk/Tools/Maestro/Maestro.Editors/WebLayout/WebLayoutSettingsCtrl.cs
   trunk/Tools/Maestro/Maestro/changelog.txt
Log:
#1745: Remember and restore the last selected folder wherever a Resource Picker is required


Modified: trunk/Tools/Maestro/Maestro/changelog.txt
===================================================================
--- trunk/Tools/Maestro/Maestro/changelog.txt	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro/changelog.txt	2011-08-01 11:37:08 UTC (rev 6019)
@@ -5,10 +5,13 @@
     - Fix broken support for Layer Definitions using the 2.3.0 schema
     - Enabled previews for Watermark Definition editor
  - Show resources in sorted order in the Resource Picker
+ - Map Definition Editor now supports re-arranging the logical order of Map Groups
+ - Resource Picker now remembers last selected folder for most resource selection operations
  - Productivity enhancements
     - New name for Rename dialog defaults to current name and field is focused
     - New Setup Standard Folder Structure command 
  - API: TF.net dependency replaced with NetToplogySuite. References and namespaces need to be updated in consuming applications
+ - Fix: Changed Migrate Resources to Copy/Move resources command for multiple resource selection context menu
  - Fix: When renaming a group in the Map Definition Editor, layers belonging to it didn't have their references updated
  - Fix: Exception when adding a new Image to the graphics collection of a Simple Symbol Definition in editor
  - Fix: Exception when deleting all finite scale ranges in Map Defintion Editor

Modified: trunk/Tools/Maestro/Maestro.Editors/Common/ResourcePicker.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Common/ResourcePicker.cs	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro.Editors/Common/ResourcePicker.cs	2011-08-01 11:37:08 UTC (rev 6019)
@@ -109,9 +109,10 @@
         {
             if (string.IsNullOrEmpty(folderId))
                 return;
-
             if (!ResourceIdentifier.IsFolderResource(folderId))
                 throw new ArgumentException(string.Format(Properties.Resources.NotAFolder, folderId));
+            //if (!_resSvc.ResourceExists(folderId))
+            //    return;
             this.ActiveControl = trvFolders;
             _model.NavigateTo(folderId);
             this.SelectedFolder = folderId;

Modified: trunk/Tools/Maestro/Maestro.Editors/Common/SymbolPicker.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Common/SymbolPicker.cs	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro.Editors/Common/SymbolPicker.cs	2011-08-01 11:37:08 UTC (rev 6019)
@@ -253,11 +253,14 @@
 
         private void btnBrowse_Click(object sender, EventArgs e)
         {
-            using (var picker = new ResourcePicker(_conn.ResourceService, ResourcePickerMode.OpenResource))
+            using (var picker = new ResourcePicker(_conn.ResourceService, ResourceTypes.SymbolLibrary, ResourcePickerMode.OpenResource))
             {
-                picker.Filter = ResourceTypes.SymbolLibrary;
+                if (LastSelectedFolder.IsSet)
+                    picker.SetStartingPoint(LastSelectedFolder.FolderId);
+
                 if (picker.ShowDialog() == DialogResult.OK)
                 {
+                    LastSelectedFolder.FolderId = picker.SelectedFolder;
                     LoadSymbols(picker.ResourceID);
                     txtSymbolLibrary.Text = picker.ResourceID;
                 }

Modified: trunk/Tools/Maestro/Maestro.Editors/Fusion/MapCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Fusion/MapCtrl.cs	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro.Editors/Fusion/MapCtrl.cs	2011-08-01 11:37:08 UTC (rev 6019)
@@ -359,8 +359,12 @@
         {
             using (var picker = new ResourcePicker(_edsvc.ResourceService, ResourceTypes.MapDefinition, ResourcePickerMode.OpenResource))
             {
+                if (LastSelectedFolder.IsSet)
+                    picker.SetStartingPoint(LastSelectedFolder.FolderId);
+
                 if (picker.ShowDialog() == DialogResult.OK)
                 {
+                    LastSelectedFolder.FolderId = picker.SelectedFolder;
                     txtMapDefinition.Text = picker.ResourceID;
                     OnResourceChanged();
                 }

Modified: trunk/Tools/Maestro/Maestro.Editors/Fusion/MapSettingsCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Fusion/MapSettingsCtrl.cs	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro.Editors/Fusion/MapSettingsCtrl.cs	2011-08-01 11:37:08 UTC (rev 6019)
@@ -130,8 +130,12 @@
         {
             using (var picker = new ResourcePicker(_edsvc.ResourceService, ResourceTypes.MapDefinition, ResourcePickerMode.OpenResource))
             {
+                if (LastSelectedFolder.IsSet)
+                    picker.SetStartingPoint(LastSelectedFolder.FolderId);
+
                 if (picker.ShowDialog() == DialogResult.OK)
                 {
+                    LastSelectedFolder.FolderId = picker.SelectedFolder;
                     string resId = picker.ResourceID;
                     AddMapDefinition(resId, ResourceIdentifier.GetName(resId));
                 }

Modified: trunk/Tools/Maestro/Maestro.Editors/Fusion/WidgetEditors/MapMenuWidgetCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Fusion/WidgetEditors/MapMenuWidgetCtrl.cs	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro.Editors/Fusion/WidgetEditors/MapMenuWidgetCtrl.cs	2011-08-01 11:37:08 UTC (rev 6019)
@@ -57,8 +57,12 @@
         {
             using (var picker = new ResourcePicker(_edsvc.ResourceService, ResourcePickerMode.OpenFolder))
             {
+                if (LastSelectedFolder.IsSet)
+                    picker.SetStartingPoint(LastSelectedFolder.FolderId);
+
                 if (picker.ShowDialog() == DialogResult.OK)
                 {
+                    LastSelectedFolder.FolderId = picker.SelectedFolder;
                     txtFolder.Text = picker.ResourceID;
                 }
             }

Added: trunk/Tools/Maestro/Maestro.Editors/LastSelectedFolder.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LastSelectedFolder.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Editors/LastSelectedFolder.cs	2011-08-01 11:37:08 UTC (rev 6019)
@@ -0,0 +1,38 @@
+#region Disclaimer / License
+// Copyright (C) 2011, 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;
+
+namespace Maestro.Editors
+{
+    public static class LastSelectedFolder
+    {
+        /// <summary>
+        /// Gets or sets the last selected folder resource id
+        /// </summary>
+        public static string FolderId;
+
+        /// <summary>
+        /// Gets whether the last selected folder has been set
+        /// </summary>
+        public static bool IsSet { get { return !string.IsNullOrEmpty(FolderId); } }
+    }
+}

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Raster/RasterLayerSettingsSectionCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Raster/RasterLayerSettingsSectionCtrl.cs	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Raster/RasterLayerSettingsSectionCtrl.cs	2011-08-01 11:37:08 UTC (rev 6019)
@@ -101,12 +101,18 @@
 
         private void btnBrowseFeatureSource_Click(object sender, EventArgs e)
         {
-            var picker = new ResourcePicker(_edsvc.ResourceService, ResourceTypes.FeatureSource, ResourcePickerMode.OpenResource);
-            if (picker.ShowDialog() == DialogResult.OK)
+            using (var picker = new ResourcePicker(_edsvc.ResourceService, ResourceTypes.FeatureSource, ResourcePickerMode.OpenResource))
             {
-                txtFeatureSource.Text = picker.ResourceID;
-                //Invalidate
-                _cachedFs = null;
+                if (LastSelectedFolder.IsSet)
+                    picker.SetStartingPoint(LastSelectedFolder.FolderId);
+
+                if (picker.ShowDialog() == DialogResult.OK)
+                {
+                    LastSelectedFolder.FolderId = picker.SelectedFolder;
+                    txtFeatureSource.Text = picker.ResourceID;
+                    //Invalidate
+                    _cachedFs = null;
+                }
             }
         }
 

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceEditors/ReferenceCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceEditors/ReferenceCtrl.cs	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceEditors/ReferenceCtrl.cs	2011-08-01 11:37:08 UTC (rev 6019)
@@ -51,8 +51,12 @@
                                                    ResourceTypes.SymbolDefinition, 
                                                    ResourcePickerMode.OpenResource))
             {
+                if (LastSelectedFolder.IsSet)
+                    picker.SetStartingPoint(LastSelectedFolder.FolderId);
+
                 if (picker.ShowDialog() == DialogResult.OK)
                 {
+                    LastSelectedFolder.FolderId = picker.SelectedFolder;
                     txtResourceId.Text = picker.ResourceID;
                 }
             }

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstancesDialog.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstancesDialog.cs	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstancesDialog.cs	2011-08-01 11:37:08 UTC (rev 6019)
@@ -67,8 +67,12 @@
             splitContainer1.Panel2.Controls.Clear();
             using (var picker = new ResourcePicker(_edSvc.ResourceService, ResourceTypes.SymbolDefinition, ResourcePickerMode.OpenResource))
             {
+                if (LastSelectedFolder.IsSet)
+                    picker.SetStartingPoint(LastSelectedFolder.FolderId);
+
                 if (picker.ShowDialog() == DialogResult.OK)
                 {
+                    LastSelectedFolder.FolderId = picker.SelectedFolder;
                     var symRef = _comp.CreateSymbolReference(picker.ResourceID);
                     AddInstance(symRef, true);
                 }

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerSettingsSectionCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerSettingsSectionCtrl.cs	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerSettingsSectionCtrl.cs	2011-08-01 11:37:08 UTC (rev 6019)
@@ -128,12 +128,18 @@
 
         private void btnBrowseFeatureSource_Click(object sender, EventArgs e)
         {
-            var picker = new ResourcePicker(_edsvc.ResourceService, ResourceTypes.FeatureSource, ResourcePickerMode.OpenResource);
-            if (picker.ShowDialog() == DialogResult.OK)
+            using (var picker = new ResourcePicker(_edsvc.ResourceService, ResourceTypes.FeatureSource, ResourcePickerMode.OpenResource))
             {
-                txtFeatureSource.Text = picker.ResourceID;
-                //Invalidate
-                _cachedFs = null;
+                if (LastSelectedFolder.IsSet)
+                    picker.SetStartingPoint(LastSelectedFolder.FolderId);
+
+                if (picker.ShowDialog() == DialogResult.OK)
+                {
+                    LastSelectedFolder.FolderId = picker.SelectedFolder;
+                    txtFeatureSource.Text = picker.ResourceID;
+                    //Invalidate
+                    _cachedFs = null;
+                }
             }
         }
 

Modified: trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj	2011-08-01 11:37:08 UTC (rev 6019)
@@ -606,6 +606,7 @@
     </Compile>
     <Compile Include="IEditorBindable.cs" />
     <Compile Include="IEditorService.cs" />
+    <Compile Include="LastSelectedFolder.cs" />
     <Compile Include="LayerDefinition\DrawingLayerEditorCtrl.cs">
       <SubType>UserControl</SubType>
     </Compile>

Modified: trunk/Tools/Maestro/Maestro.Editors/MapDefinition/LayerPropertiesCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/MapDefinition/LayerPropertiesCtrl.cs	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro.Editors/MapDefinition/LayerPropertiesCtrl.cs	2011-08-01 11:37:08 UTC (rev 6019)
@@ -86,8 +86,12 @@
         {
             using (var picker = new ResourcePicker(_resSvc, ResourceTypes.LayerDefinition, ResourcePickerMode.OpenResource))
             {
+                if (LastSelectedFolder.IsSet)
+                    picker.SetStartingPoint(LastSelectedFolder.FolderId);
+
                 if (picker.ShowDialog() == DialogResult.OK)
                 {
+                    LastSelectedFolder.FolderId = picker.SelectedFolder;
                     txtResourceId.Text = picker.ResourceID;
                 }
             }

Modified: trunk/Tools/Maestro/Maestro.Editors/MapDefinition/MapLayersSectionCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/MapDefinition/MapLayersSectionCtrl.cs	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro.Editors/MapDefinition/MapLayersSectionCtrl.cs	2011-08-01 11:37:08 UTC (rev 6019)
@@ -223,8 +223,12 @@
         {
             using (var picker = new ResourcePicker(_edSvc.ResourceService, ResourceTypes.LayerDefinition, ResourcePickerMode.OpenResource))
             {
+                if (LastSelectedFolder.IsSet)
+                    picker.SetStartingPoint(LastSelectedFolder.FolderId);
+
                 if (picker.ShowDialog() == DialogResult.OK)
                 {
+                    LastSelectedFolder.FolderId = picker.SelectedFolder;
                     string layerId = picker.ResourceID;
                     var selGroup = GetSelectedLayerGroupItem() as GroupItem;
                     CreateLayer(layerId, selGroup == null ? null : selGroup.Tag);
@@ -294,8 +298,12 @@
         {
             using (var picker = new ResourcePicker(_edSvc.ResourceService, ResourceTypes.LayerDefinition, ResourcePickerMode.OpenResource))
             {
+                if (LastSelectedFolder.IsSet)
+                    picker.SetStartingPoint(LastSelectedFolder.FolderId);
+
                 if (picker.ShowDialog() == DialogResult.OK)
                 {
+                    LastSelectedFolder.FolderId = picker.SelectedFolder;
                     string layerId = picker.ResourceID;
                     var selGroup = GetSelectedDrawOrderItem() as GroupItem;
                     CreateLayer(layerId, selGroup != null ? selGroup.Tag : null);
@@ -529,8 +537,12 @@
         {
             using (var picker = new ResourcePicker(_edSvc.ResourceService, ResourceTypes.LayerDefinition, ResourcePickerMode.OpenResource))
             {
+                if (LastSelectedFolder.IsSet)
+                    picker.SetStartingPoint(LastSelectedFolder.FolderId);
+
                 if (picker.ShowDialog() == DialogResult.OK)
                 {
+                    LastSelectedFolder.FolderId = picker.SelectedFolder;
                     _map.InitBaseMap();
                     string layerId = picker.ResourceID;
                     IBaseMapGroup grp = null;

Modified: trunk/Tools/Maestro/Maestro.Editors/Migration/MigrateDialog.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Migration/MigrateDialog.cs	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro.Editors/Migration/MigrateDialog.cs	2011-08-01 11:37:08 UTC (rev 6019)
@@ -125,8 +125,12 @@
         {
             using (var picker = new ResourcePicker(_source.ResourceService, ResourcePickerMode.OpenResource))
             {
+                if (LastSelectedFolder.IsSet)
+                    picker.SetStartingPoint(LastSelectedFolder.FolderId);
+
                 if (picker.ShowDialog() == DialogResult.OK)
                 {
+                    LastSelectedFolder.FolderId = picker.SelectedFolder;
                     txtResourceId.Text = picker.ResourceID;
                 }
             }

Modified: trunk/Tools/Maestro/Maestro.Editors/PrintLayout/LogoDialog.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/PrintLayout/LogoDialog.cs	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro.Editors/PrintLayout/LogoDialog.cs	2011-08-01 11:37:08 UTC (rev 6019)
@@ -119,8 +119,12 @@
         {
             using (var picker = new ResourcePicker(_conn.ResourceService, ResourceTypes.SymbolLibrary, ResourcePickerMode.OpenResource))
             {
+                if (LastSelectedFolder.IsSet)
+                    picker.SetStartingPoint(LastSelectedFolder.FolderId);
+
                 if (picker.ShowDialog() == DialogResult.OK)
                 {
+                    LastSelectedFolder.FolderId = picker.SelectedFolder;
                     this.SymbolLibraryID = picker.ResourceID;
                     this.SymbolName = string.Empty;
                 }

Modified: trunk/Tools/Maestro/Maestro.Editors/SymbolDefinition/CompoundSymbolDefinitionEditorCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/SymbolDefinition/CompoundSymbolDefinitionEditorCtrl.cs	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro.Editors/SymbolDefinition/CompoundSymbolDefinitionEditorCtrl.cs	2011-08-01 11:37:08 UTC (rev 6019)
@@ -120,8 +120,12 @@
                                                    ResourceTypes.SymbolDefinition,
                                                    ResourcePickerMode.OpenResource))
             {
+                if (LastSelectedFolder.IsSet)
+                    picker.SetStartingPoint(LastSelectedFolder.FolderId);
+
                 if (picker.ShowDialog() == DialogResult.OK)
                 {
+                    LastSelectedFolder.FolderId = picker.SelectedFolder;
                     var symRef = _compSym.CreateSymbolReference(picker.ResourceID);
                     AddSymbolReference(symRef);
                 }

Modified: trunk/Tools/Maestro/Maestro.Editors/SymbolDefinition/GraphicsEditors/ImageDialog.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/SymbolDefinition/GraphicsEditors/ImageDialog.cs	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro.Editors/SymbolDefinition/GraphicsEditors/ImageDialog.cs	2011-08-01 11:37:08 UTC (rev 6019)
@@ -173,7 +173,14 @@
         {
             using (var picker = new ResourcePicker(_ssd.CurrentConnection.ResourceService, ResourcePickerMode.OpenResource))
             {
-                txtResourceId.Text = picker.ResourceID;
+                if (LastSelectedFolder.IsSet)
+                    picker.SetStartingPoint(LastSelectedFolder.FolderId);
+
+                if (picker.ShowDialog() == DialogResult.OK)
+                {
+                    LastSelectedFolder.FolderId = picker.SelectedFolder;
+                    txtResourceId.Text = picker.ResourceID;
+                }
             }
         }
 

Modified: trunk/Tools/Maestro/Maestro.Editors/SymbolDefinition/SimpleSymbolReferenceCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/SymbolDefinition/SimpleSymbolReferenceCtrl.cs	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro.Editors/SymbolDefinition/SimpleSymbolReferenceCtrl.cs	2011-08-01 11:37:08 UTC (rev 6019)
@@ -62,7 +62,14 @@
                                                    ResourceTypes.SymbolDefinition,
                                                    ResourcePickerMode.OpenResource))
             {
-                txtResourceId.Text = picker.ResourceID;
+                if (LastSelectedFolder.IsSet)
+                    picker.SetStartingPoint(LastSelectedFolder.FolderId);
+
+                if (picker.ShowDialog() == DialogResult.OK)
+                {
+                    LastSelectedFolder.FolderId = picker.ResourceID;
+                    txtResourceId.Text = picker.ResourceID;
+                }
             }
         }
 

Modified: trunk/Tools/Maestro/Maestro.Editors/WatermarkDefinition/WatermarkCollectionEditorCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/WatermarkDefinition/WatermarkCollectionEditorCtrl.cs	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro.Editors/WatermarkDefinition/WatermarkCollectionEditorCtrl.cs	2011-08-01 11:37:08 UTC (rev 6019)
@@ -60,8 +60,12 @@
         {
             using (var picker = new ResourcePicker(_resSvc, ResourceTypes.WatermarkDefinition, ResourcePickerMode.OpenResource))
             {
+                if (LastSelectedFolder.IsSet)
+                    picker.SetStartingPoint(LastSelectedFolder.FolderId);
+
                 if (picker.ShowDialog() == DialogResult.OK)
                 {
+                    LastSelectedFolder.FolderId = picker.SelectedFolder;
                     var wdf = (IWatermarkDefinition)_resSvc.GetResource(picker.ResourceID);
                     var wm = wdf.CreateInstance();
                     var diag = new WatermarkInstanceEditorDialog(_resSvc, wm);

Modified: trunk/Tools/Maestro/Maestro.Editors/WatermarkDefinition/WatermarkInstanceEditor.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/WatermarkDefinition/WatermarkInstanceEditor.cs	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro.Editors/WatermarkDefinition/WatermarkInstanceEditor.cs	2011-08-01 11:37:08 UTC (rev 6019)
@@ -127,8 +127,12 @@
         {
             using (var picker = new ResourcePicker(_resSvc, ResourceTypes.WatermarkDefinition, ResourcePickerMode.OpenResource))
             {
+                if (LastSelectedFolder.IsSet)
+                    picker.SetStartingPoint(LastSelectedFolder.FolderId);
+
                 if (picker.ShowDialog() == DialogResult.OK)
                 {
+                    LastSelectedFolder.FolderId = picker.SelectedFolder;
                     txtResourceId.Text = picker.ResourceID;
                 }
             }

Modified: trunk/Tools/Maestro/Maestro.Editors/WebLayout/WebLayoutSettingsCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/WebLayout/WebLayoutSettingsCtrl.cs	2011-08-01 11:07:21 UTC (rev 6018)
+++ trunk/Tools/Maestro/Maestro.Editors/WebLayout/WebLayoutSettingsCtrl.cs	2011-08-01 11:37:08 UTC (rev 6019)
@@ -217,8 +217,12 @@
         {
             using (var picker = new ResourcePicker(_edsvc.ResourceService, ResourceTypes.MapDefinition, ResourcePickerMode.OpenResource))
             {
+                if (LastSelectedFolder.IsSet)
+                    picker.SetStartingPoint(LastSelectedFolder.FolderId);
+
                 if (picker.ShowDialog() == DialogResult.OK)
                 {
+                    LastSelectedFolder.FolderId = picker.SelectedFolder;
                     _wl.Map.ResourceId = picker.ResourceID;
                 }
             }



More information about the mapguide-commits mailing list