[mapguide-commits] r4927 - in sandbox/maestro-2.5: Maestro.Base
Maestro.Base/Editor Maestro.Editors Maestro.Editors/LayerDefinition
Maestro.Editors/LayerDefinition/Drawing
Maestro.Editors/LayerDefinition/Vector
OSGeo.MapGuide.MaestroAPI OSGeo.MapGuide.MaestroAPI.Http
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue May 25 07:09:33 EDT 2010
Author: jng
Date: 2010-05-25 07:09:13 -0400 (Tue, 25 May 2010)
New Revision: 4927
Added:
sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/Drawing/DrawingLayerSettingsCtrl.Designer.cs
sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/Drawing/DrawingLayerSettingsCtrl.cs
sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/Drawing/DrawingLayerSettingsCtrl.resx
sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/DrawingLayerEditorCtrl.Designer.cs
sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/DrawingLayerEditorCtrl.cs
sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/DrawingLayerEditorCtrl.resx
Modified:
sandbox/maestro-2.5/Maestro.Base/Editor/EditorContentBase.cs
sandbox/maestro-2.5/Maestro.Base/Editor/LayerDefinitionEditor.cs
sandbox/maestro-2.5/Maestro.Base/Editor/ResourceEditorService.cs
sandbox/maestro-2.5/Maestro.Base/Maestro.Base.addin
sandbox/maestro-2.5/Maestro.Editors/IEditorService.cs
sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/Vector/VectorLayerSettingsSectionCtrl.Designer.cs
sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/Vector/VectorLayerSettingsSectionCtrl.cs
sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/VectorLayerEditorCtrl.cs
sandbox/maestro-2.5/Maestro.Editors/Maestro.Editors.csproj
sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI.Http/HttpServerConnection.cs
sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI.Http/RequestBuilder.cs
sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/BindingListExtensions.cs
Log:
This submission includes the following changes:
- Add a drawing layer editor. Dirty state checking is functional, but it is not fully tested out yet.
- Mark IsDirty = true on the IEditorViewContent when the IEditorService raises DirtyStateChanged. This properly enables the save button on the main toolbar.
- Fix an incorrect ENUMERATEDRAWINGLAYERS request
- Fix incorrect BindingList<T> to T[] conversion
Modified: sandbox/maestro-2.5/Maestro.Base/Editor/EditorContentBase.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Editor/EditorContentBase.cs 2010-05-25 05:51:31 UTC (rev 4926)
+++ sandbox/maestro-2.5/Maestro.Base/Editor/EditorContentBase.cs 2010-05-25 11:09:13 UTC (rev 4927)
@@ -50,6 +50,7 @@
void OnDirtyStateChanged(object sender, EventArgs e)
{
+ this.IsDirty = _svc.IsDirty; //Sync states
if (_svc.IsDirty)
{
if (!this.Title.StartsWith(DIRTY_PREFIX))
Modified: sandbox/maestro-2.5/Maestro.Base/Editor/LayerDefinitionEditor.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Editor/LayerDefinitionEditor.cs 2010-05-25 05:51:31 UTC (rev 4926)
+++ sandbox/maestro-2.5/Maestro.Base/Editor/LayerDefinitionEditor.cs 2010-05-25 11:09:13 UTC (rev 4927)
@@ -56,7 +56,6 @@
if (vl != null)
{
var ed = new VectorLayerEditorCtrl();
- service.RegisterCustomNotifier(ed);
ed.Bind(service);
ed.Dock = DockStyle.Fill;
panelBody.Controls.Add(ed);
@@ -64,9 +63,13 @@
//else if (gl != null)
//{
//}
- //else if (dl != null)
- //{
- //}
+ else if (dl != null)
+ {
+ var ed = new DrawingLayerEditorCtrl();
+ ed.Bind(service);
+ ed.Dock = DockStyle.Fill;
+ panelBody.Controls.Add(ed);
+ }
else
{
throw new NotSupportedException("Could not determine the sub-layer type"); //LOCALIZE
Modified: sandbox/maestro-2.5/Maestro.Base/Editor/ResourceEditorService.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Editor/ResourceEditorService.cs 2010-05-25 05:51:31 UTC (rev 4926)
+++ sandbox/maestro-2.5/Maestro.Base/Editor/ResourceEditorService.cs 2010-05-25 11:09:13 UTC (rev 4927)
@@ -245,5 +245,11 @@
}
return string.Empty;
}
+
+
+ public IDrawingService DrawingService
+ {
+ get { return (IDrawingService)_conn.GetService((int)ServiceType.Drawing); }
+ }
}
}
Modified: sandbox/maestro-2.5/Maestro.Base/Maestro.Base.addin
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Maestro.Base.addin 2010-05-25 05:51:31 UTC (rev 4926)
+++ sandbox/maestro-2.5/Maestro.Base/Maestro.Base.addin 2010-05-25 11:09:13 UTC (rev 4927)
@@ -157,11 +157,13 @@
class="Maestro.Base.Commands.NotImplementedCommand" />
<ToolbarItem type="Separator" />
</Condition>
- <Condition action="Disable" name="EditorFunction" property="CanSave">
- <ToolbarItem id="Save"
- icon="disk"
- tooltip="${res:Menu_File_SaveResource}"
- class="Maestro.Base.Commands.SaveResourceCommand" />
+ <Condition action="Disable" name="EditorFunction">
+ <Condition action="Disable" name="EditorFunction" property="CanSave">
+ <ToolbarItem id="Save"
+ icon="disk"
+ tooltip="${res:Menu_File_SaveResource}"
+ class="Maestro.Base.Commands.SaveResourceCommand" />
+ </Condition>
<ToolbarItem id="SaveAs"
icon="disk__arrow"
tooltip="${res:Menu_File_SaveResourceAs}"
@@ -342,4 +344,4 @@
</Condition>
</Path>
-</AddIn>
\ No newline at end of file
+</AddIn>
Modified: sandbox/maestro-2.5/Maestro.Editors/IEditorService.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/IEditorService.cs 2010-05-25 05:51:31 UTC (rev 4926)
+++ sandbox/maestro-2.5/Maestro.Editors/IEditorService.cs 2010-05-25 11:09:13 UTC (rev 4927)
@@ -44,6 +44,10 @@
/// </summary>
IResourceService ResourceService { get; }
/// <summary>
+ /// Gets the associated drawing service
+ /// </summary>
+ IDrawingService DrawingService { get; }
+ /// <summary>
/// Adds the specified resource data. Do not use the identical method exposed by the
/// <see cref="ResourceService"/> property as this one has dirty state notification hooks
/// </summary>
Added: sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/Drawing/DrawingLayerSettingsCtrl.Designer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/Drawing/DrawingLayerSettingsCtrl.Designer.cs (rev 0)
+++ sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/Drawing/DrawingLayerSettingsCtrl.Designer.cs 2010-05-25 11:09:13 UTC (rev 4927)
@@ -0,0 +1,222 @@
+namespace Maestro.Editors.LayerDefinition.Drawing
+{
+ partial class DrawingLayerSettingsCtrl
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.label1 = new System.Windows.Forms.Label();
+ this.txtDrawingSource = new System.Windows.Forms.TextBox();
+ this.btnBrowse = new System.Windows.Forms.Button();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.chkListDwfLayers = new System.Windows.Forms.CheckedListBox();
+ this.label5 = new System.Windows.Forms.Label();
+ this.txtMaxScale = new System.Windows.Forms.TextBox();
+ this.txtMinScale = new System.Windows.Forms.TextBox();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.cmbSheet = new System.Windows.Forms.ComboBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.lnkCheckAll = new System.Windows.Forms.LinkLabel();
+ this.contentPanel.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // contentPanel
+ //
+ this.contentPanel.Controls.Add(this.groupBox1);
+ this.contentPanel.Controls.Add(this.btnBrowse);
+ this.contentPanel.Controls.Add(this.txtDrawingSource);
+ this.contentPanel.Controls.Add(this.label1);
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(14, 22);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(83, 13);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "Drawing Source";
+ //
+ // txtDrawingSource
+ //
+ this.txtDrawingSource.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.txtDrawingSource.Location = new System.Drawing.Point(103, 19);
+ this.txtDrawingSource.Name = "txtDrawingSource";
+ this.txtDrawingSource.ReadOnly = true;
+ this.txtDrawingSource.Size = new System.Drawing.Size(299, 20);
+ this.txtDrawingSource.TabIndex = 1;
+ //
+ // btnBrowse
+ //
+ this.btnBrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnBrowse.Location = new System.Drawing.Point(408, 17);
+ this.btnBrowse.Name = "btnBrowse";
+ this.btnBrowse.Size = new System.Drawing.Size(28, 23);
+ this.btnBrowse.TabIndex = 2;
+ this.btnBrowse.Text = "...";
+ this.btnBrowse.UseVisualStyleBackColor = true;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBox1.Controls.Add(this.lnkCheckAll);
+ this.groupBox1.Controls.Add(this.chkListDwfLayers);
+ this.groupBox1.Controls.Add(this.label5);
+ this.groupBox1.Controls.Add(this.txtMaxScale);
+ this.groupBox1.Controls.Add(this.txtMinScale);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.cmbSheet);
+ this.groupBox1.Controls.Add(this.label2);
+ this.groupBox1.Location = new System.Drawing.Point(17, 46);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(419, 233);
+ this.groupBox1.TabIndex = 3;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Sheet Settings";
+ //
+ // chkListDwfLayers
+ //
+ this.chkListDwfLayers.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.chkListDwfLayers.FormattingEnabled = true;
+ this.chkListDwfLayers.Location = new System.Drawing.Point(20, 106);
+ this.chkListDwfLayers.Name = "chkListDwfLayers";
+ this.chkListDwfLayers.Size = new System.Drawing.Size(380, 109);
+ this.chkListDwfLayers.TabIndex = 7;
+ this.chkListDwfLayers.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.chkListDwfLayers_ItemCheck);
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.Location = new System.Drawing.Point(17, 89);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(126, 13);
+ this.label5.TabIndex = 6;
+ this.label5.Text = "Show the following layers";
+ //
+ // txtMaxScale
+ //
+ this.txtMaxScale.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.txtMaxScale.Location = new System.Drawing.Point(295, 55);
+ this.txtMaxScale.Name = "txtMaxScale";
+ this.txtMaxScale.Size = new System.Drawing.Size(105, 20);
+ this.txtMaxScale.TabIndex = 5;
+ //
+ // txtMinScale
+ //
+ this.txtMinScale.Location = new System.Drawing.Point(91, 55);
+ this.txtMinScale.Name = "txtMinScale";
+ this.txtMinScale.Size = new System.Drawing.Size(100, 20);
+ this.txtMinScale.TabIndex = 4;
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(221, 58);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(57, 13);
+ this.label4.TabIndex = 3;
+ this.label4.Text = "Max Scale";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(17, 58);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(54, 13);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "Min Scale";
+ //
+ // cmbSheet
+ //
+ this.cmbSheet.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.cmbSheet.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.cmbSheet.FormattingEnabled = true;
+ this.cmbSheet.Location = new System.Drawing.Point(91, 28);
+ this.cmbSheet.Name = "cmbSheet";
+ this.cmbSheet.Size = new System.Drawing.Size(307, 21);
+ this.cmbSheet.TabIndex = 1;
+ this.cmbSheet.SelectedIndexChanged += new System.EventHandler(this.cmbSheet_SelectedIndexChanged);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(17, 31);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(63, 13);
+ this.label2.TabIndex = 0;
+ this.label2.Text = "DWF Sheet";
+ //
+ // lnkCheckAll
+ //
+ this.lnkCheckAll.AutoSize = true;
+ this.lnkCheckAll.Location = new System.Drawing.Point(149, 89);
+ this.lnkCheckAll.Name = "lnkCheckAll";
+ this.lnkCheckAll.Size = new System.Drawing.Size(52, 13);
+ this.lnkCheckAll.TabIndex = 8;
+ this.lnkCheckAll.TabStop = true;
+ this.lnkCheckAll.Text = "Check All";
+ this.lnkCheckAll.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkCheckAll_LinkClicked);
+ //
+ // DrawingLayerSettingsCtrl
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.HeaderText = "Drawing Source Settings";
+ this.Name = "DrawingLayerSettingsCtrl";
+ this.contentPanel.ResumeLayout(false);
+ this.contentPanel.PerformLayout();
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button btnBrowse;
+ private System.Windows.Forms.TextBox txtDrawingSource;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.ComboBox cmbSheet;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.TextBox txtMaxScale;
+ private System.Windows.Forms.TextBox txtMinScale;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.CheckedListBox chkListDwfLayers;
+ private System.Windows.Forms.LinkLabel lnkCheckAll;
+ }
+}
Added: sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/Drawing/DrawingLayerSettingsCtrl.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/Drawing/DrawingLayerSettingsCtrl.cs (rev 0)
+++ sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/Drawing/DrawingLayerSettingsCtrl.cs 2010-05-25 11:09:13 UTC (rev 4927)
@@ -0,0 +1,179 @@
+#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.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using Maestro.Shared.UI;
+using System.Diagnostics;
+using OSGeo.MapGuide.ObjectModels.LayerDefinition;
+
+namespace Maestro.Editors.LayerDefinition.Drawing
+{
+ [ToolboxItem(true)]
+ public partial class DrawingLayerSettingsCtrl : CollapsiblePanel,IEditorBindable
+ {
+ public DrawingLayerSettingsCtrl()
+ {
+ InitializeComponent();
+ }
+
+ private IEditorService _service;
+ private DrawingLayerDefinitionType _dlayer;
+
+ public void Bind(IEditorService service)
+ {
+ _service = service;
+ _service.RegisterCustomNotifier(this);
+
+ var lyr = service.GetEditedResource() as OSGeo.MapGuide.ObjectModels.LayerDefinition.LayerDefinition;
+ Debug.Assert(lyr != null);
+
+ _dlayer = lyr.Item as DrawingLayerDefinitionType;
+ Debug.Assert(_dlayer != null);
+
+ txtDrawingSource.DataBindings.Add("Text", _dlayer, "ResourceId");
+
+ var sheets = _service.DrawingService.EnumerateDrawingSections(_dlayer.ResourceId);
+ cmbSheet.DisplayMember = "Title";
+ cmbSheet.ValueMember = "Name";
+ cmbSheet.DataBindings.Add("SelectedValue", _dlayer, "Sheet");
+ cmbSheet.DataSource = sheets.Section;
+
+ var minBinding = new Binding("Text", _dlayer, "MinScale");
+ var maxBinding = new Binding("Text", _dlayer, "MaxScale");
+
+ minBinding.Format += (sender, ce) =>
+ {
+ if (ce.DesiredType != typeof(string)) return;
+
+ ce.Value = Convert.ToDouble(ce.Value);
+ };
+ minBinding.Parse += (sender, ce) =>
+ {
+ if (ce.DesiredType != typeof(double)) return;
+ double val;
+ if (!double.TryParse(ce.Value.ToString(), out val))
+ return;
+
+ ce.Value = val;
+ };
+ maxBinding.Format += (sender, ce) =>
+ {
+ if (ce.DesiredType != typeof(string)) return;
+
+ ce.Value = Convert.ToDouble(ce.Value);
+ };
+ maxBinding.Parse += (sender, ce) =>
+ {
+ if (ce.DesiredType != typeof(double)) return;
+ double val;
+ if (!double.TryParse(ce.Value.ToString(), out val))
+ return;
+
+ ce.Value = val;
+ };
+
+ txtMinScale.DataBindings.Add(minBinding);
+ txtMaxScale.DataBindings.Add(maxBinding);
+
+ //This is not the root object so no change listeners have been subscribed
+ _dlayer.PropertyChanged += (sender, e) => { OnResourceChanged(); };
+ }
+
+ private void OnResourceChanged()
+ {
+ var handler = this.ResourceChanged;
+ if (handler != null)
+ handler(this, EventArgs.Empty);
+ }
+
+ public event EventHandler ResourceChanged;
+
+ private void cmbSheet_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ chkListDwfLayers.Items.Clear();
+
+ var layers = _service.DrawingService.EnumerateDrawingLayers(_dlayer.ResourceId, _dlayer.Sheet);
+ if (string.IsNullOrEmpty(_dlayer.LayerFilter)) //All layers
+ {
+ foreach (var lyr in layers)
+ {
+ chkListDwfLayers.Items.Add(lyr, true);
+ }
+ }
+ else
+ {
+ string[] visible = _dlayer.LayerFilter.Split(',');
+ foreach (var lyr in layers)
+ {
+ if (Array.IndexOf<string>(visible, lyr) >= 0)
+ chkListDwfLayers.Items.Add(lyr, true);
+ else
+ chkListDwfLayers.Items.Add(lyr, false);
+ }
+ }
+ }
+
+ private bool IsAllLayersChecked()
+ {
+ return chkListDwfLayers.CheckedIndices.Count == chkListDwfLayers.Items.Count;
+ }
+
+ private string GetLayerFilter()
+ {
+ if (chkListDwfLayers.CheckedIndices.Count == 0)
+ {
+ return string.Empty;
+ }
+ else if (IsAllLayersChecked())
+ {
+ return null;
+ }
+ else
+ {
+ var list = new List<string>();
+ foreach (var obj in chkListDwfLayers.CheckedItems)
+ {
+ list.Add(obj.ToString());
+ }
+ return string.Join(",", list.ToArray());
+ }
+ }
+
+ private void chkListDwfLayers_ItemCheck(object sender, ItemCheckEventArgs e)
+ {
+ _dlayer.LayerFilter = GetLayerFilter();
+ }
+
+ private void lnkCheckAll_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
+ {
+ for (int i = 0; i < chkListDwfLayers.Items.Count; i++)
+ {
+ chkListDwfLayers.SetItemChecked(i, true);
+ }
+ Debug.Assert(chkListDwfLayers.CheckedIndices.Count == chkListDwfLayers.Items.Count);
+ _dlayer.LayerFilter = GetLayerFilter();
+ }
+ }
+}
Added: sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/Drawing/DrawingLayerSettingsCtrl.resx
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/Drawing/DrawingLayerSettingsCtrl.resx (rev 0)
+++ sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/Drawing/DrawingLayerSettingsCtrl.resx 2010-05-25 11:09:13 UTC (rev 4927)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
Added: sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/DrawingLayerEditorCtrl.Designer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/DrawingLayerEditorCtrl.Designer.cs (rev 0)
+++ sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/DrawingLayerEditorCtrl.Designer.cs 2010-05-25 11:09:13 UTC (rev 4927)
@@ -0,0 +1,62 @@
+namespace Maestro.Editors.LayerDefinition
+{
+ partial class DrawingLayerEditorCtrl
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.drawingSettingsCtrl = new Maestro.Editors.LayerDefinition.Drawing.DrawingLayerSettingsCtrl();
+ this.SuspendLayout();
+ //
+ // drawingLayerSettingsCtrl1
+ //
+ this.drawingSettingsCtrl.ContentBackgroundColor = System.Drawing.SystemColors.Control;
+ this.drawingSettingsCtrl.Dock = System.Windows.Forms.DockStyle.Top;
+ this.drawingSettingsCtrl.HeaderBackgroundColor = System.Drawing.Color.LightSteelBlue;
+ this.drawingSettingsCtrl.HeaderFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.drawingSettingsCtrl.HeaderText = "Drawing Source Settings";
+ this.drawingSettingsCtrl.Location = new System.Drawing.Point(0, 0);
+ this.drawingSettingsCtrl.Name = "drawingLayerSettingsCtrl1";
+ this.drawingSettingsCtrl.Size = new System.Drawing.Size(487, 319);
+ this.drawingSettingsCtrl.TabIndex = 0;
+ //
+ // DrawingLayerEditorCtrl
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoScroll = true;
+ this.Controls.Add(this.drawingSettingsCtrl);
+ this.Name = "DrawingLayerEditorCtrl";
+ this.Size = new System.Drawing.Size(487, 338);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private Maestro.Editors.LayerDefinition.Drawing.DrawingLayerSettingsCtrl drawingSettingsCtrl;
+ }
+}
Added: sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/DrawingLayerEditorCtrl.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/DrawingLayerEditorCtrl.cs (rev 0)
+++ sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/DrawingLayerEditorCtrl.cs 2010-05-25 11:09:13 UTC (rev 4927)
@@ -0,0 +1,42 @@
+#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.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+
+namespace Maestro.Editors.LayerDefinition
+{
+ public partial class DrawingLayerEditorCtrl : EditorBase
+ {
+ public DrawingLayerEditorCtrl()
+ {
+ InitializeComponent();
+ }
+
+ public override void Bind(IEditorService service)
+ {
+ drawingSettingsCtrl.Bind(service);
+ }
+ }
+}
Added: sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/DrawingLayerEditorCtrl.resx
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/DrawingLayerEditorCtrl.resx (rev 0)
+++ sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/DrawingLayerEditorCtrl.resx 2010-05-25 11:09:13 UTC (rev 4927)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
Modified: sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/Vector/VectorLayerSettingsSectionCtrl.Designer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/Vector/VectorLayerSettingsSectionCtrl.Designer.cs 2010-05-25 05:51:31 UTC (rev 4926)
+++ sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/Vector/VectorLayerSettingsSectionCtrl.Designer.cs 2010-05-25 11:09:13 UTC (rev 4927)
@@ -255,7 +255,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.HeaderText = "Resource Settings";
+ this.HeaderText = "Feature Source Settings";
this.Name = "VectorLayerSettingsSectionCtrl";
this.Size = new System.Drawing.Size(449, 267);
this.contentPanel.ResumeLayout(false);
Modified: sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/Vector/VectorLayerSettingsSectionCtrl.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/Vector/VectorLayerSettingsSectionCtrl.cs 2010-05-25 05:51:31 UTC (rev 4926)
+++ sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/Vector/VectorLayerSettingsSectionCtrl.cs 2010-05-25 11:09:13 UTC (rev 4927)
@@ -58,6 +58,7 @@
txtHyperlink.DataBindings.Add("Text", vl, "Url");
txtTooltip.DataBindings.Add("Text", vl, "ToolTip");
+ //This is not the root object so no change listeners have been subscribed
vl.PropertyChanged += (sender, e) => { OnResourceChanged(); };
}
Modified: sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/VectorLayerEditorCtrl.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/VectorLayerEditorCtrl.cs 2010-05-25 05:51:31 UTC (rev 4926)
+++ sandbox/maestro-2.5/Maestro.Editors/LayerDefinition/VectorLayerEditorCtrl.cs 2010-05-25 11:09:13 UTC (rev 4927)
@@ -17,6 +17,7 @@
public override void Bind(IEditorService service)
{
+ service.RegisterCustomNotifier(this);
resSettings.ResourceChanged += (sender, e) => { OnResourceChanged(); };
resSettings.Bind(service);
layerProperties.ResourceChanged += (sender, e) => { OnResourceChanged(); };
Modified: sandbox/maestro-2.5/Maestro.Editors/Maestro.Editors.csproj
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/Maestro.Editors.csproj 2010-05-25 05:51:31 UTC (rev 4926)
+++ sandbox/maestro-2.5/Maestro.Editors/Maestro.Editors.csproj 2010-05-25 11:09:13 UTC (rev 4927)
@@ -3,7 +3,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
+ <ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{5AD2CDBA-952E-4148-98A1-31D2E0D540D5}</ProjectGuid>
<OutputType>Library</OutputType>
@@ -214,6 +214,18 @@
</Compile>
<Compile Include="IEditorBindable.cs" />
<Compile Include="IEditorService.cs" />
+ <Compile Include="LayerDefinition\DrawingLayerEditorCtrl.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="LayerDefinition\DrawingLayerEditorCtrl.Designer.cs">
+ <DependentUpon>DrawingLayerEditorCtrl.cs</DependentUpon>
+ </Compile>
+ <Compile Include="LayerDefinition\Drawing\DrawingLayerSettingsCtrl.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="LayerDefinition\Drawing\DrawingLayerSettingsCtrl.Designer.cs">
+ <DependentUpon>DrawingLayerSettingsCtrl.cs</DependentUpon>
+ </Compile>
<Compile Include="LayerDefinition\LayerPropertiesSectionCtrl.cs">
<SubType>UserControl</SubType>
</Compile>
@@ -503,6 +515,12 @@
<DependentUpon>XmlValidationResult.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
+ <EmbeddedResource Include="LayerDefinition\DrawingLayerEditorCtrl.resx">
+ <DependentUpon>DrawingLayerEditorCtrl.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="LayerDefinition\Drawing\DrawingLayerSettingsCtrl.resx">
+ <DependentUpon>DrawingLayerSettingsCtrl.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="LayerDefinition\LayerPropertiesSectionCtrl.resx">
<DependentUpon>LayerPropertiesSectionCtrl.cs</DependentUpon>
<SubType>Designer</SubType>
@@ -772,7 +790,6 @@
<ItemGroup>
<Folder Include="DrawingSource\Preview\" />
<Folder Include="FeatureSource\Providers\Rdbms\" />
- <Folder Include="LayerDefinition\Drawing\" />
<Folder Include="LayerDefinition\Geometry\" />
<Folder Include="LayerDefinition\Raster\" />
<Folder Include="PrintLayout\Logos\" />
@@ -787,4 +804,4 @@
<Target Name="AfterBuild">
</Target>
-->
-</Project>
\ No newline at end of file
+</Project>
Modified: sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/BindingListExtensions.cs
===================================================================
--- sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/BindingListExtensions.cs 2010-05-25 05:51:31 UTC (rev 4926)
+++ sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/BindingListExtensions.cs 2010-05-25 11:09:13 UTC (rev 4927)
@@ -35,6 +35,7 @@
foreach (T v in list)
{
values[i] = v;
+ i++;
}
return values;
}
Modified: sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI.Http/HttpServerConnection.cs
===================================================================
--- sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI.Http/HttpServerConnection.cs 2010-05-25 05:51:31 UTC (rev 4926)
+++ sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI.Http/HttpServerConnection.cs 2010-05-25 11:09:13 UTC (rev 4927)
@@ -1651,7 +1651,7 @@
public string[] EnumerateDrawingLayers(string resourceID, string sectionName)
{
- string req = m_reqBuilder.EnumerateDrawingLayers(resourceID);
+ string req = m_reqBuilder.EnumerateDrawingLayers(resourceID, sectionName);
using (System.IO.Stream s = this.OpenRead(req))
{
var list = this.DeserializeObject<OSGeo.MapGuide.ObjectModels.Common.StringCollection>(s);
Modified: sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI.Http/RequestBuilder.cs
===================================================================
--- sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI.Http/RequestBuilder.cs 2010-05-25 05:51:31 UTC (rev 4926)
+++ sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI.Http/RequestBuilder.cs 2010-05-25 11:09:13 UTC (rev 4927)
@@ -1400,7 +1400,7 @@
return m_hosturi + "?" + EncodeParameters(param);
}
- public string EnumerateDrawingLayers(string resourceID)
+ public string EnumerateDrawingLayers(string resourceID, string sectionName)
{
NameValueCollection param = new NameValueCollection();
param.Add("OPERATION", "ENUMERATEDRAWINGLAYERS");
@@ -1413,6 +1413,7 @@
param.Add("LOCALE", m_locale);
param.Add("RESOURCEID", resourceID);
+ param.Add("SECTION", sectionName);
return m_hosturi + "?" + EncodeParameters(param);
}
More information about the mapguide-commits
mailing list