Browse Source

Cleanup

pull/30/head
PeterForstmeier 13 years ago
parent
commit
6d868f9b7b
  1. 6
      src/Main/Base/Project/ICSharpCode.SharpDevelop.addin
  2. 10
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  3. 79
      src/Main/Base/Project/Resources/old_SelectStylePanel.xfrm
  4. 2
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/SelectStylePanel.xaml
  5. 67
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/SelectStylePanel.xaml.cs
  6. 44
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/old_SelectStylePanel.cs

6
src/Main/Base/Project/ICSharpCode.SharpDevelop.addin

@ -1182,11 +1182,7 @@
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.SelectCulturePanel"/> class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.SelectCulturePanel"/>
<OptionPanel id = "SelectStyle" <OptionPanel id = "SelectStyle"
label = "${res:Dialog.Options.IDEOptions.SelectVisualStyle.PanelName}" label = "${res:Dialog.Options.IDEOptions.SelectVisualStyle.PanelName}"
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.SelectStylePanel"/> class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.SelectStylePanel"/>
<OptionPanel id = "SelectStyleXaml"
label = "${res:Dialog.Options.IDEOptions.SelectVisualStyle.PanelName}"
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.SelectStylePanelXaml"/>
<OptionPanel id = "LoadSave" <OptionPanel id = "LoadSave"
label = "${res:Dialog.Options.IDEOptions.LoadSaveOptions.PanelName}" label = "${res:Dialog.Options.IDEOptions.LoadSaveOptions.PanelName}"
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.LoadSaveOptions"/> class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.LoadSaveOptions"/>

10
src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj

@ -253,8 +253,8 @@
<DependentUpon>SelectCulturePanel.xaml</DependentUpon> <DependentUpon>SelectCulturePanel.xaml</DependentUpon>
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="Src\Gui\Dialogs\OptionPanels\IDEOptions\SelectStylePanelXaml.xaml.cs"> <Compile Include="Src\Gui\Dialogs\OptionPanels\IDEOptions\SelectStylePanel.xaml.cs">
<DependentUpon>SelectStylePanelXaml.xaml</DependentUpon> <DependentUpon>SelectStylePanel.xaml</DependentUpon>
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="Src\Gui\Dialogs\OptionPanels\IDEOptions\TaskListOptionsl.xaml.cs"> <Compile Include="Src\Gui\Dialogs\OptionPanels\IDEOptions\TaskListOptionsl.xaml.cs">
@ -533,9 +533,6 @@
<Compile Include="Src\Gui\Dialogs\OptionPanels\IDEOptions\CodeGenerationPanel.cs"> <Compile Include="Src\Gui\Dialogs\OptionPanels\IDEOptions\CodeGenerationPanel.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
<Compile Include="Src\Gui\Dialogs\OptionPanels\IDEOptions\old_SelectStylePanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Src\Gui\Dialogs\ReferenceDialog\AssemblyReferencePanel.cs"> <Compile Include="Src\Gui\Dialogs\ReferenceDialog\AssemblyReferencePanel.cs">
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
@ -711,7 +708,6 @@
<EmbeddedResource Include="Resources\NewFileWithNameDialog.xfrm" /> <EmbeddedResource Include="Resources\NewFileWithNameDialog.xfrm" />
<EmbeddedResource Include="Resources\NewFileDialog.xfrm" /> <EmbeddedResource Include="Resources\NewFileDialog.xfrm" />
<EmbeddedResource Include="Resources\OutputWindowOptionsPanel.xfrm" /> <EmbeddedResource Include="Resources\OutputWindowOptionsPanel.xfrm" />
<EmbeddedResource Include="Resources\old_SelectStylePanel.xfrm" />
<EmbeddedResource Include="Resources\WordCountDialog.xfrm" /> <EmbeddedResource Include="Resources\WordCountDialog.xfrm" />
<Compile Include="Src\Bookmarks\BookmarkBase.cs" /> <Compile Include="Src\Bookmarks\BookmarkBase.cs" />
<Compile Include="Src\Bookmarks\Commands\MenuCommands.cs" /> <Compile Include="Src\Bookmarks\Commands\MenuCommands.cs" />
@ -889,7 +885,7 @@
<ItemGroup> <ItemGroup>
<Page Include="Src\Bookmarks\Pad\Controls\ListViewPad.xaml" /> <Page Include="Src\Bookmarks\Pad\Controls\ListViewPad.xaml" />
<Page Include="Src\Gui\Components\StringListEditorXaml.xaml" /> <Page Include="Src\Gui\Components\StringListEditorXaml.xaml" />
<Page Include="Src\Gui\Dialogs\OptionPanels\IDEOptions\SelectStylePanelXaml.xaml" /> <Page Include="Src\Gui\Dialogs\OptionPanels\IDEOptions\SelectStylePanel.xaml" />
<Page Include="Src\Gui\Dialogs\OptionPanels\IDEOptions\TaskListOptionsl.xaml" /> <Page Include="Src\Gui\Dialogs\OptionPanels\IDEOptions\TaskListOptionsl.xaml" />
<Page Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\BuildEvents.xaml" /> <Page Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\BuildEvents.xaml" />
<Page Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\DebugOptions.xaml" /> <Page Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\DebugOptions.xaml" />

79
src/Main/Base/Project/Resources/old_SelectStylePanel.xfrm

@ -1,79 +0,0 @@
<Components version="1.0">
<System.Windows.Forms.UserControl>
<Name value="CreatedObject0" />
<ClientSize value="{Width=368, Height=272}" />
<Controls>
<System.Windows.Forms.CheckBox>
<Name value="useProfessionalStyleCheckBox" />
<Location value="{X=8,Y=181}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="${res:Dialog.Options.IDEOptions.SelectStyle.UseProfessionalStyleCheckBox}" />
<TabIndex value="4" />
<Size value="{Width=352, Height=24}" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.CheckBox>
<Name value="showToolBarCheckBox" />
<Location value="{X=8,Y=161}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="${res:Dialog.Options.IDEOptions.SelectStyle.ShowToolBarCheckBox}" />
<TabIndex value="3" />
<Size value="{Width=352, Height=24}" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.CheckBox>
<Name value="showStatusBarCheckBox" />
<Location value="{X=8,Y=141}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="${res:Dialog.Options.IDEOptions.SelectStyle.ShowStatusBarCheckBox}" />
<TabIndex value="2" />
<Size value="{Width=352, Height=24}" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.GroupBox>
<Name value="groupBox1" />
<Location value="{X=8,Y=8}" />
<Text value="${res:Dialog.Options.IDEOptions.SelectStyle.VisualStyleGroupBox}" />
<Size value="{Width=352, Height=127}" />
<TabIndex value="1" />
<Anchor value="Top, Left, Right" />
<Controls>
<System.Windows.Forms.CheckBox>
<Name value="preferProjectAmbienceCheckBox" />
<Location value="{X=8,Y=97}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="${res:Dialog.Options.IDEOptions.SelectStyle.UseProjectAmbience}" />
<TabIndex value="4" />
<Size value="{Width=336, Height=24}" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.CheckBox>
<Name value="showExtensionsCheckBox" />
<Location value="{X=8,Y=19}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="${res:Dialog.Options.IDEOptions.SelectStyle.ShowExtensionsCheckBox}" />
<TabIndex value="1" />
<Size value="{Width=336, Height=24}" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.ComboBox>
<Name value="selectAmbienceComboBox" />
<TabIndex value="3" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=336, Height=21}" />
<FormattingEnabled value="True" />
<DropDownStyle value="DropDownList" />
<Location value="{X=8,Y=75}" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label>
<Name value="label" />
<Location value="{X=8,Y=51}" />
<Text value="${res:Dialog.Options.IDEOptions.SelectStyle.SelectAmbienceLabel}" />
<TextAlign value="BottomLeft" />
<Size value="{Width=336, Height=23}" />
<TabIndex value="2" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.Label>
</Controls>
</System.Windows.Forms.GroupBox>
</Controls>
</System.Windows.Forms.UserControl>
</Components>

2
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/SelectStylePanelXaml.xaml → src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/SelectStylePanel.xaml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<gui:OptionPanel <gui:OptionPanel
x:Class="ICSharpCode.SharpDevelop.Gui.OptionPanels.SelectStylePanelXaml" 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"> x:Class="ICSharpCode.SharpDevelop.Gui.OptionPanels.SelectStylePanel" 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">
<StackPanel> <StackPanel>
<GroupBox Margin="2,8,2,2" <GroupBox Margin="2,8,2,2"

67
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/SelectStylePanel.xaml.cs

@ -0,0 +1,67 @@
/*
* Created by SharpDevelop.
* User: Peter Forstmeier
* Date: 29.03.2012
* Time: 21:01
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui;
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
{
/// <summary>
/// Interaction logic for SelectStylePanelXaml.xaml
/// </summary>
public partial class SelectStylePanel :OptionPanel
{
public SelectStylePanel()
{
InitializeComponent();
}
public override void LoadOptions()
{
base.LoadOptions();
this.showExtensionsCheckBox.IsChecked = PropertyService.Get("ICSharpCode.SharpDevelop.Gui.ProjectBrowser.ShowExtensions", true);
AddInTreeNode treeNode = AddInTree.GetTreeNode("/SharpDevelop/Workbench/Ambiences");
foreach (Codon codon in treeNode.Codons) {
this.selectAmbienceComboBox.Items.Add(codon.Id);
}
this.selectAmbienceComboBox.Text = PropertyService.Get("SharpDevelop.UI.CurrentAmbience", "C#");
this.preferProjectAmbienceCheckBox.IsChecked = AmbienceService.UseProjectAmbienceIfPossible;
this.showStatusBarCheckBox.IsChecked = PropertyService.Get("ICSharpCode.SharpDevelop.Gui.StatusBarVisible", true);
this.showToolBarCheckBox.IsChecked = PropertyService.Get("ICSharpCode.SharpDevelop.Gui.ToolBarVisible", true);
this.useProfessionalStyleCheckBox.IsChecked = PropertyService.Get("ICSharpCode.SharpDevelop.Gui.UseProfessionalRenderer", true);
}
public override bool SaveOptions()
{
PropertyService.Set("ICSharpCode.SharpDevelop.Gui.ProjectBrowser.ShowExtensions",this.showExtensionsCheckBox.IsChecked);
PropertyService.Set("SharpDevelop.UI.CurrentAmbience", this.selectAmbienceComboBox.Text);
PropertyService.Set("ICSharpCode.SharpDevelop.Gui.StatusBarVisible", this.showStatusBarCheckBox.IsChecked);
PropertyService.Set("ICSharpCode.SharpDevelop.Gui.ToolBarVisible", this.showToolBarCheckBox.IsChecked);
PropertyService.Set("ICSharpCode.SharpDevelop.Gui.UseProfessionalRenderer", this.useProfessionalStyleCheckBox.IsChecked);
AmbienceService.UseProjectAmbienceIfPossible = (bool)this.preferProjectAmbienceCheckBox.IsChecked;
return true;
}
}
}

44
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/old_SelectStylePanel.cs

@ -1,44 +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 old_SelectStylePanel : XmlFormsOptionPanel
{
CheckBox showExtensionsCheckBox = new CheckBox();
public override void LoadPanelContents()
{
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.SelectStylePanel.xfrm"));
Get<CheckBox>("showExtensions").Checked = PropertyService.Get("ICSharpCode.SharpDevelop.Gui.ProjectBrowser.ShowExtensions", true);
AddInTreeNode treeNode = AddInTree.GetTreeNode("/SharpDevelop/Workbench/Ambiences");
foreach (Codon codon in treeNode.Codons) {
((ComboBox)ControlDictionary["selectAmbienceComboBox"]).Items.Add(codon.Id);
}
ControlDictionary["selectAmbienceComboBox"].Text = PropertyService.Get("SharpDevelop.UI.CurrentAmbience", "C#");
Get<CheckBox>("preferProjectAmbience").Checked = AmbienceService.UseProjectAmbienceIfPossible;
Get<CheckBox>("showStatusBar").Checked = PropertyService.Get("ICSharpCode.SharpDevelop.Gui.StatusBarVisible", true);
Get<CheckBox>("showToolBar").Checked = PropertyService.Get("ICSharpCode.SharpDevelop.Gui.ToolBarVisible", true);
Get<CheckBox>("useProfessionalStyle").Checked = PropertyService.Get("ICSharpCode.SharpDevelop.Gui.UseProfessionalRenderer", true);
}
public override bool StorePanelContents()
{
PropertyService.Set("ICSharpCode.SharpDevelop.Gui.ProjectBrowser.ShowExtensions", ((CheckBox)ControlDictionary["showExtensionsCheckBox"]).Checked);
PropertyService.Set("SharpDevelop.UI.CurrentAmbience", ((ComboBox)ControlDictionary["selectAmbienceComboBox"]).Text);
PropertyService.Set("ICSharpCode.SharpDevelop.Gui.StatusBarVisible", ((CheckBox)ControlDictionary["showStatusBarCheckBox"]).Checked);
PropertyService.Set("ICSharpCode.SharpDevelop.Gui.ToolBarVisible", ((CheckBox)ControlDictionary["showToolBarCheckBox"]).Checked);
PropertyService.Set("ICSharpCode.SharpDevelop.Gui.UseProfessionalRenderer", Get<CheckBox>("useProfessionalStyle").Checked);
AmbienceService.UseProjectAmbienceIfPossible = Get<CheckBox>("preferProjectAmbience").Checked;
return true;
}
}
}
Loading…
Cancel
Save