Browse Source

Simple solution configuration editor (adding/removing configurations not yet supported)

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1865 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
7f16f7249c
  1. 3
      AddIns/ICSharpCode.SharpDevelop.addin
  2. 2
      src/AddIns/BackendBindings/ILAsmBinding/Project/ILAsmBinding.addin
  3. 13
      src/Libraries/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs
  4. 14
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  5. 14
      src/Main/Base/Project/Src/Commands/BuildCommands.cs
  6. 336
      src/Main/Base/Project/Src/Gui/Dialogs/CombineConfiguration/CombineConfigurationPanel.cs
  7. 167
      src/Main/Base/Project/Src/Gui/Dialogs/CombineConfiguration/CombineDependencyPanel.cs
  8. 184
      src/Main/Base/Project/Src/Gui/Dialogs/CombineConfiguration/CombineStartupPanel.cs
  9. 303
      src/Main/Base/Project/Src/Gui/Dialogs/CombineConfiguration/ConfigurationManager.cs
  10. 187
      src/Main/Base/Project/Src/Gui/Dialogs/SolutionConfiguration/SolutionConfigurationEditor.Designer.cs
  11. 168
      src/Main/Base/Project/Src/Gui/Dialogs/SolutionConfiguration/SolutionConfigurationEditor.cs
  12. 129
      src/Main/Base/Project/Src/Gui/Dialogs/SolutionConfiguration/SolutionConfigurationEditor.resx
  13. 62
      src/Main/Base/Project/Src/Project/Solution/Solution.cs

3
AddIns/ICSharpCode.SharpDevelop.addin

@ -1403,6 +1403,9 @@
type = "Menu"> type = "Menu">
<MenuItem id = "ConfigurationBuilder" type = "Builder" class = "ICSharpCode.SharpDevelop.Project.Commands.SetConfigurationMenuBuilder"/> <MenuItem id = "ConfigurationBuilder" type = "Builder" class = "ICSharpCode.SharpDevelop.Project.Commands.SetConfigurationMenuBuilder"/>
</MenuItem> </MenuItem>
<MenuItem id = "EditConfigurations"
label = "Edit configurations/platforms"
class = "ICSharpCode.SharpDevelop.Project.Commands.EditConfigurationsCommand"/>
</ComplexCondition> </ComplexCondition>
</MenuItem> <!-- end BUILD menu --> </MenuItem> <!-- end BUILD menu -->

2
src/AddIns/BackendBindings/ILAsmBinding/Project/ILAsmBinding.addin

@ -57,7 +57,7 @@
</Path> </Path>
<Path name = "/SharpDevelop/Workbench/LanguageBindings"> <Path name = "/SharpDevelop/Workbench/LanguageBindings">
<LanguageBinding id = "MSIL" <LanguageBinding id = "ILAsm"
guid = "{12B76EC0-1D7B-4FA7-A7D0-C524288B48A1}" guid = "{12B76EC0-1D7B-4FA7-A7D0-C524288B48A1}"
supportedextensions = ".il" supportedextensions = ".il"
projectfileextension = ".ilproj" projectfileextension = ".ilproj"

13
src/Libraries/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs

@ -532,16 +532,13 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
outputFormatter.PrintToken(Tokens.Dot); outputFormatter.PrintToken(Tokens.Dot);
} }
outputFormatter.PrintIdentifier(propertyDeclaration.Name); outputFormatter.PrintIdentifier(propertyDeclaration.Name);
outputFormatter.Space();
outputFormatter.PrintToken(Tokens.OpenCurlyBrace); outputFormatter.BeginBrace(this.prettyPrintOptions.PropertyBraceStyle);
outputFormatter.NewLine();
++outputFormatter.IndentationLevel;
nodeTracker.TrackedVisit(propertyDeclaration.GetRegion, data); nodeTracker.TrackedVisit(propertyDeclaration.GetRegion, data);
nodeTracker.TrackedVisit(propertyDeclaration.SetRegion, data); nodeTracker.TrackedVisit(propertyDeclaration.SetRegion, data);
--outputFormatter.IndentationLevel;
outputFormatter.Indent(); outputFormatter.EndBrace();
outputFormatter.PrintToken(Tokens.CloseCurlyBrace);
outputFormatter.NewLine();
return null; return null;
} }

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

@ -170,10 +170,6 @@
<Compile Include="Src\Gui\Dialogs\WordCountDialog.cs"> <Compile Include="Src\Gui\Dialogs\WordCountDialog.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="Src\Gui\Dialogs\CombineConfiguration\CombineConfigurationPanel.cs" />
<Compile Include="Src\Gui\Dialogs\CombineConfiguration\CombineDependencyPanel.cs" />
<Compile Include="Src\Gui\Dialogs\CombineConfiguration\CombineStartupPanel.cs" />
<Compile Include="Src\Gui\Dialogs\CombineConfiguration\ConfigurationManager.cs" />
<Compile Include="Src\Gui\Dialogs\OptionPanels\EditTemplateDialog.cs"> <Compile Include="Src\Gui\Dialogs\OptionPanels\EditTemplateDialog.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -704,6 +700,13 @@
<Compile Include="Src\Internal\ConditionEvaluators\CompareProjectPropertyConditionEvaluator.cs" /> <Compile Include="Src\Internal\ConditionEvaluators\CompareProjectPropertyConditionEvaluator.cs" />
<Compile Include="Src\Services\ParserService\Net1xProjectContentRegistry.cs" /> <Compile Include="Src\Services\ParserService\Net1xProjectContentRegistry.cs" />
<Compile Include="Src\Services\ParserService\NetCFProjectContentRegistry.cs" /> <Compile Include="Src\Services\ParserService\NetCFProjectContentRegistry.cs" />
<Compile Include="Src\Gui\Dialogs\SolutionConfiguration\SolutionConfigurationEditor.Designer.cs">
<DependentUpon>SolutionConfigurationEditor.cs</DependentUpon>
</Compile>
<Compile Include="Src\Gui\Dialogs\SolutionConfiguration\SolutionConfigurationEditor.cs" />
<EmbeddedResource Include="Src\Gui\Dialogs\SolutionConfiguration\SolutionConfigurationEditor.resx">
<DependentUpon>SolutionConfigurationEditor.cs</DependentUpon>
</EmbeddedResource>
<Compile Include="Src\TextEditor\Gui\Editor\IncrementalSearch.cs" /> <Compile Include="Src\TextEditor\Gui\Editor\IncrementalSearch.cs" />
<EmbeddedResource Include="Resources\IncrementalSearchCursor.cur" /> <EmbeddedResource Include="Resources\IncrementalSearchCursor.cur" />
<EmbeddedResource Include="Resources\ReverseIncrementalSearchCursor.cur" /> <EmbeddedResource Include="Resources\ReverseIncrementalSearchCursor.cur" />
@ -738,6 +741,7 @@
<Project>{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}</Project> <Project>{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}</Project>
<Name>ICSharpCode.SharpDevelop.Dom</Name> <Name>ICSharpCode.SharpDevelop.Dom</Name>
</ProjectReference> </ProjectReference>
<Folder Include="Src\Gui\Dialogs\SolutionConfiguration" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
</Project> </Project>

14
src/Main/Base/Project/Src/Commands/BuildCommands.cs

@ -203,7 +203,19 @@ namespace ICSharpCode.SharpDevelop.Project.Commands
{ {
ToolStripMenuItem item = (ToolStripMenuItem)sender; ToolStripMenuItem item = (ToolStripMenuItem)sender;
ProjectService.OpenSolution.Preferences.ActiveConfiguration = item.Text; ProjectService.OpenSolution.Preferences.ActiveConfiguration = item.Text;
ProjectService.OpenSolution.ApplySolutionConfigurationToProjects(); ProjectService.OpenSolution.ApplySolutionConfigurationAndPlatformToProjects();
}
}
public class EditConfigurationsCommand : AbstractMenuCommand
{
public override void Run()
{
using (SolutionConfigurationEditor sce = new SolutionConfigurationEditor()) {
sce.ShowDialog();
ProjectService.OpenSolution.Save();
ProjectService.OpenSolution.ApplySolutionConfigurationAndPlatformToProjects();
}
} }
} }
} }

336
src/Main/Base/Project/Src/Gui/Dialogs/CombineConfiguration/CombineConfigurationPanel.cs

@ -1,336 +0,0 @@
//// <file>
//// <copyright see="prj:///doc/copyright.txt"/>
//// <license see="prj:///doc/license.txt"/>
//// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
//// <version value="$version"/>
//// </file>
//using System;
//using System.Collections;
//using System.ComponentModel;
//using System.Drawing;
//using System.Windows.Forms;
//
//using ICSharpCode.SharpDevelop.Project;
//using ICSharpCode.Core;
//using ICSharpCode.Core;
//using ICSharpCode.Core;
//
//namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
//{
// /// <summary>
// /// Summary description for UserControl3.
// /// </summary>
// public class CombineConfigurationPanel : AbstractOptionPanel
// {
// private System.Windows.Forms.Label label2;
// private System.Windows.Forms.ComboBox comboBox1;
// private System.Windows.Forms.Button button4;
// private System.Windows.Forms.GroupBox groupBox1;
// private System.Windows.Forms.CheckBox checkBox1;
// private System.Windows.Forms.ComboBox actioncomboBox;
// private System.Windows.Forms.ListView entrylistView;
// private System.Windows.Forms.Label label1;
// private System.Windows.Forms.ColumnHeader columnHeader1;
// private System.Windows.Forms.ColumnHeader columnHeader2;
// private System.Windows.Forms.ColumnHeader columnHeader3;
// /// <summary>
// /// Required designer variable.
// /// </summary>
// private System.ComponentModel.Container components = null;
//
//
//
// Solution combine;
//
// void SetValues(object sender, EventArgs e)
// {
// this.combine = (Combine)((Properties)CustomizationObject).Get("Combine");
// checkBox1.CheckedChanged += new EventHandler(OptionsChanged);
// actioncomboBox.SelectedIndexChanged += new EventHandler(OptionsChanged);
// entrylistView.SelectedIndexChanged += new EventHandler(SelectEntry);
// button4.Click += new EventHandler(StartConfigurationManager);
//
// InitializeConfigurationComboBox();
// InitializeEntryListView(null, null);
// }
//
// public override bool ReceiveDialogMessage(DialogMessage message)
// {
// if (message == DialogMessage.OK) {
//
// }
// // TODO
//// foreach (ListViewItem item in entrylistView.Items) {
//// CombineConfiguration.Config config = combine.ActiveConfiguration.GetConfiguration(item.Text);
//// config.Build = Boolean.Parse(item.SubItems[1]);
//// config.ConfigurationName = Boolean.Parse(item.SubItems[0]);
//// }
// return true;
// }
//
// public CombineConfigurationPanel()
// {
// // This call is required by the Windows.Forms Form Designer.
// InitializeComponent();
//
// CustomizationObjectChanged += new EventHandler(SetValues);
// }
//
// void StartConfigurationManager(object sender, EventArgs e)
// {
// new ConfigurationManager().ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm);
// }
// void OptionsChanged(object sender, EventArgs e)
// {
// if (entrylistView.SelectedItems == null ||
// entrylistView.SelectedItems.Count == 0)
// return;
// ListViewItem item = entrylistView.SelectedItems[0];
// if (item == null || item.SubItems.Count < 3)
// return;
// item.SubItems[2].Text = checkBox1.Checked.ToString();
// item.SubItems[1].Text = actioncomboBox.SelectedItem.ToString();
// }
//
// void SelectEntry(object sender, EventArgs e)
// {
// actioncomboBox.Items.Clear();
// if (entrylistView.SelectedItems.Count == 0) {
// actioncomboBox.Enabled = checkBox1.Enabled = false;
// return;
// }
// actioncomboBox.Enabled = checkBox1.Enabled = true;
//
// ListViewItem item = entrylistView.SelectedItems[0];
//
// CombineConfiguration.Config config = null;
// if (comboBox1.SelectedIndex == 0)
// config = combine.ActiveConfiguration.GetConfiguration(combine.GetEntryNumber(item.Text));
// else
// config = ((CombineConfiguration)combine.Configurations[comboBox1.SelectedItem.ToString()]).GetConfiguration(combine.GetEntryNumber(item.Text));
//
// checkBox1.Checked = Boolean.Parse(item.SubItems[2].Text);
//
// CombineEntry entry = (CombineEntry)combine.Entries[combine.GetEntryNumber(item.Text)];
// int index = 0;
// if (entry.Entry is IProject) {
// IProject subproject = (IProject)entry.Entry;
// for (int i = 0; i < subproject.Configurations.Count; ++i) {
// string name = ((IConfiguration)subproject.Configurations[i]).Name;
// if (name == item.SubItems[1].Text)
// index = i;
// actioncomboBox.Items.Add(name);
// }
//
// } else {
// Combine subcombine = (Combine)entry.Entry;
//
// for (int i = 0; i < subcombine.Configurations.Count; ++i) {
// string name = ((CombineConfiguration)subcombine.Configurations[i]).Name;
// if (name == item.SubItems[1].Text)
// index = i;
// actioncomboBox.Items.Add(name);
// }
// }
// actioncomboBox.SelectedIndex = index;
// }
//
// void InitializeEntryListView(object sender, EventArgs e)
// {
// entrylistView.BeginUpdate();
// entrylistView.Items.Clear();
// foreach (CombineEntry entry in combine.Entries) {
// CombineConfiguration.Config config = combine.ActiveConfiguration.GetConfiguration(combine.GetEntryNumber(entry.Name));
// entrylistView.Items.Add(new ListViewItem(new string[] {
// entry.Name,
// config.ConfigurationName,
// config.Build.ToString()
// }));
// }
// entrylistView.EndUpdate();
// }
//
// void InitializeConfigurationComboBox()
// {
// if (combine.ActiveConfiguration != null) {
// comboBox1.Items.Add("Active(" + combine.ActiveConfiguration.Name +")");
// } else {
// comboBox1.Items.Add("No active");
// }
// foreach (DictionaryEntry dentry in combine.Configurations) {
// CombineConfiguration cconf = (CombineConfiguration)dentry.Value;
// comboBox1.Items.Add(cconf.Name);
// }
// comboBox1.SelectedIndex = 0;
// comboBox1.SelectedIndexChanged += new EventHandler(InitializeEntryListView);
// }
//
// /// <summary>
// /// Clean up any resources being used.
// /// </summary>
// protected override void Dispose(bool disposing)
// {
// if (disposing) {
// if (components != null){
// components.Dispose();
// }
// }
// base.Dispose(disposing);
// }
//
// #region Component Designer generated code
// /// <summary>
// /// Required method for Designer support - do not modify
// /// the contents of this method with the code editor.
// /// </summary>
// private void InitializeComponent()
// {
//
// bool flat = true;
// this.label2 = new System.Windows.Forms.Label();
// this.comboBox1 = new System.Windows.Forms.ComboBox();
// this.button4 = new System.Windows.Forms.Button();
// this.groupBox1 = new System.Windows.Forms.GroupBox();
// this.checkBox1 = new System.Windows.Forms.CheckBox();
// this.actioncomboBox = new System.Windows.Forms.ComboBox();
// this.entrylistView = new System.Windows.Forms.ListView();
// this.label1 = new System.Windows.Forms.Label();
// this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
// this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
// this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
// this.groupBox1.SuspendLayout();
// this.SuspendLayout();
// //
// // label2
// //
// this.label2.Location = new System.Drawing.Point(16, 8);
// this.label2.Name = "label2";
// this.label2.Size = new System.Drawing.Size(168, 16);
// this.label2.TabIndex = 0;
// this.label2.Text = ResourceService.GetString("Dialog.Options.CombineOptions.Configurations.CombineConfigLabel");
//
// //
// // comboBox1
// //
// this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
// this.comboBox1.DropDownWidth = 176;
// this.comboBox1.Location = new System.Drawing.Point(16, 24);
// this.comboBox1.Name = "comboBox1";
// this.comboBox1.Size = new System.Drawing.Size(224, 21);
// this.comboBox1.TabIndex = 1;
// //
// // button4
// //
// this.button4.Location = new System.Drawing.Point(248, 24);
// this.button4.Name = "button4";
// this.button4.Size = new System.Drawing.Size(136, 23);
// this.button4.TabIndex = 8;
// this.button4.Text = ResourceService.GetString("Dialog.Options.CombineOptions.Configurations.ConfigurationManagerButton");
// button4.FlatStyle = flat ? FlatStyle.Flat : FlatStyle.Standard;
//
// //
// // groupBox1
// //
// this.groupBox1.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
// | System.Windows.Forms.AnchorStyles.Left)
// | System.Windows.Forms.AnchorStyles.Right);
// this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {
// this.checkBox1,
// this.actioncomboBox,
// this.entrylistView,
// this.label1});
// this.groupBox1.Location = new System.Drawing.Point(8, 56);
// this.groupBox1.Name = "groupBox1";
// this.groupBox1.Size = new System.Drawing.Size(432, 272);
// this.groupBox1.TabIndex = 9;
// this.groupBox1.TabStop = false;
// this.groupBox1.Text = ResourceService.GetString("Dialog.Options.CombineOptions.Configurations.EntriesGroupBox");
// groupBox1.FlatStyle = flat ? FlatStyle.Flat : FlatStyle.Standard;
//
// //
// // checkBox1
// //
// this.checkBox1.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left);
// this.checkBox1.Location = new System.Drawing.Point(232, 248);
// this.checkBox1.Name = "checkBox1";
// this.checkBox1.Size = new System.Drawing.Size(128, 16);
// this.checkBox1.TabIndex = 7;
// this.checkBox1.Text = ResourceService.GetString("Dialog.Options.CombineOptions.Configurations.BuildCheckBox");
// checkBox1.FlatStyle = flat ? FlatStyle.Flat : FlatStyle.Standard;
//
// //
// // actioncomboBox
// //
// this.actioncomboBox.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left);
// this.actioncomboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
// this.actioncomboBox.DropDownWidth = 168;
// this.actioncomboBox.Location = new System.Drawing.Point(8, 248);
// this.actioncomboBox.Name = "actioncomboBox";
// this.actioncomboBox.Size = new System.Drawing.Size(216, 21);
// this.actioncomboBox.TabIndex = 5;
//
// //
// // entrylistView
// //
// this.entrylistView.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
// | System.Windows.Forms.AnchorStyles.Left)
// | System.Windows.Forms.AnchorStyles.Right);
// this.entrylistView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
// this.columnHeader1,
// this.columnHeader2,
// this.columnHeader3});
// this.entrylistView.FullRowSelect = true;
// this.entrylistView.GridLines = true;
// this.entrylistView.HideSelection = false;
// this.entrylistView.Location = new System.Drawing.Point(8, 16);
// this.entrylistView.MultiSelect = false;
// this.entrylistView.Name = "entrylistView";
// this.entrylistView.Size = new System.Drawing.Size(416, 208);
// this.entrylistView.TabIndex = 6;
// this.entrylistView.View = System.Windows.Forms.View.Details;
// entrylistView.BorderStyle = flat ? BorderStyle.FixedSingle : BorderStyle.Fixed3D;
//
// //
// // label1
// //
// this.label1.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left);
// this.label1.Location = new System.Drawing.Point(8, 232);
// this.label1.Name = "label1";
// this.label1.Size = new System.Drawing.Size(176, 16);
// this.label1.TabIndex = 4;
// this.label1.Text = ResourceService.GetString("Dialog.Options.CombineOptions.Configurations.EntryConfigurationLabel");
//
// //
// // columnHeader1
// //
// this.columnHeader1.Text = ResourceService.GetString("Dialog.Options.CombineOptions.Configurations.EntryColumnHeader");
// this.columnHeader1.Width = 242;
//
// //
// // columnHeader2
// //
// this.columnHeader2.Text = ResourceService.GetString("Dialog.Options.CombineOptions.Configurations.ConfigurationColumnHeader");
// this.columnHeader2.Width = 109;
//
// //
// // columnHeader3
// //
// this.columnHeader3.Text = ResourceService.GetString("Dialog.Options.CombineOptions.Configurations.BuildColumnHeader");
//
// //
// // UserControl3
// //
// this.Controls.AddRange(new System.Windows.Forms.Control[] {this.groupBox1,
// this.label2,
// this.comboBox1,
// this.button4});
// this.Name = "UserControl3";
// this.Size = new System.Drawing.Size(448, 336);
// this.groupBox1.ResumeLayout(false);
// this.ResumeLayout(false);
//
// }
// #endregion
// }
//}
//

167
src/Main/Base/Project/Src/Gui/Dialogs/CombineConfiguration/CombineDependencyPanel.cs

@ -1,167 +0,0 @@
//// <file>
//// <copyright see="prj:///doc/copyright.txt"/>
//// <license see="prj:///doc/license.txt"/>
//// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
//// <version value="$version"/>
//// </file>
//
//using System;
//using System.Collections;
//using System.ComponentModel;
//using System.Drawing;
//using System.Windows.Forms;
//
//using ICSharpCode.Core;
//using ICSharpCode.Core;
//using ICSharpCode.SharpDevelop.Project;
//using ICSharpCode.Core;
//
//namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
//{
// /// <summary>
// /// Summary description for UserControl2.
// /// </summary>
// public class CombineDependencyPanel : AbstractOptionPanel
// {
// private System.Windows.Forms.Label label1;
// private System.Windows.Forms.ComboBox comboBox1;
// private System.Windows.Forms.CheckedListBox checkedListBox1;
// private System.Windows.Forms.Label label2;
// /// <summary>
// /// Required designer variable.
// /// </summary>
// private System.ComponentModel.Container components = null;
//
// Solution combine;
//
//
//
//
// public override bool ReceiveDialogMessage(DialogMessage message)
// {
// if (message == DialogMessage.OK) {
// // TODO : Project dependency accept
// }
// return true;
// }
//
// void FillCheckListBox(object sender, EventArgs e)
// {
// checkedListBox1.Items.Clear();
//
// foreach (CombineEntry entry in combine.Entries) {
// if (entry.Name != comboBox1.SelectedItem.ToString()) {
// checkedListBox1.Items.Add(entry.Name);
// }
// }
// }
//
// void SetValues(object sender, EventArgs e)
// {
// this.combine = (Combine)((Properties)CustomizationObject).Get("Combine");
//
// foreach (CombineEntry entry in combine.Entries)
// comboBox1.Items.Add(entry.Name);
//
// if (comboBox1.Items.Count > 0) {
// comboBox1.SelectedIndex = 0;
// }
//
// FillCheckListBox(null, null);
// }
//
// public CombineDependencyPanel()
// {
// // This call is required by the Windows.Forms Form Designer.
// InitializeComponent();
// CustomizationObjectChanged += new EventHandler(SetValues);
// }
//
// /// <summary>
// /// Clean up any resources being used.
// /// </summary>
// protected override void Dispose(bool disposing)
// {
// if (disposing) {
// if (components != null){
// components.Dispose();
// }
// }
// base.Dispose(disposing);
// }
//
// #region Windows Form Designer generated code
// /// <summary>
// /// Required method for Designer support - do not modify
// /// the contents of this method with the code editor.
// /// </summary>
// private void InitializeComponent()
// {
// bool flat = true;
// this.label1 = new System.Windows.Forms.Label();
//
// this.comboBox1 = new System.Windows.Forms.ComboBox();
// this.checkedListBox1 = new System.Windows.Forms.CheckedListBox();
// this.label2 = new System.Windows.Forms.Label();
// this.SuspendLayout();
// //
// // label1
// //
// this.label1.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
// | System.Windows.Forms.AnchorStyles.Right);
// this.label1.Location = new System.Drawing.Point(8, 8);
// this.label1.Name = "label1";
// this.label1.Size = new System.Drawing.Size(304, 16);
// this.label1.TabIndex = 0;
// this.label1.Text = ResourceService.GetString("Dialog.Options.CombineOptions.Dependencies.EntryLabel");
// //
// // comboBox1
// //
// this.comboBox1.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
// | System.Windows.Forms.AnchorStyles.Right);
// this.comboBox1.DropDownWidth = 304;
// this.comboBox1.Location = new System.Drawing.Point(8, 24);
// this.comboBox1.Name = "comboBox1";
// this.comboBox1.Size = new System.Drawing.Size(304, 21);
// this.comboBox1.TabIndex = 1;
// this.comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
// comboBox1.SelectedIndexChanged += new EventHandler(FillCheckListBox);
//
// //
// // checkedListBox1
// //
// this.checkedListBox1.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
// | System.Windows.Forms.AnchorStyles.Left)
// | System.Windows.Forms.AnchorStyles.Right);
// this.checkedListBox1.Location = new System.Drawing.Point(8, 72);
// this.checkedListBox1.Name = "checkedListBox1";
// this.checkedListBox1.Size = new System.Drawing.Size(304, 214);
// this.checkedListBox1.TabIndex = 2;
// checkedListBox1.BorderStyle = flat ? BorderStyle.FixedSingle : BorderStyle.Fixed3D;
//
// //
// // label2
// //
// this.label2.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
// | System.Windows.Forms.AnchorStyles.Right);
// this.label2.Location = new System.Drawing.Point(8, 56);
// this.label2.Name = "label2";
// this.label2.Size = new System.Drawing.Size(304, 16);
// this.label2.TabIndex = 3;
// this.label2.Text = ResourceService.GetString("Dialog.Options.CombineOptions.Dependencies.DependsOnLabel");
// //
// // Form10
// //
// this.ClientSize = new System.Drawing.Size(320, 293);
// this.Controls.AddRange(new System.Windows.Forms.Control[] {this.label2,
// this.checkedListBox1,
// this.comboBox1,
// this.label1});
// this.Name = "Form10";
// this.Text = "Form10";
// this.ResumeLayout(false);
//
// }
// #endregion
// }
//}

184
src/Main/Base/Project/Src/Gui/Dialogs/CombineConfiguration/CombineStartupPanel.cs

@ -1,184 +0,0 @@
//// <file>
//// <copyright see="prj:///doc/copyright.txt"/>
//// <license see="prj:///doc/license.txt"/>
//// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
//// <version value="$version"/>
//// </file>
//using System;
//using System.Collections;
//using System.ComponentModel;
//using System.Drawing;
//using System.Windows.Forms;
//using ICSharpCode.Core;
//
//using ICSharpCode.Core;
//using ICSharpCode.Core;
//using ICSharpCode.SharpDevelop.Project;
//
//namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
//{
// public class CombineStartupPanel : AbstractOptionPanel
// {
// static
// static
//
// Solution combine;
//
// public override bool ReceiveDialogMessage(DialogMessage message)
// {
// if (message == DialogMessage.OK) {
// // write back singlestartup project
// combine.SingleStartProjectName = ((ComboBox)ControlDictionary["singleComboBox"]).Text;
// combine.SingleStartupProject = ((RadioButton)ControlDictionary["singleRadioButton"]).Checked;
//
// // write back new combine execute definitions
// combine.CombineExecuteDefinitions.Clear();
// foreach (ListViewItem item in ((ListView)ControlDictionary["entryListView"]).Items) {
// EntryExecuteType type = EntryExecuteType.None;
// if (item.SubItems[1].Text == ResourceService.GetString("Dialog.Options.CombineOptions.Startup.Action.Execute")) {
// type = EntryExecuteType.Execute;
// }
// combine.CombineExecuteDefinitions.Add(new CombineExecuteDefinition(
// combine.GetEntry(item.Text),
// type
// ));
// }
// }
// return true;
// }
//
// void SetValues(object sender, EventArgs e)
// {
// this.combine = (Combine)((Properties)CustomizationObject).Get("Combine");
//
// ((RadioButton)ControlDictionary["singleRadioButton"]).Checked = combine.SingleStartupProject;
// ((RadioButton)ControlDictionary["multipleRadioButton"]).Checked = !combine.SingleStartupProject;
//
// foreach (CombineEntry entry in combine.Entries) {
// ((ComboBox)ControlDictionary["singleComboBox"]).Items.Add(entry.Name);
// }
//
// ((ComboBox)ControlDictionary["singleComboBox"]).SelectedIndex = combine.GetEntryNumber(combine.SingleStartProjectName);
//
// ((RadioButton)ControlDictionary["singleRadioButton"]).CheckedChanged += new EventHandler(CheckedChanged);
//
// ((ListView)ControlDictionary["entryListView"]).SelectedIndexChanged += new EventHandler(SelectedEntryChanged);
// ((ComboBox)ControlDictionary["actionComboBox"]).SelectedIndexChanged += new EventHandler(OptionsChanged);
//
// ListViewItem item;
// CombineExecuteDefinition edef;
// for (int n = 0; n < combine.CombineExecuteDefinitions.Count; n++) {
// edef = (CombineExecuteDefinition)combine.CombineExecuteDefinitions[n];
// item = new ListViewItem(new string[] {
// edef.Entry.Name,
// edef.Type == EntryExecuteType.None ? ResourceService.GetString("Dialog.Options.CombineOptions.Startup.Action.None") : ResourceService.GetString("Dialog.Options.CombineOptions.Startup.Action.Execute")
// });
// item.Tag = edef;
// ((ListView)ControlDictionary["entryListView"]).Items.Add(item);
// }
// ((Button)ControlDictionary["moveUpButton"]).Click += new EventHandler(OnClickMoveUpButton);
// ((Button)ControlDictionary["moveDownButton"]).Click += new EventHandler(OnClickMoveDownButtn);
// CheckedChanged(null, null);
// }
//
// protected void OnClickMoveUpButton(object sender, EventArgs e)
// {
// ListView.SelectedIndexCollection indexs = ((ListView)ControlDictionary["entryListView"]).SelectedIndices;
// if (indexs.Count == 0) {
// return;
// }
// int index = indexs[0];
// if (index == 0) {
// return;
// }
//
// ((ListView)ControlDictionary["entryListView"]).BeginUpdate();
// ListViewItem item = ((ListView)ControlDictionary["entryListView"]).Items[index - 1];
// ((ListView)ControlDictionary["entryListView"]).Items.Remove(item);
// ((ListView)ControlDictionary["entryListView"]).Items.Insert(index, item);
// ((ListView)ControlDictionary["entryListView"]).EndUpdate();
//
// combine.CombineExecuteDefinitions.Remove(item.Tag);
// combine.CombineExecuteDefinitions.Insert(index, item.Tag);
// }
//
// protected void OnClickMoveDownButtn(object sender, EventArgs e)
// {
// ListView.SelectedIndexCollection indexs = ((ListView)ControlDictionary["entryListView"]).SelectedIndices;
// if (indexs.Count == 0) {
// return;
// }
// int index = indexs[0];
// if (index >= (((ListView)ControlDictionary["entryListView"]).Items.Count - 1)) {
// return;
// }
// ((ListView)ControlDictionary["entryListView"]).BeginUpdate();
// ListViewItem item = ((ListView)ControlDictionary["entryListView"]).Items[index + 1];
// ((ListView)ControlDictionary["entryListView"]).Items.Remove(item);
// ((ListView)ControlDictionary["entryListView"]).Items.Insert(index, item);
// ((ListView)ControlDictionary["entryListView"]).EndUpdate();
//
// combine.CombineExecuteDefinitions.Remove(item.Tag);
// combine.CombineExecuteDefinitions.Insert(index, item.Tag);
// }
//
// public CombineStartupPanel()
// {
// SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.CombineStartupPanel.xfrm"));
//
// CustomizationObjectChanged += new EventHandler(SetValues);
// }
//
// void CheckedChanged(object sender, EventArgs e)
// {
// ((Button)ControlDictionary["moveUpButton"]).Enabled = ((RadioButton)ControlDictionary["multipleRadioButton"]).Checked;
// ((Button)ControlDictionary["moveDownButton"]).Enabled = ((RadioButton)ControlDictionary["multipleRadioButton"]).Checked;
// ((ListView)ControlDictionary["entryListView"]).Enabled = ((RadioButton)ControlDictionary["multipleRadioButton"]).Checked;
// ((ComboBox)ControlDictionary["actionComboBox"]).Enabled = ((RadioButton)ControlDictionary["multipleRadioButton"]).Checked;
//
// ((ComboBox)ControlDictionary["singleComboBox"]).Enabled = ((RadioButton)ControlDictionary["singleRadioButton"]).Checked;
// }
//
// void OptionsChanged(object sender, EventArgs e)
// {
// if (((ListView)ControlDictionary["entryListView"]).SelectedItems == null ||
// ((ListView)ControlDictionary["entryListView"]).SelectedItems.Count == 0)
// return;
// ListViewItem item = ((ListView)ControlDictionary["entryListView"]).SelectedItems[0];
// item.SubItems[1].Text = ((ComboBox)ControlDictionary["actionComboBox"]).SelectedItem.ToString();
//
// int index = ((ListView)ControlDictionary["entryListView"]).SelectedIndices[0];
// CombineExecuteDefinition edef = (CombineExecuteDefinition)combine.CombineExecuteDefinitions[index];
//
// switch (((ComboBox)ControlDictionary["actionComboBox"]).SelectedIndex) {
// case 0:
// edef.Type = EntryExecuteType.None;
// break;
// case 1:
// edef.Type = EntryExecuteType.Execute;
// break;
// default:
// break;
// }
// }
//
// void SelectedEntryChanged(object sender, EventArgs e)
// {
// if (((ListView)ControlDictionary["entryListView"]).SelectedItems == null ||
// ((ListView)ControlDictionary["entryListView"]).SelectedItems.Count == 0)
// return;
// ListViewItem item = ((ListView)ControlDictionary["entryListView"]).SelectedItems[0];
// string txt = item.SubItems[1].Text;
// ((ComboBox)ControlDictionary["actionComboBox"]).Items.Clear();
// ((ComboBox)ControlDictionary["actionComboBox"]).Items.Add(ResourceService.GetString("Dialog.Options.CombineOptions.Startup.Action.None"));
// ((ComboBox)ControlDictionary["actionComboBox"]).Items.Add(ResourceService.GetString("Dialog.Options.CombineOptions.Startup.Action.Execute"));
//
// if (txt == ResourceService.GetString("Dialog.Options.CombineOptions.Startup.Action.None")) {
// ((ComboBox)ControlDictionary["actionComboBox"]).SelectedIndex = 0;
// } else {
// ((ComboBox)ControlDictionary["actionComboBox"]).SelectedIndex = 1;
// }
// }
// }
//}
//

303
src/Main/Base/Project/Src/Gui/Dialogs/CombineConfiguration/ConfigurationManager.cs

@ -1,303 +0,0 @@
//// <file>
//// <copyright see="prj:///doc/copyright.txt"/>
//// <license see="prj:///doc/license.txt"/>
//// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
//// <version value="$version"/>
//// </file>
//using System;
//using System.Drawing;
//using System.Collections;
//using System.ComponentModel;
//using System.Windows.Forms;
//
//using ICSharpCode.Core;
//using ICSharpCode.Core;
//
//namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
//{
// /// <summary>
// /// Summary description for Form2.
// /// </summary>
// public class ConfigurationManager : System.Windows.Forms.Form
// {
// private System.Windows.Forms.TreeView treeView1;
// private System.Windows.Forms.Label label1;
// private System.Windows.Forms.Label label2;
// private System.Windows.Forms.ComboBox comboBox1;
// private System.Windows.Forms.Label label3;
// private System.Windows.Forms.Button okButton;
// private System.Windows.Forms.Button cancelButton;
// private System.Windows.Forms.Button helpButton;
// private System.Windows.Forms.GroupBox groupBox1;
// private System.Windows.Forms.ComboBox comboBox2;
// private System.Windows.Forms.Label label4;
// private System.Windows.Forms.Label label5;
// private System.Windows.Forms.TextBox textBox1;
// private System.Windows.Forms.Button createButton;
// private System.Windows.Forms.Button removeButton;
// private System.Windows.Forms.Button renameButton;
// /// <summary>
// /// Required designer variable.
// /// </summary>
// private System.ComponentModel.Container components = null;
//
//
// public ConfigurationManager()
// {
// //
// // Required for Windows Form Designer support
// //
// InitializeComponent();
//
// //
// // TODO: Add any constructor code after InitializeComponent call
// //
// }
//
// /// <summary>
// /// Clean up any resources being used.
// /// </summary>
// protected override void Dispose(bool disposing)
// {
// if (disposing) {
// if (components != null){
// components.Dispose();
// }
// }
// base.Dispose(disposing);
// }
//
// #region Windows Form Designer generated code
// /// <summary>
// /// Required method for Designer support - do not modify
// /// the contents of this method with the code editor.
// /// </summary>
// private void InitializeComponent()
// {
// bool flat = true;
//
// this.treeView1 = new System.Windows.Forms.TreeView();
// this.label1 = new System.Windows.Forms.Label();
// this.label2 = new System.Windows.Forms.Label();
// this.comboBox1 = new System.Windows.Forms.ComboBox();
// this.label3 = new System.Windows.Forms.Label();
// this.okButton = new System.Windows.Forms.Button();
// this.cancelButton = new System.Windows.Forms.Button();
// this.helpButton = new System.Windows.Forms.Button();
// this.groupBox1 = new System.Windows.Forms.GroupBox();
// this.comboBox2 = new System.Windows.Forms.ComboBox();
// this.label4 = new System.Windows.Forms.Label();
// this.label5 = new System.Windows.Forms.Label();
// this.textBox1 = new System.Windows.Forms.TextBox();
// this.createButton = new System.Windows.Forms.Button();
// this.removeButton = new System.Windows.Forms.Button();
// this.renameButton = new System.Windows.Forms.Button();
// this.groupBox1.SuspendLayout();
// this.SuspendLayout();
// //
// // treeView1
// //
// this.treeView1.ImageIndex = -1;
// this.treeView1.Location = new System.Drawing.Point(8, 24);
// this.treeView1.Name = "treeView1";
// this.treeView1.SelectedImageIndex = -1;
// this.treeView1.Size = new System.Drawing.Size(200, 240);
// this.treeView1.TabIndex = 0;
// treeView1.BorderStyle = flat ? BorderStyle.FixedSingle : BorderStyle.Fixed3D;
//
// //
// // label1
// //
// this.label1.Location = new System.Drawing.Point(8, 8);
// this.label1.Name = "label1";
// this.label1.Size = new System.Drawing.Size(88, 16);
// this.label1.TabIndex = 1;
// this.label1.Text = "Entries:";
// //
// // label2
// //
// this.label2.Location = new System.Drawing.Point(216, 24);
// this.label2.Name = "label2";
// this.label2.Size = new System.Drawing.Size(88, 16);
// this.label2.TabIndex = 2;
// this.label2.Text = "Configuration";
// //
// // comboBox1
// //
// this.comboBox1.DropDownWidth = 264;
// this.comboBox1.Location = new System.Drawing.Point(216, 40);
// this.comboBox1.Name = "comboBox1";
// this.comboBox1.Size = new System.Drawing.Size(264, 21);
// this.comboBox1.TabIndex = 3;
// //
// // label3
// //
// label3.BorderStyle = flat ? BorderStyle.FixedSingle : BorderStyle.Fixed3D;
// this.label3.Location = new System.Drawing.Point(216, 264);
// this.label3.Name = "label3";
// this.label3.Size = new System.Drawing.Size(272, 2);
// this.label3.TabIndex = 4;
// //
// // okButton
// //
// this.okButton.Location = new System.Drawing.Point(256, 272);
// this.okButton.Name = "okButton";
// this.okButton.Size = new System.Drawing.Size(74, 23);
// this.okButton.TabIndex = 5;
// this.okButton.Text = "OK";
// this.okButton.Click += new System.EventHandler(this.button1_Click);
// okButton.FlatStyle = flat ? FlatStyle.Flat : FlatStyle.Standard;
// //
// // cancelButton
// //
// this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
// this.cancelButton.Location = new System.Drawing.Point(336, 272);
// this.cancelButton.Name = "cancelButton";
// this.cancelButton.Size = new System.Drawing.Size(74, 23);
// this.cancelButton.TabIndex = 6;
// this.cancelButton.Text = "Cancel";
// this.cancelButton.Click += new System.EventHandler(this.button2_Click);
// cancelButton.FlatStyle = flat ? FlatStyle.Flat : FlatStyle.Standard;
//
// //
// // helpButton
// //
// this.helpButton.Location = new System.Drawing.Point(416, 272);
// this.helpButton.Name = "helpButton";
// this.helpButton.Size = new System.Drawing.Size(74, 23);
// this.helpButton.TabIndex = 7;
// this.helpButton.Text = "Help";
// this.helpButton.Click += new System.EventHandler(this.button3_Click);
// helpButton.FlatStyle = flat ? FlatStyle.Flat : FlatStyle.Standard;
//
// //
// // groupBox1
// //
// this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {
// this.createButton,
// this.textBox1,
// this.label5,
// this.comboBox2,
// this.label4});
// this.groupBox1.Location = new System.Drawing.Point(216, 104);
// this.groupBox1.Name = "groupBox1";
// this.groupBox1.Size = new System.Drawing.Size(264, 144);
// this.groupBox1.TabIndex = 8;
// this.groupBox1.TabStop = false;
// this.groupBox1.Text = "Create new Configuration";
// groupBox1.FlatStyle = flat ? FlatStyle.Flat : FlatStyle.Standard;
//
// //
// // comboBox2
// //
// this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
// this.comboBox2.DropDownWidth = 264;
// this.comboBox2.Location = new System.Drawing.Point(8, 80);
// this.comboBox2.Name = "comboBox2";
// this.comboBox2.Size = new System.Drawing.Size(248, 21);
// this.comboBox2.TabIndex = 3;
// //
// // label4
// //
// this.label4.Location = new System.Drawing.Point(8, 64);
// this.label4.Name = "label4";
// this.label4.Size = new System.Drawing.Size(128, 16);
// this.label4.TabIndex = 2;
// this.label4.Text = "Copy settings from";
// //
// // label5
// //
// this.label5.Location = new System.Drawing.Point(8, 16);
// this.label5.Name = "label5";
// this.label5.Size = new System.Drawing.Size(40, 16);
// this.label5.TabIndex = 4;
// this.label5.Text = "Name";
// //
// // textBox1
// //
// this.textBox1.Location = new System.Drawing.Point(8, 32);
// this.textBox1.Name = "textBox1";
// this.textBox1.Size = new System.Drawing.Size(248, 20);
// this.textBox1.TabIndex = 5;
// this.textBox1.Text = "";
// textBox1.BorderStyle = flat ? BorderStyle.FixedSingle : BorderStyle.Fixed3D;
//
// //
// // createButton
// //
// this.createButton.Location = new System.Drawing.Point(8, 112);
// this.createButton.Name = "createButton";
// this.createButton.TabIndex = 6;
// this.createButton.Text = "Create";
// createButton.FlatStyle = flat ? FlatStyle.Flat : FlatStyle.Standard;
//
// //
// // removeButton
// //
// this.removeButton.Location = new System.Drawing.Point(216, 72);
// this.removeButton.Name = "removeButton";
// this.removeButton.TabIndex = 9;
// this.removeButton.Text = "Remove";
// removeButton.FlatStyle = flat ? FlatStyle.Flat : FlatStyle.Standard;
//
// //
// // renameButton
// //
// this.renameButton.Location = new System.Drawing.Point(296, 72);
// this.renameButton.Name = "renameButton";
// this.renameButton.TabIndex = 10;
// this.renameButton.Text = "Rename";
// renameButton.FlatStyle = flat ? FlatStyle.Flat : FlatStyle.Standard;
//
// //
// // Form2
// //
// this.AcceptButton = this.okButton;
// this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
// this.CancelButton = this.cancelButton;
// this.ClientSize = new System.Drawing.Size(498, 303);
// this.Controls.AddRange(new System.Windows.Forms.Control[] {this.renameButton,
// this.removeButton,
// this.groupBox1,
// this.helpButton,
// this.cancelButton,
// this.okButton,
// this.label3,
// this.comboBox1,
// this.label2,
// this.label1,
// this.treeView1});
// this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
// this.MaximizeBox = false;
// this.MinimizeBox = false;
// this.Name = "Form2";
// this.ShowInTaskbar = false;
// this.Text = "Configuration Manager";
// this.Load += new System.EventHandler(this.Form2_Load);
// this.groupBox1.ResumeLayout(false);
// this.ResumeLayout(false);
//
// }
// #endregion
//
// private void button3_Click(object sender, System.EventArgs e)
// {
//
// }
//
// private void button1_Click(object sender, System.EventArgs e)
// {
//
// }
//
// private void Form2_Load(object sender, System.EventArgs e)
// {
//
// }
//
// private void button2_Click(object sender, System.EventArgs e)
// {
//
// }
// }
//}

187
src/Main/Base/Project/Src/Gui/Dialogs/SolutionConfiguration/SolutionConfigurationEditor.Designer.cs generated

@ -0,0 +1,187 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version>
// </file>
namespace ICSharpCode.SharpDevelop.Gui
{
partial class SolutionConfigurationEditor : System.Windows.Forms.Form
{
/// <summary>
/// Designer variable used to keep track of non-visual components.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Disposes resources used by the form.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing) {
if (components != null) {
components.Dispose();
}
}
base.Dispose(disposing);
}
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent()
{
this.panel1 = new System.Windows.Forms.Panel();
this.platformComboBox = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.configurationComboBox = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.grid = new System.Windows.Forms.DataGridView();
this.projectNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.configurationColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
this.platformColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
this.panel2 = new System.Windows.Forms.Panel();
this.okButton = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.grid)).BeginInit();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.platformComboBox);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.configurationComboBox);
this.panel1.Controls.Add(this.label1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(504, 37);
this.panel1.TabIndex = 0;
//
// platformComboBox
//
this.platformComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.platformComboBox.FormattingEnabled = true;
this.platformComboBox.Location = new System.Drawing.Point(326, 6);
this.platformComboBox.Name = "platformComboBox";
this.platformComboBox.Size = new System.Drawing.Size(121, 21);
this.platformComboBox.TabIndex = 3;
this.platformComboBox.SelectedIndexChanged += new System.EventHandler(this.PlatformComboBoxSelectedIndexChanged);
//
// label2
//
this.label2.Location = new System.Drawing.Point(265, 9);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(64, 23);
this.label2.TabIndex = 2;
this.label2.Text = "Platform:";
this.label2.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// configurationComboBox
//
this.configurationComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.configurationComboBox.FormattingEnabled = true;
this.configurationComboBox.Location = new System.Drawing.Point(138, 6);
this.configurationComboBox.Name = "configurationComboBox";
this.configurationComboBox.Size = new System.Drawing.Size(121, 21);
this.configurationComboBox.TabIndex = 1;
this.configurationComboBox.SelectedIndexChanged += new System.EventHandler(this.ConfigurationComboBoxSelectedIndexChanged);
//
// label1
//
this.label1.Location = new System.Drawing.Point(3, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(138, 23);
this.label1.TabIndex = 0;
this.label1.Text = "Solution configuration:";
this.label1.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// grid
//
this.grid.AllowUserToAddRows = false;
this.grid.AllowUserToDeleteRows = false;
this.grid.AllowUserToResizeRows = false;
this.grid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.grid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.projectNameColumn,
this.configurationColumn,
this.platformColumn});
this.grid.Dock = System.Windows.Forms.DockStyle.Fill;
this.grid.Location = new System.Drawing.Point(0, 37);
this.grid.Name = "grid";
this.grid.Size = new System.Drawing.Size(504, 192);
this.grid.TabIndex = 1;
this.grid.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.GridCellValueChanged);
this.grid.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.GridDataError);
//
// projectNameColumn
//
this.projectNameColumn.HeaderText = "Project Name";
this.projectNameColumn.Name = "projectNameColumn";
this.projectNameColumn.ReadOnly = true;
//
// configurationColumn
//
this.configurationColumn.HeaderText = "Configuration";
this.configurationColumn.Name = "configurationColumn";
//
// platformColumn
//
this.platformColumn.HeaderText = "Platform";
this.platformColumn.Name = "platformColumn";
//
// panel2
//
this.panel2.Controls.Add(this.okButton);
this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel2.Location = new System.Drawing.Point(0, 229);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(504, 30);
this.panel2.TabIndex = 2;
//
// okButton
//
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
this.okButton.Location = new System.Drawing.Point(417, 3);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(75, 23);
this.okButton.TabIndex = 0;
this.okButton.Text = "${res:Global.OKButtonText}";
this.okButton.UseVisualStyleBackColor = true;
//
// SolutionConfigurationEditor
//
this.AcceptButton = this.okButton;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(504, 259);
this.Controls.Add(this.grid);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.MinimumSize = new System.Drawing.Size(457, 145);
this.Name = "SolutionConfigurationEditor";
this.Text = "Configuration Editor";
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.grid)).EndInit();
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
}
private System.Windows.Forms.DataGridView grid;
private System.Windows.Forms.ComboBox configurationComboBox;
private System.Windows.Forms.ComboBox platformComboBox;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.DataGridViewComboBoxColumn platformColumn;
private System.Windows.Forms.DataGridViewComboBoxColumn configurationColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn projectNameColumn;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Panel panel1;
}
}

168
src/Main/Base/Project/Src/Gui/Dialogs/SolutionConfiguration/SolutionConfigurationEditor.cs

@ -0,0 +1,168 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.SharpDevelop.Gui
{
public partial class SolutionConfigurationEditor
{
Solution solution;
bool inUpdate;
int configurationComboBoxEditIndex;
int platformComboBoxEditIndex;
public SolutionConfigurationEditor()
{
this.solution = ProjectService.OpenSolution;
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
this.Text = StringParser.Parse(this.Text);
label1.Text = StringParser.Parse(label1.Text);
label2.Text = StringParser.Parse(label2.Text);
okButton.Text = StringParser.Parse(okButton.Text);
//cancelButton.Text = StringParser.Parse(cancelButton.Text);
inUpdate = true;
SetItems(configurationComboBox.Items, solution.GetConfigurationNames());
SetItems(platformComboBox.Items, solution.GetPlatformNames());
SelectElement(configurationComboBox, solution.Preferences.ActiveConfiguration);
SelectElement(platformComboBox, solution.Preferences.ActivePlatform);
configurationComboBoxEditIndex = configurationComboBox.Items.Add("<Edit>");
platformComboBoxEditIndex = platformComboBox.Items.Add("<Edit>");
foreach (IProject p in solution.Projects) {
DataGridViewRow row = grid.Rows[grid.Rows.Add()];
row.Tag = p;
row.Cells[0].Value = p.Name;
}
UpdateGrid();
}
void SetItems(IList items, IEnumerable<string> elements)
{
items.Clear();
foreach (string e in elements) items.Add(e);
}
void SelectElement(ComboBox box, string itemName)
{
box.SelectedIndex = box.Items.IndexOf(itemName);
}
void SelectElement(DataGridViewComboBoxCell box, string itemName)
{
if (box.Items.IndexOf(itemName) == -1) {
if (itemName == "Any CPU" && box.Items.IndexOf("AnyCPU") >= 0) {
box.Value = "AnyCPU";
} else {
box.Value = box.Items[0];
}
} else {
box.Value = itemName;
}
}
void UpdateGrid()
{
inUpdate = true;
Dictionary<IProject, Solution.ProjectConfigurationPlatformMatching> matchingDict =
new Dictionary<IProject, Solution.ProjectConfigurationPlatformMatching>();
foreach (Solution.ProjectConfigurationPlatformMatching matching in
solution.GetActiveConfigurationsAndPlatformsForProjects(configurationComboBox.Text,
platformComboBox.Text))
{
matchingDict[matching.Project] = matching;
}
foreach (DataGridViewRow row in grid.Rows) {
IProject p = (IProject)row.Tag;
Solution.ProjectConfigurationPlatformMatching matching;
if (!matchingDict.TryGetValue(p, out matching)) {
matching = new Solution.ProjectConfigurationPlatformMatching(p, p.Configuration, p.Platform, null);
}
DataGridViewComboBoxCell c1 = (DataGridViewComboBoxCell)row.Cells[1];
c1.Tag = matching;
SetItems(c1.Items, p.GetConfigurationNames());
SelectElement(c1, matching.Configuration);
DataGridViewComboBoxCell c2 = (DataGridViewComboBoxCell)row.Cells[2];
c2.Tag = matching;
SetItems(c2.Items, p.GetPlatformNames());
SelectElement(c2, matching.Platform);
}
inUpdate = false;
}
void ConfigurationComboBoxSelectedIndexChanged(object sender, EventArgs e)
{
if (!inUpdate) {
inUpdate = true;
if (configurationComboBox.SelectedIndex == configurationComboBoxEditIndex) {
MessageBox.Show("Edit configurations: Feature not implemented yet.");
SelectElement(configurationComboBox, solution.Preferences.ActiveConfiguration);
}
UpdateGrid();
}
}
void PlatformComboBoxSelectedIndexChanged(object sender, EventArgs e)
{
if (!inUpdate) {
inUpdate = true;
if (platformComboBox.SelectedIndex == platformComboBoxEditIndex) {
MessageBox.Show("Edit platforms: Feature not implemented yet.");
SelectElement(platformComboBox, solution.Preferences.ActivePlatform);
}
UpdateGrid();
}
}
void GridDataError(object sender, DataGridViewDataErrorEventArgs e)
{
e.ThrowException = true;
}
void GridCellValueChanged(object sender, DataGridViewCellEventArgs e)
{
if (!inUpdate && e.RowIndex >= 0) {
DataGridViewRow row = grid.Rows[e.RowIndex];
DataGridViewCell cell = row.Cells[e.ColumnIndex];
Solution.ProjectConfigurationPlatformMatching matching = cell.Tag as Solution.ProjectConfigurationPlatformMatching;
if (matching != null) {
if (e.ColumnIndex == configurationColumn.Index) {
matching.Configuration = cell.Value.ToString();
} else {
matching.Platform = cell.Value.ToString();
}
if (matching.SolutionItem == null) {
matching.SolutionItem = solution.CreateMatchingItem(configurationComboBox.Text,
platformComboBox.Text,
matching.Project);
}
matching.SolutionItem.Location = matching.Configuration + "|" + matching.Platform;
}
}
}
}
}

129
src/Main/Base/Project/Src/Gui/Dialogs/SolutionConfiguration/SolutionConfigurationEditor.resx

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="projectNameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="configurationColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="platformColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

62
src/Main/Base/Project/Src/Project/Solution/Solution.cs

@ -624,42 +624,68 @@ namespace ICSharpCode.SharpDevelop.Project
return platformNames; return platformNames;
} }
public void ApplySolutionConfigurationToProjects() public void ApplySolutionConfigurationAndPlatformToProjects()
{ {
ApplySolutionConfigurationAndPlatformToProjects(); foreach (ProjectConfigurationPlatformMatching l in
GetActiveConfigurationsAndPlatformsForProjects(preferences.ActiveConfiguration,
preferences.ActivePlatform))
{
l.Project.Configuration = l.Configuration;
l.Project.Platform = l.Platform;
}
} }
public void ApplySolutionPlatformToProjects() internal class ProjectConfigurationPlatformMatching
{ {
ApplySolutionConfigurationAndPlatformToProjects(); public readonly IProject Project;
public string Configuration;
public string Platform;
public SolutionItem SolutionItem;
public ProjectConfigurationPlatformMatching(IProject project, string configuration, string platform, SolutionItem solutionItem)
{
this.Project = project;
this.Configuration = configuration;
this.Platform = platform;
this.SolutionItem = solutionItem;
}
} }
public void ApplySolutionConfigurationAndPlatformToProjects() internal List<ProjectConfigurationPlatformMatching>
GetActiveConfigurationsAndPlatformsForProjects(string solutionConfiguration, string solutionPlatform)
{ {
string conf = preferences.ActiveConfiguration; List<ProjectConfigurationPlatformMatching> results = new List<ProjectConfigurationPlatformMatching>();
string plat = preferences.ActivePlatform;
ProjectSection prjSec = GetProjectConfigurationsSection(); ProjectSection prjSec = GetProjectConfigurationsSection();
Dictionary<string, string> dict = new Dictionary<string, string>(); Dictionary<string, SolutionItem> dict = new Dictionary<string, SolutionItem>();
foreach (SolutionItem item in prjSec.Items) { foreach (SolutionItem item in prjSec.Items) {
dict[item.Name] = item.Location; dict[item.Name] = item;
} }
string searchKeyPostFix = "." + conf + "|" + plat + ".Build.0"; string searchKeyPostFix = "." + solutionConfiguration + "|" + solutionPlatform + ".Build.0";
foreach (IProject p in Projects) { foreach (IProject p in Projects) {
string searchKey = p.IdGuid + searchKeyPostFix; string searchKey = p.IdGuid + searchKeyPostFix;
string targetConfPlat; SolutionItem solutionItem;
if (dict.TryGetValue(searchKey, out targetConfPlat)) { if (dict.TryGetValue(searchKey, out solutionItem)) {
string targetConfPlat = solutionItem.Location;
if (targetConfPlat.IndexOf('|') > 0) { if (targetConfPlat.IndexOf('|') > 0) {
p.Configuration = AbstractProject.GetConfigurationNameFromKey(targetConfPlat); string conf = AbstractProject.GetConfigurationNameFromKey(targetConfPlat);
p.Platform = AbstractProject.GetPlatformNameFromKey(targetConfPlat); string plat = AbstractProject.GetPlatformNameFromKey(targetConfPlat);
results.Add(new ProjectConfigurationPlatformMatching(p, conf, plat, solutionItem));
} else { } else {
p.Configuration = targetConfPlat; results.Add(new ProjectConfigurationPlatformMatching(p, targetConfPlat, solutionPlatform, solutionItem));
p.Platform = plat;
} }
} else { } else {
p.Configuration = conf; results.Add(new ProjectConfigurationPlatformMatching(p, solutionConfiguration, solutionPlatform, null));
p.Platform = plat;
} }
} }
return results;
}
internal SolutionItem CreateMatchingItem(string solutionConfiguration, string solutionPlatform, IProject project)
{
SolutionItem item = new SolutionItem(project.IdGuid + "." + solutionConfiguration + "|"
+ solutionPlatform + ".Build.0", "");
GetProjectConfigurationsSection().Items.Add(item);
return item;
} }
static Solution solutionBeingLoaded; static Solution solutionBeingLoaded;

Loading…
Cancel
Save