From 50a384e2824844ab980d7c030e808da88d836941 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Wed, 4 Oct 2006 18:17:20 +0000 Subject: [PATCH] Set UseSmartTags default value to true. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1881 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Src/Gui/OptionPanels/GeneralOptions.cs | 28 +++++++++++++++---- .../Src/Services/DesignerOptionService.cs | 5 ++-- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/OptionPanels/GeneralOptions.cs b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/OptionPanels/GeneralOptions.cs index 707fba8df4..353805ad29 100644 --- a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/OptionPanels/GeneralOptions.cs +++ b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/OptionPanels/GeneralOptions.cs @@ -26,12 +26,30 @@ namespace ICSharpCode.FormsDesigner.Gui.OptionPanels ((CheckBox)ControlDictionary["sortAlphabeticalCheckBox"]).Checked = PropertyService.Get("FormsDesigner.DesignerOptions.PropertyGridSortAlphabetical", false); ((CheckBox)ControlDictionary["optimizedCodeGenerationCheckBox"]).Checked = PropertyService.Get("FormsDesigner.DesignerOptions.UseOptimizedCodeGeneration", true); - ((CheckBox)ControlDictionary["smartTagAutoShowCheckBox"]).Checked = PropertyService.Get("FormsDesigner.DesignerOptions.ObjectBoundSmartTagAutoShow", true); + ((CheckBox)ControlDictionary["smartTagAutoShowCheckBox"]).Checked = SmartTagAutoShow; ((CheckBox)ControlDictionary["inPlaceEditCheckBox"]).Checked = PropertyService.Get("FormsDesigner.DesignerOptions.EnableInSituEditing", true); - ((CheckBox)ControlDictionary["useSmartTagsCheckBox"]).Checked = PropertyService.Get("FormsDesigner.DesignerOptions.UseSmartTags", true); + ((CheckBox)ControlDictionary["useSmartTagsCheckBox"]).Checked = UseSmartTags; ((CheckBox)ControlDictionary["insertTodoCommentCheckBox"]).Checked = InsertTodoComment; } + public static bool UseSmartTags { + get { + return PropertyService.Get("FormsDesigner.DesignerOptions.UseSmartTags", true); + } + set { + PropertyService.Set("FormsDesigner.DesignerOptions.UseSmartTags", value); + } + } + + public static bool SmartTagAutoShow { + get { + return PropertyService.Get("FormsDesigner.DesignerOptions.ObjectBoundSmartTagAutoShow", true); + } + set { + PropertyService.Set("FormsDesigner.DesignerOptions.ObjectBoundSmartTagAutoShow", value); + } + } + public static bool InsertTodoComment { get { return PropertyService.Get("FormsDesigner.DesignerOptions.InsertTodoComment", false); @@ -44,10 +62,10 @@ namespace ICSharpCode.FormsDesigner.Gui.OptionPanels public override bool StorePanelContents() { PropertyService.Set("FormsDesigner.DesignerOptions.PropertyGridSortAlphabetical", ((CheckBox)ControlDictionary["sortAlphabeticalCheckBox"]).Checked); - PropertyService.Set("FormsDesigner.DesignerOptions.UseOptimizedCodeGeneration", ((CheckBox)ControlDictionary["optimizedCodeGenerationCheckBox"]).Checked); - PropertyService.Set("FormsDesigner.DesignerOptions.ObjectBoundSmartTagAutoShow", ((CheckBox)ControlDictionary["smartTagAutoShowCheckBox"]).Checked); + PropertyService.Set("FormsDesigner.DesignerOptions.UseOptimizedCodeGeneration", ((CheckBox)ControlDictionary["optimizedCodeGenerationCheckBox"]).Checked); + SmartTagAutoShow = ((CheckBox)ControlDictionary["smartTagAutoShowCheckBox"]).Checked; PropertyService.Set("FormsDesigner.DesignerOptions.EnableInSituEditing", ((CheckBox)ControlDictionary["inPlaceEditCheckBox"]).Checked); - PropertyService.Set("FormsDesigner.DesignerOptions.UseSmartTags", ((CheckBox)ControlDictionary["useSmartTagsCheckBox"]).Checked); + UseSmartTags = ((CheckBox)ControlDictionary["useSmartTagsCheckBox"]).Checked; InsertTodoComment = ((CheckBox)ControlDictionary["insertTodoCommentCheckBox"]).Checked; return true; diff --git a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/DesignerOptionService.cs b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/DesignerOptionService.cs index 2a38dd8c08..0b76dfee30 100644 --- a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/DesignerOptionService.cs +++ b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/DesignerOptionService.cs @@ -11,6 +11,7 @@ using System.Drawing; using System.ComponentModel.Design; using System.Windows.Forms.Design; using ICSharpCode.Core; +using ICSharpCode.FormsDesigner.Gui.OptionPanels; namespace ICSharpCode.FormsDesigner.Services { @@ -35,11 +36,11 @@ namespace ICSharpCode.FormsDesigner.Services this.showGrid = PropertyService.Get("FormsDesigner.DesignerOptions.ShowGrid", true); this.snapToGrid = PropertyService.Get("FormsDesigner.DesignerOptions.SnapToGrid", true); - this.useSmartTags = PropertyService.Get("FormsDesigner.DesignerOptions.UseSmartTags", false); + this.useSmartTags = GeneralOptionsPanel.UseSmartTags; this.useSnapLines = PropertyService.Get("FormsDesigner.DesignerOptions.UseSnapLines", true); this.enableInSituEditing = PropertyService.Get("FormsDesigner.DesignerOptions.EnableInSituEditing", true); - this.objectBoundSmartTagAutoShow = PropertyService.Get("FormsDesigner.DesignerOptions.ObjectBoundSmartTagAutoShow", true); + this.objectBoundSmartTagAutoShow = GeneralOptionsPanel.SmartTagAutoShow; this.useOptimizedCodeGeneration = PropertyService.Get("FormsDesigner.DesignerOptions.UseOptimizedCodeGeneration", true); }