[mapguide-commits] r8000 - trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/GridEditor
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Sat Mar 29 11:02:39 PDT 2014
Author: jng
Date: 2014-03-29 11:02:39 -0700 (Sat, 29 Mar 2014)
New Revision: 8000
Modified:
trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/GridEditor/RuleGridView.Designer.cs
trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/GridEditor/RuleGridView.cs
trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/GridEditor/VectorScaleRangeGrid.cs
Log:
#2418: Add support for overpost and text display options for point styles. Also update offsets when loading a composite style grid as theme generation may have changed the offsets.
Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/GridEditor/RuleGridView.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/GridEditor/RuleGridView.Designer.cs 2014-03-29 17:50:27 UTC (rev 7999)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/GridEditor/RuleGridView.Designer.cs 2014-03-29 18:02:39 UTC (rev 8000)
@@ -40,6 +40,8 @@
this.btnAutoRefresh = new System.Windows.Forms.ToolStripButton();
this.btnShowInLegend = new System.Windows.Forms.ToolStripButton();
this.grdRules = new System.Windows.Forms.DataGridView();
+ this.btnDisplayAsText = new System.Windows.Forms.ToolStripButton();
+ this.btnAllowOverpost = new System.Windows.Forms.ToolStripButton();
this.toolStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.grdRules)).BeginInit();
this.SuspendLayout();
@@ -55,7 +57,9 @@
this.toolStripSeparator1,
this.btnRefreshStylePreviews,
this.btnAutoRefresh,
- this.btnShowInLegend});
+ this.btnShowInLegend,
+ this.btnDisplayAsText,
+ this.btnAllowOverpost});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(785, 25);
@@ -118,8 +122,8 @@
this.btnRefreshStylePreviews.Image = global::Maestro.Editors.Properties.Resources.arrow_circle_135;
this.btnRefreshStylePreviews.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btnRefreshStylePreviews.Name = "btnRefreshStylePreviews";
- this.btnRefreshStylePreviews.Size = new System.Drawing.Size(143, 22);
- this.btnRefreshStylePreviews.Text = "Refresh Style Previews";
+ this.btnRefreshStylePreviews.Size = new System.Drawing.Size(115, 22);
+ this.btnRefreshStylePreviews.Text = "Refresh Previews";
this.btnRefreshStylePreviews.Click += new System.EventHandler(this.btnRefreshStylePreviews_Click);
//
// btnAutoRefresh
@@ -160,6 +164,26 @@
this.grdRules.Scroll += new System.Windows.Forms.ScrollEventHandler(this.grdRules_Scroll);
this.grdRules.SelectionChanged += new System.EventHandler(this.grdRules_SelectionChanged);
//
+ // btnDisplayAsText
+ //
+ this.btnDisplayAsText.CheckOnClick = true;
+ this.btnDisplayAsText.Image = global::Maestro.Editors.Properties.Resources.tick;
+ this.btnDisplayAsText.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.btnDisplayAsText.Name = "btnDisplayAsText";
+ this.btnDisplayAsText.Size = new System.Drawing.Size(106, 22);
+ this.btnDisplayAsText.Text = "Display As Text";
+ this.btnDisplayAsText.Click += new System.EventHandler(this.btnDisplayAsText_Click);
+ //
+ // btnAllowOverpost
+ //
+ this.btnAllowOverpost.CheckOnClick = true;
+ this.btnAllowOverpost.Image = global::Maestro.Editors.Properties.Resources.tick;
+ this.btnAllowOverpost.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.btnAllowOverpost.Name = "btnAllowOverpost";
+ this.btnAllowOverpost.Size = new System.Drawing.Size(108, 20);
+ this.btnAllowOverpost.Text = "Allow Overpost";
+ this.btnAllowOverpost.Click += new System.EventHandler(this.btnAllowOverpost_Click);
+ //
// RuleGridView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -189,5 +213,7 @@
private System.Windows.Forms.ToolStripButton btnShowInLegend;
private System.Windows.Forms.ToolStripButton btnRefreshStylePreviews;
private System.Windows.Forms.ToolStripButton btnAutoRefresh;
+ private System.Windows.Forms.ToolStripButton btnDisplayAsText;
+ private System.Windows.Forms.ToolStripButton btnAllowOverpost;
}
}
Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/GridEditor/RuleGridView.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/GridEditor/RuleGridView.cs 2014-03-29 17:50:27 UTC (rev 7999)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/GridEditor/RuleGridView.cs 2014-03-29 18:02:39 UTC (rev 8000)
@@ -132,6 +132,18 @@
btnShowInLegend.Checked = c2.ShowInLegend;
}
+ var pts = style as IPointVectorStyle;
+ if (pts != null)
+ {
+ btnAllowOverpost.Checked = pts.AllowOverpost;
+ btnDisplayAsText.Checked = pts.DisplayAsText;
+ }
+ else
+ {
+ btnAllowOverpost.Visible =
+ btnDisplayAsText.Visible = false;
+ }
+
InitGrid(style is ICompositeTypeStyle);
_editedLayer = (ILayerDefinition)_edSvc.GetEditedResource();
_parentScaleRange = parentRange;
@@ -848,5 +860,19 @@
else if (c2 != null)
c2.ShowInLegend = btnShowInLegend.Checked;
}
+
+ private void btnDisplayAsText_Click(object sender, EventArgs e)
+ {
+ var pts = _style as IPointVectorStyle;
+ if (pts != null)
+ pts.DisplayAsText = btnDisplayAsText.Checked;
+ }
+
+ private void btnAllowOverpost_Click(object sender, EventArgs e)
+ {
+ var pts = _style as IPointVectorStyle;
+ if (pts != null)
+ pts.AllowOverpost = btnAllowOverpost.Checked;
+ }
}
}
Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/GridEditor/VectorScaleRangeGrid.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/GridEditor/VectorScaleRangeGrid.cs 2014-03-29 17:50:27 UTC (rev 7999)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/GridEditor/VectorScaleRangeGrid.cs 2014-03-29 18:02:39 UTC (rev 8000)
@@ -269,19 +269,19 @@
if (!_compositeRuleGrids.ContainsKey(style))
{
var grid = new RuleGridView();
+ grid.Init(_parent.EditorService, _vsr, style);
+ _compositeRuleGrids[style] = grid;
+ }
- if (lstStyles.SelectedIndex >= 0)
+ //Update offset
+ if (lstStyles.SelectedIndex >= 0)
+ {
+ int offset = 0;
+ for (int i = 0; i < lstStyles.SelectedIndex; i++)
{
- int offset = 0;
- for (int i = 0; i < lstStyles.SelectedIndex; i++)
- {
- offset += _cts[i].RuleCount;
- }
- grid.ThemeIndexOffest = offset;
+ offset += _cts[i].RuleCount;
}
-
- grid.Init(_parent.EditorService, _vsr, style);
- _compositeRuleGrids[style] = grid;
+ _compositeRuleGrids[style].ThemeIndexOffest = offset;
}
SetActiveControl(_compositeRuleGrids[style]);
More information about the mapguide-commits
mailing list