diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.addin b/src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.addin
index 474a81bb75..43912b7ad6 100644
--- a/src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.addin
+++ b/src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.addin
@@ -93,13 +93,10 @@
label = "${res:Dialog.ProjectOptions.BuildEvents}"
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.BuildEvents"/>
-
+ class = "CSharpBinding.OptionPanels.BuildOptions"/>
-
- Form
-
-
- BuildOptionsXaml.xaml
+
+ BuildOptions.xaml
Code
@@ -136,7 +133,7 @@
-
+
\ No newline at end of file
diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptions.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptions.cs
deleted file mode 100644
index 8474f32c13..0000000000
--- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptions.cs
+++ /dev/null
@@ -1,61 +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 ICSharpCode.SharpDevelop.Gui.OptionPanels;
-using ICSharpCode.SharpDevelop.Project;
-using StringPair = System.Collections.Generic.KeyValuePair;
-
-namespace CSharpBinding.OptionPanels
-{
- public class BuildOptions : AbstractBuildOptions
- {
- public override void LoadPanelContents()
- {
- SetupFromXmlResource("BuildOptions.xfrm");
- InitializeHelper();
-
- InitBaseIntermediateOutputPath();
- InitIntermediateOutputPath();
- InitOutputPath();
- InitXmlDoc();
- InitTargetFramework();
-
- ConfigurationGuiBinding b;
-
- b = helper.BindString("conditionalSymbolsTextBox", "DefineConstants", TextBoxEditMode.EditRawProperty);
- b.DefaultLocation = PropertyStorageLocations.ConfigurationSpecific;
- b.CreateLocationButton("conditionalSymbolsTextBox");
-
- b = helper.BindBoolean("optimizeCodeCheckBox", "Optimize", false);
- b.DefaultLocation = PropertyStorageLocations.ConfigurationSpecific;
- b.CreateLocationButton("optimizeCodeCheckBox");
-
- b = helper.BindBoolean("allowUnsafeCodeCheckBox", "AllowUnsafeBlocks", false);
- b.CreateLocationButton("allowUnsafeCodeCheckBox");
-
- b = helper.BindBoolean("checkForOverflowCheckBox", "CheckForOverflowUnderflow", false);
- b.DefaultLocation = PropertyStorageLocations.ConfigurationSpecific;
- b.CreateLocationButton("checkForOverflowCheckBox");
-
- b = helper.BindBoolean("noCorlibCheckBox", "NoStdLib", false);
- b.CreateLocationButton("noCorlibCheckBox");
-
- InitDebugInfo();
- InitAdvanced();
- b = helper.BindStringEnum("fileAlignmentComboBox", "FileAlignment",
- "4096",
- new StringPair("512", "512"),
- new StringPair("1024", "1024"),
- new StringPair("2048", "2048"),
- new StringPair("4096", "4096"),
- new StringPair("8192", "8192"));
- b.DefaultLocation = PropertyStorageLocations.PlatformSpecific;
- b.RegisterLocationButton(advancedLocationButton);
-
- InitWarnings();
-
- helper.AddConfigurationSelector(this);
- }
- }
-}
diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptionsXaml.xaml b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptions.xaml
similarity index 99%
rename from src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptionsXaml.xaml
rename to src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptions.xaml
index 89911990a7..eca3a4299d 100644
--- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptionsXaml.xaml
+++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptions.xaml
@@ -1,6 +1,6 @@
/// SYST
- public partial class BuildOptionsXaml : ProjectOptionPanel
+ public partial class BuildOptions : ProjectOptionPanel
{
private List serializationInfo;
@@ -46,7 +46,7 @@ namespace CSharpBinding.OptionPanels
private MSBuildBasedProject project;
- public BuildOptionsXaml()
+ public BuildOptions()
{
InitializeComponent();
this.serializationInfo = new List();
@@ -97,8 +97,6 @@ namespace CSharpBinding.OptionPanels
this.Optimize.Location = PropertyStorageLocations.ConfigurationSpecific;
this.AllowUnsafeBlocks.Location = PropertyStorageLocations.ConfigurationSpecific;
this.CheckForOverflowUnderflow.Location = PropertyStorageLocations.ConfigurationSpecific;
- //base.RaisePropertyChanged(string.Empty);
- //IsDirty = false;
}
#region properties
diff --git a/src/AddIns/BackendBindings/CppBinding/CppBinding/Project/StringListEditorDialogXaml.xaml b/src/AddIns/BackendBindings/CppBinding/CppBinding/Project/StringListEditorDialogXaml.xaml
deleted file mode 100644
index 430a8f04ae..0000000000
--- a/src/AddIns/BackendBindings/CppBinding/CppBinding/Project/StringListEditorDialogXaml.xaml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/AddIns/BackendBindings/CppBinding/CppBinding/Project/StringListEditorDialogXaml.xaml.cs b/src/AddIns/BackendBindings/CppBinding/CppBinding/Project/StringListEditorDialogXaml.xaml.cs
deleted file mode 100644
index 123c72fcea..0000000000
--- a/src/AddIns/BackendBindings/CppBinding/CppBinding/Project/StringListEditorDialogXaml.xaml.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Created by SharpDevelop.
- * User: Peter Forstmeier
- * Date: 15.04.2012
- * Time: 18:35
- * 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;
-
-namespace ICSharpCode.CppBinding.Project
-{
- ///
- /// Interaction logic for StringListEditorDialog.xaml
- ///
- public partial class StringListEditorDialogXaml : Window
- {
- public StringListEditorDialogXaml()
- {
- InitializeComponent();
- }
-
-
- public bool BrowseForDirectory {
- get {return stringListEditor.BrowseForDirectory;}
- set {stringListEditor.BrowseForDirectory = value;}
- }
-
- public string ListCaption {
- get {return stringListEditor.ListCaption; }
- set {stringListEditor.ListCaption = value;}
- }
-
- public string TitleText {
- get {return stringListEditor.TitleText;}
- set {stringListEditor.TitleText = value;}
- }
-
- public string[] GetList() {
- return stringListEditor.GetList();
- }
-
- public void LoadList(IEnumerable list) {
- stringListEditor.LoadList(list);
- }
-
- void Button_Click(object sender, RoutedEventArgs e)
- {
- DialogResult = true;
- }
-
- }
-}
\ No newline at end of file
diff --git a/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj b/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
index 974a92bdde..8b93742a5e 100644
--- a/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
+++ b/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
@@ -747,9 +747,6 @@
-
- UserControl
-
diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/old_ApplicationSettings.cs b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/old_ApplicationSettings.cs
deleted file mode 100644
index a063443f16..0000000000
--- a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/old_ApplicationSettings.cs
+++ /dev/null
@@ -1,241 +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.Collections.Generic;
-using System.Drawing;
-using System.IO;
-using System.Windows.Forms;
-
-using ICSharpCode.Core;
-using ICSharpCode.SharpDevelop.Dom;
-using ICSharpCode.SharpDevelop.Editor;
-using ICSharpCode.SharpDevelop.Project;
-
-namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
-{
- public class old_ApplicationSettings : AbstractXmlFormsProjectOptionPanel
- {
- ComboBox applicationManifestComboBox;
-
- public override void LoadPanelContents()
- {
- SetupFromXmlResource("ProjectOptions.old_ApplicationSettings.xfrm");
-
- InitializeHelper();
-
- ConnectBrowseButton("applicationIconBrowseButton", "applicationIconTextBox",
- "${res:SharpDevelop.FileFilter.Icons}|*.ico|${res:SharpDevelop.FileFilter.AllFiles}|*.*",
- TextBoxEditMode.EditEvaluatedProperty);
-
- ConnectBrowseButton("win32ResourceFileBrowseButton", "win32ResourceFileTextBox",
- "Win32 Resource files|*.res|${res:SharpDevelop.FileFilter.AllFiles}|*.*",
- TextBoxEditMode.EditEvaluatedProperty);
-
- ConfigurationGuiBinding b;
- ChooseStorageLocationButton locationButton;
- b = helper.BindString("assemblyNameTextBox", "AssemblyName", TextBoxEditMode.EditEvaluatedProperty);
- b.CreateLocationButton("assemblyNameTextBox");
- Get("assemblyName").TextChanged += new EventHandler(RefreshOutputNameTextBox);
-
- b = helper.BindString("rootNamespaceTextBox", "RootNamespace", TextBoxEditMode.EditEvaluatedProperty);
- b.CreateLocationButton("rootNamespaceTextBox");
-
- b = helper.BindEnum("outputTypeComboBox", "OutputType");
- locationButton = b.CreateLocationButton("outputTypeComboBox");
- Get("outputType").SelectedIndexChanged += RefreshOutputNameTextBox;
- Get("outputType").SelectedIndexChanged += RefreshStartupObjectEnabled;
-
- b = helper.BindString("startupObjectComboBox", "StartupObject", TextBoxEditMode.EditEvaluatedProperty);
- b.RegisterLocationButton(locationButton);
- foreach (IClass c in GetPossibleStartupObjects(project)) {
- Get("startupObject").Items.Add(c.FullyQualifiedName);
- }
-
- b = helper.BindString("applicationIconTextBox", "ApplicationIcon", TextBoxEditMode.EditEvaluatedProperty);
- Get("applicationIcon").TextChanged += new EventHandler(ApplicationIconTextBoxTextChanged);
- b.CreateLocationButton("applicationIconTextBox");
-
- b = helper.BindString("win32ResourceFileTextBox", "Win32Resource", TextBoxEditMode.EditEvaluatedProperty);
- b.CreateLocationButton("win32ResourceFileTextBox");
-
- applicationManifestComboBox = Get("applicationManifest");
- applicationManifestComboBox.Items.Add(StringParser.Parse("${res:Dialog.ProjectOptions.ApplicationSettings.Manifest.EmbedDefault}"));
- applicationManifestComboBox.Items.Add(StringParser.Parse("${res:Dialog.ProjectOptions.ApplicationSettings.Manifest.DoNotEmbedManifest}"));
- foreach (string fileName in Directory.GetFiles(project.Directory, "*.manifest")) {
- applicationManifestComboBox.Items.Add(Path.GetFileName(fileName));
- }
- applicationManifestComboBox.Items.Add(StringParser.Parse("<${res:Global.CreateButtonText}...>"));
- applicationManifestComboBox.Items.Add(StringParser.Parse("<${res:Global.BrowseText}...>"));
- applicationManifestComboBox.SelectedIndexChanged += ApplicationManifestComboBox_SelectedIndexChanged;
-
- b = new ManifestBinding(applicationManifestComboBox);
- helper.AddBinding("ApplicationManifest", b);
- b.CreateLocationButton(applicationManifestComboBox);
- applicationManifestComboBox.TextChanged += delegate { helper.IsDirty = true; };
-
- // embedding manifests requires the project to target MSBuild 3.5 or higher
- project_MinimumSolutionVersionChanged(null, null);
- // re-evaluate if the project has the minimum version whenever this options page gets visible
- // because the "convert project" button on the compiling tab page might have updated the MSBuild version.
- project.MinimumSolutionVersionChanged += project_MinimumSolutionVersionChanged;
-
- Get("projectFolder").Text = project.Directory;
- Get("projectFile").Text = Path.GetFileName(project.FileName);
-
- // maybe make this writable again? Needs special care when saving!
- Get("projectFile").ReadOnly = true;
-
- RefreshStartupObjectEnabled(null, EventArgs.Empty);
- RefreshOutputNameTextBox(null, EventArgs.Empty);
-
- helper.AddConfigurationSelector(this);
- }
-
- void project_MinimumSolutionVersionChanged(object sender, EventArgs e)
- {
- // embedding manifests requires the project to target MSBuild 3.5 or higher
- applicationManifestComboBox.Enabled = project.MinimumSolutionVersion >= Solution.SolutionVersionVS2008;
- }
-
- protected override void Dispose(bool disposing)
- {
- project.MinimumSolutionVersionChanged -= project_MinimumSolutionVersionChanged;
- base.Dispose(disposing);
- }
-
- void ApplicationManifestComboBox_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (applicationManifestComboBox.SelectedIndex == applicationManifestComboBox.Items.Count - 2) {
- BeginInvoke(new MethodInvoker(CreateManifest));
- } else if (applicationManifestComboBox.SelectedIndex == applicationManifestComboBox.Items.Count - 1) {
- BeginInvoke(new MethodInvoker(BrowseForManifest));
- }
- }
-
- void BrowseForManifest()
- {
- applicationManifestComboBox.SelectedIndex = -1;
- BrowseForFile(applicationManifestComboBox, "${res:Dialog.ProjectOptions.ApplicationSettings.Manifest.ManifestFiles}|*.manifest|${res:SharpDevelop.FileFilter.AllFiles}|*.*", TextBoxEditMode.EditEvaluatedProperty);
- }
-
- void CreateManifest()
- {
- string manifestFile = Path.Combine(project.Directory, "app.manifest");
- if (!File.Exists(manifestFile)) {
- string defaultManifest;
- using (Stream stream = typeof(ApplicationSettings).Assembly.GetManifestResourceStream("Resources.DefaultManifest.manifest")) {
- if (stream == null)
- throw new ResourceNotFoundException("DefaultManifest.manifest");
- using (StreamReader r = new StreamReader(stream)) {
- defaultManifest = r.ReadToEnd();
- }
- }
- defaultManifest = defaultManifest.Replace("\t", EditorControlService.GlobalOptions.IndentationString);
- File.WriteAllText(manifestFile, defaultManifest, System.Text.Encoding.UTF8);
- FileService.FireFileCreated(manifestFile, false);
- }
-
- if (!project.IsFileInProject(manifestFile)) {
- FileProjectItem newItem = new FileProjectItem(project, ItemType.None);
- newItem.Include = "app.manifest";
- ProjectService.AddProjectItem(project, newItem);
- ProjectBrowserPad.RefreshViewAsync();
- }
-
- FileService.OpenFile(manifestFile);
-
- applicationManifestComboBox.Text = "app.manifest";
- }
- //--------------
- sealed class ManifestBinding : ConfigurationGuiBinding
- {
- ComboBox applicationManifestComboBox;
-
- public ManifestBinding(ComboBox applicationManifestComboBox)
- {
- this.applicationManifestComboBox = applicationManifestComboBox;
- }
-
- public override void Load()
- {
- string manifestFileName = Get("");
- if (string.IsNullOrEmpty(manifestFileName)) {
- if (Helper.GetProperty("NoWin32Manifest", false, true)) {
- // no manifest
- applicationManifestComboBox.SelectedIndex = 1;
- } else {
- // default manifest
- applicationManifestComboBox.SelectedIndex = 0;
- }
- } else {
- applicationManifestComboBox.Text = manifestFileName;
- }
- }
-
- public override bool Save()
- {
- if (applicationManifestComboBox.SelectedIndex == 0) {
- // Embed default manifest
- Set("");
- Helper.SetProperty("NoWin32Manifest", "", true, this.Location);
- } else if (applicationManifestComboBox.SelectedIndex == 1) {
- // No manifest
- Set("");
- Helper.SetProperty("NoWin32Manifest", true, true, this.Location);
- } else {
- Set(applicationManifestComboBox.Text);
- Helper.SetProperty("NoWin32Manifest", "", true, this.Location);
- }
- return true;
- }
- }
-
- //--------------
-
- public static IList GetPossibleStartupObjects(IProject project)
- {
- List results = new List();
- IProjectContent pc = ParserService.GetProjectContent(project);
- if (pc != null) {
- foreach (IClass c in pc.Classes) {
- foreach (IMethod m in c.Methods) {
- if (m.IsStatic && m.Name == "Main") {
- results.Add(c);
- }
- }
- }
- }
- return results;
- }
-
- void RefreshStartupObjectEnabled(object sender, EventArgs e)
- {
- bool isLibrary = OutputType.Library == (OutputType)Get("outputType").SelectedIndex;
- ControlDictionary["startupObjectComboBox"].Enabled = !isLibrary;
- }
-
- void RefreshOutputNameTextBox(object sender, EventArgs e)
- {
- Get("outputName").Text = Get("assemblyName").Text + CompilableProject.GetExtension((OutputType)Get("outputType").SelectedIndex);
- }
-
- void ApplicationIconTextBoxTextChanged(object sender, EventArgs e)
- {
- if(FileUtility.IsValidPath(Get("applicationIcon").Text))
- {
- string applicationIcon = Path.Combine(baseDirectory, Get("applicationIcon").Text);
- if (File.Exists(applicationIcon)) {
- try {
- Get("applicationIcon").Image = Image.FromFile(applicationIcon);
- } catch (OutOfMemoryException) {
- Get("applicationIcon").Image = null;
- MessageService.ShowErrorFormatted("${res:Dialog.ProjectOptions.ApplicationSettings.InvalidIconFile}", FileUtility.NormalizePath(applicationIcon));
- }
- } else {
- Get("applicationIcon").Image = null;
- }
- }
- }
- }
-}