[mapguide-commits] r7998 - in trunk/Tools/Maestro/Maestro.Base: Events UI/Preferences
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Sat Mar 29 07:08:54 PDT 2014
Author: jng
Date: 2014-03-29 07:08:54 -0700 (Sat, 29 Mar 2014)
New Revision: 7998
Modified:
trunk/Tools/Maestro/Maestro.Base/Events/EventWatcher.cs
trunk/Tools/Maestro/Maestro.Base/UI/Preferences/ConfigProperties.cs
trunk/Tools/Maestro/Maestro.Base/UI/Preferences/EditorPreferencesCtrl.Designer.cs
trunk/Tools/Maestro/Maestro.Base/UI/Preferences/EditorPreferencesCtrl.cs
Log:
#2418: Expose option to use Grid-based style editor in options UI.
Modified: trunk/Tools/Maestro/Maestro.Base/Events/EventWatcher.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Events/EventWatcher.cs 2014-03-29 14:00:46 UTC (rev 7997)
+++ trunk/Tools/Maestro/Maestro.Base/Events/EventWatcher.cs 2014-03-29 14:08:54 UTC (rev 7998)
@@ -30,6 +30,7 @@
using Maestro.Shared.UI;
using Maestro.Base.UI.Preferences;
using Maestro.Editors.Preview;
+using Maestro.Editors.LayerDefinition;
namespace Maestro.Base.Events
{
@@ -69,6 +70,10 @@
PreviewSettings.UseAjaxViewer = (e.NewValue.ToString() == "AJAX"); //NOXLATE
LoggingService.Info("Use AJAX Viewer setting is now: " + PreviewSettings.UseAjaxViewer);
break;
+ case ConfigProperties.UseGridStyleEditor:
+ LayerEditorSettings.UseGridEditor = Convert.ToBoolean(e.NewValue);
+ LoggingService.Info("Use Grid Style Editor is now: " + LayerEditorSettings.UseGridEditor);
+ break;
}
}
Modified: trunk/Tools/Maestro/Maestro.Base/UI/Preferences/ConfigProperties.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/UI/Preferences/ConfigProperties.cs 2014-03-29 14:00:46 UTC (rev 7997)
+++ trunk/Tools/Maestro/Maestro.Base/UI/Preferences/ConfigProperties.cs 2014-03-29 14:08:54 UTC (rev 7998)
@@ -112,6 +112,11 @@
/// </summary>
public const string LiveMapEditorPath = "General.LiveMapEditorPath"; //NOXLATE
+ /// <summary>
+ /// Indicates whether to use the new grid-based style editor or the classic control-based style editor
+ /// </summary>
+ public const string UseGridStyleEditor = "Editor.UseGridStyleEditor";
+
internal static void ApplyDefaults()
{
ApplyGeneralDefaults();
@@ -124,6 +129,7 @@
Props.Set(ConfigProperties.ValidateOnSave, DefaultValidateOnSave);
Props.Set(ConfigProperties.XsdSchemaPath, DefaultXsdSchemaPath);
Props.Set(ConfigProperties.UseLocalPreview, DefaultUseLocalPreview);
+ Props.Set(ConfigProperties.UseGridStyleEditor, DefaultUseGridStyleEditor);
}
internal static void ApplyGeneralDefaults()
@@ -182,6 +188,11 @@
public static bool DefaultAddDebugWatermark { get { return true; } }
/// <summary>
+ /// Default setting for using grid style editor
+ /// </summary>
+ public static bool DefaultUseGridStyleEditor { get { return true; } }
+
+ /// <summary>
/// Default color for open resources in the Site Explorer
/// </summary>
public static Color DefaultOpenColor { get { return Color.LightGreen; } }
Modified: trunk/Tools/Maestro/Maestro.Base/UI/Preferences/EditorPreferencesCtrl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/UI/Preferences/EditorPreferencesCtrl.Designer.cs 2014-03-29 14:00:46 UTC (rev 7997)
+++ trunk/Tools/Maestro/Maestro.Base/UI/Preferences/EditorPreferencesCtrl.Designer.cs 2014-03-29 14:08:54 UTC (rev 7998)
@@ -29,6 +29,7 @@
private void InitializeComponent()
{
this.groupBox4 = new System.Windows.Forms.GroupBox();
+ this.chkAddDebugWatermark = new System.Windows.Forms.CheckBox();
this.chkUseLocalPreview = new System.Windows.Forms.CheckBox();
this.chkValidateOnSave = new System.Windows.Forms.CheckBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
@@ -38,10 +39,12 @@
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.txtPreviewLocale = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
- this.chkAddDebugWatermark = new System.Windows.Forms.CheckBox();
+ this.groupBox3 = new System.Windows.Forms.GroupBox();
+ this.chkUseGridBasedStyleEditor = new System.Windows.Forms.CheckBox();
this.groupBox4.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
+ this.groupBox3.SuspendLayout();
this.SuspendLayout();
//
// groupBox4
@@ -58,6 +61,17 @@
this.groupBox4.TabStop = false;
this.groupBox4.Text = "General";
//
+ // chkAddDebugWatermark
+ //
+ this.chkAddDebugWatermark.AutoSize = true;
+ this.chkAddDebugWatermark.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.chkAddDebugWatermark.Location = new System.Drawing.Point(19, 42);
+ this.chkAddDebugWatermark.Name = "chkAddDebugWatermark";
+ this.chkAddDebugWatermark.Size = new System.Drawing.Size(290, 17);
+ this.chkAddDebugWatermark.TabIndex = 4;
+ this.chkAddDebugWatermark.Text = "Add Debug Watermark for generated resource previews";
+ this.chkAddDebugWatermark.UseVisualStyleBackColor = true;
+ //
// chkUseLocalPreview
//
this.chkUseLocalPreview.AutoSize = true;
@@ -154,21 +168,33 @@
this.label1.TabIndex = 0;
this.label1.Text = "Preview using the following locale";
//
- // chkAddDebugWatermark
+ // groupBox3
//
- this.chkAddDebugWatermark.AutoSize = true;
- this.chkAddDebugWatermark.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.chkAddDebugWatermark.Location = new System.Drawing.Point(19, 42);
- this.chkAddDebugWatermark.Name = "chkAddDebugWatermark";
- this.chkAddDebugWatermark.Size = new System.Drawing.Size(290, 17);
- this.chkAddDebugWatermark.TabIndex = 4;
- this.chkAddDebugWatermark.Text = "Add Debug Watermark for generated resource previews";
- this.chkAddDebugWatermark.UseVisualStyleBackColor = true;
+ this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBox3.Controls.Add(this.chkUseGridBasedStyleEditor);
+ this.groupBox3.Location = new System.Drawing.Point(3, 223);
+ this.groupBox3.Name = "groupBox3";
+ this.groupBox3.Size = new System.Drawing.Size(398, 51);
+ this.groupBox3.TabIndex = 13;
+ this.groupBox3.TabStop = false;
+ this.groupBox3.Text = "Layer Editor";
//
+ // chkGridBaseStyleEditor
+ //
+ this.chkUseGridBasedStyleEditor.AutoSize = true;
+ this.chkUseGridBasedStyleEditor.Location = new System.Drawing.Point(18, 19);
+ this.chkUseGridBasedStyleEditor.Name = "chkGridBaseStyleEditor";
+ this.chkUseGridBasedStyleEditor.Size = new System.Drawing.Size(152, 17);
+ this.chkUseGridBasedStyleEditor.TabIndex = 0;
+ this.chkUseGridBasedStyleEditor.Text = "Use Grid-based style editor";
+ this.chkUseGridBasedStyleEditor.UseVisualStyleBackColor = true;
+ //
// EditorPreferencesCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox4);
@@ -180,6 +206,8 @@
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
+ this.groupBox3.ResumeLayout(false);
+ this.groupBox3.PerformLayout();
this.ResumeLayout(false);
}
@@ -197,5 +225,7 @@
private System.Windows.Forms.Label label1;
private System.Windows.Forms.CheckBox chkUseLocalPreview;
private System.Windows.Forms.CheckBox chkAddDebugWatermark;
+ private System.Windows.Forms.GroupBox groupBox3;
+ private System.Windows.Forms.CheckBox chkUseGridBasedStyleEditor;
}
}
Modified: trunk/Tools/Maestro/Maestro.Base/UI/Preferences/EditorPreferencesCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/UI/Preferences/EditorPreferencesCtrl.cs 2014-03-29 14:00:46 UTC (rev 7997)
+++ trunk/Tools/Maestro/Maestro.Base/UI/Preferences/EditorPreferencesCtrl.cs 2014-03-29 14:08:54 UTC (rev 7998)
@@ -44,6 +44,9 @@
var path = Props.Get(ConfigProperties.XsdSchemaPath, ConfigProperties.DefaultXsdSchemaPath);
txtXsdPath.Text = path;
+ var useGrid = Props.Get(ConfigProperties.UseGridStyleEditor, ConfigProperties.DefaultUseGridStyleEditor);
+ chkUseGridBasedStyleEditor.Checked = useGrid;
+
txtPreviewLocale.Text = Props.Get(ConfigProperties.PreviewLocale, ConfigProperties.DefaultPreviewLocale);
}
@@ -65,6 +68,7 @@
Apply(ConfigProperties.UseLocalPreview, chkUseLocalPreview.Checked);
Apply(ConfigProperties.AddDebugWatermark, chkAddDebugWatermark.Checked);
Apply(ConfigProperties.PreviewLocale, txtPreviewLocale.Text);
+ Apply(ConfigProperties.UseGridStyleEditor, chkUseGridBasedStyleEditor.Checked);
//These changes require restart
if (Apply(ConfigProperties.XsdSchemaPath, txtXsdPath.Text))
More information about the mapguide-commits
mailing list