Browse Source

Cleanup

pull/30/head
PeterForstmeier 13 years ago
parent
commit
f3f58ba296
  1. 2
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/Designer/BooDesignerGenerator.cs
  2. 2
      src/AddIns/DisplayBindings/FormsDesigner/Project/FormsDesigner.addin
  3. 6
      src/AddIns/DisplayBindings/FormsDesigner/Project/FormsDesigner.csproj
  4. 2
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerGenerator/CSharpDesignerGenerator.cs
  5. 2
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerGenerator/VBNetDesignerGenerator.cs
  6. 2
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/OptionPanels/GeneralOptionsPanel.xaml
  7. 94
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/OptionPanels/GeneralOptionsPanel.xaml.cs
  8. 4
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/DesignerOptionService.cs
  9. 2
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/EventBindingService.cs

2
src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/Designer/BooDesignerGenerator.cs

@ -111,7 +111,7 @@ namespace Grunwald.BooBinding.Designer @@ -111,7 +111,7 @@ namespace Grunwald.BooBinding.Designer
b.AppendLine(indentation);
b.AppendLine(indentation + "private def " + eventMethodName + "(" + param + "):");
if (string.IsNullOrEmpty(body)) {
if (ICSharpCode.FormsDesigner.Gui.OptionPanels.GeneralOptionsPanelXaml.InsertTodoComment) {
if (ICSharpCode.FormsDesigner.Gui.OptionPanels.GeneralOptionsPanel.InsertTodoComment) {
body = "// TODO: Implement " + eventMethodName;
}
}

2
src/AddIns/DisplayBindings/FormsDesigner/Project/FormsDesigner.addin

@ -306,7 +306,7 @@ @@ -306,7 +306,7 @@
<OptionPanel id = "GeneralOptions1"
label = "${res:ICSharpCode.SharpDevelop.FormDesigner.Gui.OptionPanels.GeneralOptionsPanel.PanelName}"
class = "ICSharpCode.FormsDesigner.Gui.OptionPanels.GeneralOptionsPanelXaml"/>
class = "ICSharpCode.FormsDesigner.Gui.OptionPanels.GeneralOptionsPanel"/>
<OptionPanel id = "GridOptions"
label = "${res:ICSharpCode.SharpDevelop.FormDesigner.Gui.OptionPanels.GridOptionsPanel.PanelName}"

6
src/AddIns/DisplayBindings/FormsDesigner/Project/FormsDesigner.csproj

@ -84,8 +84,8 @@ @@ -84,8 +84,8 @@
<Compile Include="Src\Gui\ImageResourceEditorDialog.Designer.cs">
<DependentUpon>ImageResourceEditorDialog.cs</DependentUpon>
</Compile>
<Compile Include="Src\Gui\OptionPanels\GeneralOptionsPanelXaml.xaml.cs">
<DependentUpon>GeneralOptionsPanelXaml.xaml</DependentUpon>
<Compile Include="Src\Gui\OptionPanels\GeneralOptionsPanel.xaml.cs">
<DependentUpon>GeneralOptionsPanel.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Src\Gui\OptionPanels\GridOptionsPanel.xaml.cs">
@ -192,7 +192,7 @@ @@ -192,7 +192,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Page Include="Src\Gui\OptionPanels\GeneralOptionsPanelXaml.xaml" />
<Page Include="Src\Gui\OptionPanels\GeneralOptionsPanel.xaml" />
<Page Include="Src\Gui\OptionPanels\GridOptionsPanel.xaml" />
<Page Include="Src\Gui\OptionPanels\LocalizationModelOptionsPanel.xaml" />
</ItemGroup>

2
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerGenerator/CSharpDesignerGenerator.cs

@ -31,7 +31,7 @@ namespace ICSharpCode.FormsDesigner @@ -31,7 +31,7 @@ namespace ICSharpCode.FormsDesigner
b.AppendLine(indentation + "void " + eventMethodName + "(" + param + ")");
b.AppendLine(indentation + "{");
if (string.IsNullOrEmpty(body)) {
if (ICSharpCode.FormsDesigner.Gui.OptionPanels.GeneralOptionsPanelXaml.InsertTodoComment) {
if (ICSharpCode.FormsDesigner.Gui.OptionPanels.GeneralOptionsPanel.InsertTodoComment) {
body = "// TODO: Implement " + eventMethodName;
}
}

2
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerGenerator/VBNetDesignerGenerator.cs

@ -49,7 +49,7 @@ namespace ICSharpCode.FormsDesigner @@ -49,7 +49,7 @@ namespace ICSharpCode.FormsDesigner
b.AppendLine(indentation);
b.AppendLine(indentation + "Sub " + eventMethodName + "(" + param + ")");
if (string.IsNullOrEmpty(body)) {
if (ICSharpCode.FormsDesigner.Gui.OptionPanels.GeneralOptionsPanelXaml.InsertTodoComment) {
if (ICSharpCode.FormsDesigner.Gui.OptionPanels.GeneralOptionsPanel.InsertTodoComment) {
body = "' TODO: Implement " + eventMethodName;
}
}

2
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/OptionPanels/GeneralOptionsPanelXaml.xaml → src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/OptionPanels/GeneralOptionsPanel.xaml

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
<gui:OptionPanel x:Class="ICSharpCode.FormsDesigner.Gui.OptionPanels.GeneralOptionsPanelXaml"
<gui:OptionPanel x:Class="ICSharpCode.FormsDesigner.Gui.OptionPanels.GeneralOptionsPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:core="http://icsharpcode.net/sharpdevelop/core"
xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui;assembly=ICSharpCode.SharpDevelop"

94
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/OptionPanels/GeneralOptionsPanel.xaml.cs

@ -0,0 +1,94 @@ @@ -0,0 +1,94 @@
/*
* Created by SharpDevelop.
* User: Peter Forstmeier
* Date: 01.05.2012
* Time: 18:31
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Windows;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui;
namespace ICSharpCode.FormsDesigner.Gui.OptionPanels
{
/// <summary>
/// Interaction logic for GeneralOptionsPanelXaml.xaml
/// </summary>
public partial class GeneralOptionsPanel : OptionPanel
{
public GeneralOptionsPanel()
{
InitializeComponent();
}
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);
}
set {
PropertyService.Set("FormsDesigner.DesignerOptions.InsertTodoComment", value);
}
}
public static bool GenerateVisualStudioStyleEventHandlers {
get {
return PropertyService.Get("FormsDesigner.DesignerOptions.GenerateVisualStudioStyleEventHandlers", false);
}
set {
PropertyService.Set("FormsDesigner.DesignerOptions.GenerateVisualStudioStyleEventHandlers", value);
}
}
public override bool SaveOptions()
{
PropertyService.Set("FormsDesigner.DesignerOptions.PropertyGridSortAlphabetical", sortAlphabeticalCheckBox.IsChecked);
PropertyService.Set("FormsDesigner.DesignerOptions.UseOptimizedCodeGeneration", optimizedCodeGenerationCheckBox.IsChecked);
SmartTagAutoShow = (bool)this.smartTagAutoShowCheckBox.IsChecked;
PropertyService.Set("FormsDesigner.DesignerOptions.EnableInSituEditing", inPlaceEditCheckBox.IsChecked);
UseSmartTags = (bool)useSmartTagsCheckBox.IsChecked;
InsertTodoComment = (bool)insertTodoCommentCheckBox.IsChecked;
GenerateVisualStudioStyleEventHandlers = (bool)generateVSStyleHandlersCheckBox.IsChecked;
return true;
}
public override void LoadOptions()
{
base.LoadOptions();
Initialize();
}
private void Initialize()
{
this.sortAlphabeticalCheckBox.IsChecked = PropertyService.Get("FormsDesigner.DesignerOptions.PropertyGridSortAlphabetical", false);
this.optimizedCodeGenerationCheckBox.IsChecked = PropertyService.Get("FormsDesigner.DesignerOptions.UseOptimizedCodeGeneration", true);
this.smartTagAutoShowCheckBox.IsChecked = SmartTagAutoShow;
this.inPlaceEditCheckBox.IsChecked = PropertyService.Get("FormsDesigner.DesignerOptions.EnableInSituEditing", true);
this.useSmartTagsCheckBox.IsChecked = UseSmartTags;
this.insertTodoCommentCheckBox.IsChecked = InsertTodoComment;
this.generateVSStyleHandlersCheckBox.IsChecked = GenerateVisualStudioStyleEventHandlers;
}
}
}

4
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/DesignerOptionService.cs

@ -31,11 +31,11 @@ namespace ICSharpCode.FormsDesigner.Services @@ -31,11 +31,11 @@ namespace ICSharpCode.FormsDesigner.Services
this.showGrid = PropertyService.Get("FormsDesigner.DesignerOptions.ShowGrid", true);
this.snapToGrid = PropertyService.Get("FormsDesigner.DesignerOptions.SnapToGrid", true);
this.useSmartTags = GeneralOptionsPanelXaml.UseSmartTags;
this.useSmartTags = GeneralOptionsPanel.UseSmartTags;
this.useSnapLines = PropertyService.Get("FormsDesigner.DesignerOptions.UseSnapLines", true);
this.enableInSituEditing = PropertyService.Get("FormsDesigner.DesignerOptions.EnableInSituEditing", true);
this.objectBoundSmartTagAutoShow = GeneralOptionsPanelXaml.SmartTagAutoShow;
this.objectBoundSmartTagAutoShow = GeneralOptionsPanel.SmartTagAutoShow;
this.useOptimizedCodeGeneration = PropertyService.Get("FormsDesigner.DesignerOptions.UseOptimizedCodeGeneration", true);
}

2
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/EventBindingService.cs

@ -40,7 +40,7 @@ namespace ICSharpCode.FormsDesigner.Services @@ -40,7 +40,7 @@ namespace ICSharpCode.FormsDesigner.Services
string GetEventHandlerNameFormat()
{
if (GeneralOptionsPanelXaml.GenerateVisualStudioStyleEventHandlers) {
if (GeneralOptionsPanel.GenerateVisualStudioStyleEventHandlers) {
return "{0}_{1}";
}
return "{0}{1}";

Loading…
Cancel
Save