6 changed files with 72 additions and 136 deletions
@ -1,79 +0,0 @@
@@ -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> |
@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<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> |
||||
|
||||
<GroupBox Margin="2,8,2,2" |
@ -0,0 +1,67 @@
@@ -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; |
||||
} |
||||
} |
||||
} |
@ -1,44 +0,0 @@
@@ -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…
Reference in new issue