7 changed files with 96 additions and 146 deletions
@ -1,93 +0,0 @@
@@ -1,93 +0,0 @@
|
||||
<System.Windows.Forms.UserControl> |
||||
<DataBindings value="System.Windows.Forms.ControlBindingsCollection" /> |
||||
<SnapToGrid value="True" /> |
||||
<Size value="{Width=400, Height=256}" /> |
||||
<DrawGrid value="True" /> |
||||
<Name value="CreatedObject0" /> |
||||
<DockPadding value="" /> |
||||
<GridSize value="{Width=8, Height=8}" /> |
||||
<Controls> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Text value="${res:Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.CommentGenerationOptionsGroupBox}" /> |
||||
<Size value="{Width=384, Height=80}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<DataBindings value="System.Windows.Forms.ControlBindingsCollection" /> |
||||
<Location value="{X=8,Y=136}" /> |
||||
<TabIndex value="1" /> |
||||
<Name value="commentGeneratingGroupBox" /> |
||||
<Controls> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="generateAdditonalCommentsCheckBox" /> |
||||
<TabIndex value="1" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Text value="${res:Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.GenerateAdditionalCommentsCheckBox}" /> |
||||
<Size value="{Width=368, Height=24}" /> |
||||
<Location value="{X=8,Y=48}" /> |
||||
<DataBindings value="System.Windows.Forms.ControlBindingsCollection" /> |
||||
<Controls /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="generateDocCommentsCheckBox" /> |
||||
<TabIndex value="0" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Text value="${res:Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.GenerateDocCommentsCheckBox}" /> |
||||
<Size value="{Width=368, Height=24}" /> |
||||
<Location value="{X=8,Y=24}" /> |
||||
<DataBindings value="System.Windows.Forms.ControlBindingsCollection" /> |
||||
<Controls /> |
||||
</System.Windows.Forms.CheckBox> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Text value="${res:Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.CodeGenerationOptionsGroupBox}" /> |
||||
<Size value="{Width=384, Height=120}" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Name value="codeGenerationGroupBox" /> |
||||
<DataBindings value="System.Windows.Forms.ControlBindingsCollection" /> |
||||
<Location value="{X=8,Y=8}" /> |
||||
<TabIndex value="0" /> |
||||
<Controls> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="useFullTypeNamesCheckBox" /> |
||||
<TabIndex value="3" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Text value="${res:Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.UseFullTypeNamesCheckBox}" /> |
||||
<Size value="{Width=368, Height=24}" /> |
||||
<Location value="{X=8,Y=88}" /> |
||||
<DataBindings value="System.Windows.Forms.ControlBindingsCollection" /> |
||||
<Controls /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="blankLinesBetweenMemberCheckBox" /> |
||||
<TabIndex value="2" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Text value="${res:Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.BlankLinesBetweenMembersCheckBox}" /> |
||||
<Size value="{Width=368, Height=24}" /> |
||||
<Location value="{X=8,Y=64}" /> |
||||
<DataBindings value="System.Windows.Forms.ControlBindingsCollection" /> |
||||
<Controls /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="elseOnClosingCheckbox" /> |
||||
<TabIndex value="1" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Text value="${res:Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.ElseOnClosingCheckBox}" /> |
||||
<Size value="{Width=368, Height=24}" /> |
||||
<Location value="{X=8,Y=40}" /> |
||||
<DataBindings value="System.Windows.Forms.ControlBindingsCollection" /> |
||||
<Controls /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="startBlockOnTheSameLineCheckBox" /> |
||||
<TabIndex value="0" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Text value="${res:Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.StartBlockOnTheSameLineCheckBox}" /> |
||||
<Size value="{Width=368, Height=24}" /> |
||||
<Location value="{X=8,Y=16}" /> |
||||
<DataBindings value="System.Windows.Forms.ControlBindingsCollection" /> |
||||
<Controls /> |
||||
</System.Windows.Forms.CheckBox> |
||||
</Controls> |
||||
</System.Windows.Forms.GroupBox> |
||||
</Controls> |
||||
</System.Windows.Forms.UserControl> |
@ -1,42 +0,0 @@
@@ -1,42 +0,0 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
using System; |
||||
using System.Windows.Forms; |
||||
using ICSharpCode.Core; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels |
||||
{ |
||||
public class CodeGenerationPanel : XmlFormsOptionPanel |
||||
{ |
||||
static readonly string codeGenerationProperty = "SharpDevelop.UI.CodeGenerationOptions"; |
||||
|
||||
public override void LoadPanelContents() |
||||
{ |
||||
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.CodeGenerationOptionsPanel.xfrm")); |
||||
|
||||
Properties p = (Properties)PropertyService.Get(codeGenerationProperty, new Properties()); |
||||
|
||||
((CheckBox)ControlDictionary["generateAdditonalCommentsCheckBox"]).Checked = p.Get("GenerateAdditionalComments", true); |
||||
((CheckBox)ControlDictionary["generateDocCommentsCheckBox"]).Checked = p.Get("GenerateDocumentComments", true); |
||||
((CheckBox)ControlDictionary["useFullTypeNamesCheckBox"]).Checked = p.Get("UseFullyQualifiedNames", true); |
||||
|
||||
((CheckBox)ControlDictionary["blankLinesBetweenMemberCheckBox"]).Checked = p.Get("BlankLinesBetweenMembers", true); |
||||
((CheckBox)ControlDictionary["elseOnClosingCheckbox"]).Checked = p.Get("ElseOnClosing", true); |
||||
((CheckBox)ControlDictionary["startBlockOnTheSameLineCheckBox"]).Checked = p.Get("StartBlockOnSameLine", true); |
||||
} |
||||
|
||||
public override bool StorePanelContents() |
||||
{ |
||||
Properties p = (Properties)PropertyService.Get(codeGenerationProperty, new Properties()); |
||||
p.Set("GenerateAdditionalComments", ((CheckBox)ControlDictionary["generateAdditonalCommentsCheckBox"]).Checked); |
||||
p.Set("GenerateDocumentComments", ((CheckBox)ControlDictionary["generateDocCommentsCheckBox"]).Checked); |
||||
p.Set("UseFullyQualifiedNames", ((CheckBox)ControlDictionary["useFullTypeNamesCheckBox"]).Checked); |
||||
p.Set("BlankLinesBetweenMembers", ((CheckBox)ControlDictionary["blankLinesBetweenMemberCheckBox"]).Checked); |
||||
p.Set("ElseOnClosing", ((CheckBox)ControlDictionary["elseOnClosingCheckbox"]).Checked); |
||||
p.Set("StartBlockOnSameLine", ((CheckBox)ControlDictionary["startBlockOnTheSameLineCheckBox"]).Checked); |
||||
PropertyService.Set(codeGenerationProperty, p); |
||||
return true; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,33 @@
@@ -0,0 +1,33 @@
|
||||
<gui:OptionPanel x:Class="ICSharpCode.SharpDevelop.Gui.OptionPanels.CodeGenerationPanel" |
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui" |
||||
xmlns:core="http://icsharpcode.net/sharpdevelop/core"> |
||||
<Grid> |
||||
<StackPanel> |
||||
<GroupBox Margin="0,4,0,0" |
||||
Header="{core:Localize Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.CodeGenerationOptionsGroupBox}"> |
||||
<StackPanel> |
||||
<CheckBox x:Name="startBlockOnTheSameLineCheckBox" Margin="0,6,0,0" |
||||
Content="{core:Localize Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.StartBlockOnTheSameLineCheckBox}"></CheckBox> |
||||
<CheckBox x:Name="elseOnClosingCheckbox" Margin="0,6,0,0" |
||||
Content="{core:Localize Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.ElseOnClosingCheckBox}"></CheckBox> |
||||
<CheckBox x:Name="blankLinesBetweenMemberCheckBox" Margin="0,6,0,0" |
||||
Content="{core:Localize Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.BlankLinesBetweenMembersCheckBox}"></CheckBox> |
||||
<CheckBox x:Name="useFullTypeNamesCheckBox" Margin="0,6,0,0" |
||||
Content="{core:Localize Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.UseFullTypeNamesCheckBox}"></CheckBox> |
||||
</StackPanel> |
||||
</GroupBox> |
||||
|
||||
<GroupBox Margin="0,8,0,0" |
||||
Header="{core:Localize Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.CommentGenerationOptionsGroupBox}"> |
||||
<StackPanel> |
||||
<CheckBox x:Name="generateDocCommentsCheckBox" Margin="0,6,0,0" |
||||
Content="{core:Localize Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.GenerateDocCommentsCheckBox}"></CheckBox> |
||||
<CheckBox x:Name="generateAdditonalCommentsCheckBox" Margin="0,6,0,0" |
||||
Content="{core:Localize Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.GenerateAdditionalCommentsCheckBox}"></CheckBox> |
||||
</StackPanel> |
||||
</GroupBox> |
||||
</StackPanel> |
||||
</Grid> |
||||
</gui:OptionPanel> |
@ -0,0 +1,55 @@
@@ -0,0 +1,55 @@
|
||||
/* |
||||
* Created by SharpDevelop. |
||||
* User: Peter Forstmeier |
||||
* Date: 31.03.2012 |
||||
* Time: 19:24 |
||||
* To change this template use Tools | Options | Coding | Edit Standard Headers. |
||||
*/ |
||||
using System; |
||||
using ICSharpCode.Core; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels |
||||
{ |
||||
/// <summary>
|
||||
/// Interaction logic for CodeGenerationPanelXaml.xaml
|
||||
/// </summary>
|
||||
public partial class CodeGenerationPanel : OptionPanel |
||||
{ |
||||
static readonly string codeGenerationProperty = "SharpDevelop.UI.CodeGenerationOptions"; |
||||
|
||||
public CodeGenerationPanel() |
||||
{ |
||||
InitializeComponent(); |
||||
} |
||||
|
||||
|
||||
public override void LoadOptions() |
||||
{ |
||||
Properties p = (Properties)PropertyService.Get(codeGenerationProperty, new Properties()); |
||||
|
||||
startBlockOnTheSameLineCheckBox.IsChecked = p.Get("StartBlockOnSameLine", true); |
||||
elseOnClosingCheckbox.IsChecked = p.Get("ElseOnClosing", true); |
||||
blankLinesBetweenMemberCheckBox.IsChecked = p.Get("BlankLinesBetweenMembers", true); |
||||
useFullTypeNamesCheckBox.IsChecked = p.Get("UseFullyQualifiedNames", true); |
||||
|
||||
generateDocCommentsCheckBox.IsChecked = p.Get("GenerateDocumentComments", true); |
||||
generateAdditonalCommentsCheckBox.IsChecked = p.Get("GenerateAdditionalComments", true); |
||||
} |
||||
|
||||
|
||||
public override bool SaveOptions() |
||||
{ |
||||
Properties p = (Properties)PropertyService.Get(codeGenerationProperty, new Properties()); |
||||
p.Set("StartBlockOnSameLine", startBlockOnTheSameLineCheckBox.IsChecked); |
||||
p.Set("ElseOnClosing", elseOnClosingCheckbox.IsChecked); |
||||
p.Set("BlankLinesBetweenMembers", blankLinesBetweenMemberCheckBox.IsChecked); |
||||
p.Set("UseFullyQualifiedNames", useFullTypeNamesCheckBox.IsChecked); |
||||
|
||||
p.Set("GenerateDocumentComments", generateDocCommentsCheckBox.IsChecked); |
||||
p.Set("GenerateAdditionalComments", generateAdditonalCommentsCheckBox.IsChecked); |
||||
|
||||
PropertyService.Set(codeGenerationProperty, p); |
||||
return true; |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue