|
|
|
|
@ -6,10 +6,10 @@ using System.Collections.Generic;
@@ -6,10 +6,10 @@ using System.Collections.Generic;
|
|
|
|
|
using System.IO; |
|
|
|
|
using System.Linq; |
|
|
|
|
using System.Windows.Forms; |
|
|
|
|
|
|
|
|
|
using ICSharpCode.Core; |
|
|
|
|
using ICSharpCode.SharpDevelop.Project; |
|
|
|
|
using StringPair = System.Collections.Generic.KeyValuePair<System.String, System.String>; |
|
|
|
|
using ICSharpCode.SharpDevelop.Project.Converter; |
|
|
|
|
using StringPair = System.Collections.Generic.KeyValuePair<string, string>; |
|
|
|
|
|
|
|
|
|
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels |
|
|
|
|
{ |
|
|
|
|
@ -234,36 +234,18 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
@@ -234,36 +234,18 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
|
|
|
|
|
|
|
|
|
|
protected void InitTargetFramework() |
|
|
|
|
{ |
|
|
|
|
Button convertProjectToMSBuild35Button = (Button)ControlDictionary["convertProjectToMSBuild35Button"]; |
|
|
|
|
ComboBox targetFrameworkComboBox = (ComboBox)ControlDictionary["targetFrameworkComboBox"]; |
|
|
|
|
|
|
|
|
|
if (convertProjectToMSBuild35Button != null) { |
|
|
|
|
if (project.MinimumSolutionVersion <= Solution.SolutionVersionVS2008) { |
|
|
|
|
// VS05/VS08 project
|
|
|
|
|
targetFrameworkComboBox.Enabled = false; |
|
|
|
|
convertProjectToMSBuild35Button.Enabled = false; |
|
|
|
|
return; |
|
|
|
|
} else { |
|
|
|
|
// VS2010 project
|
|
|
|
|
targetFrameworkComboBox.Enabled = true; |
|
|
|
|
convertProjectToMSBuild35Button.Visible = false; |
|
|
|
|
} |
|
|
|
|
Button projectUpdateButton = ControlDictionary["projectUpdateButton"] as Button; |
|
|
|
|
if (projectUpdateButton != null) { |
|
|
|
|
projectUpdateButton.Click += delegate { |
|
|
|
|
UpgradeViewContent.Show(project.ParentSolution).Select(project as IUpgradableProject); |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
ComboBox targetFrameworkComboBox = ControlDictionary["targetFrameworkComboBox"] as ComboBox; |
|
|
|
|
if (targetFrameworkComboBox != null) { |
|
|
|
|
targetFrameworkComboBox.Enabled = false; |
|
|
|
|
targetFrameworkComboBox.Items.Add(((IUpgradableProject)project).CurrentTargetFramework.DisplayName); |
|
|
|
|
targetFrameworkComboBox.SelectedIndex = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const string TargetFrameworkProperty = "TargetFrameworkVersion"; |
|
|
|
|
ConfigurationGuiBinding targetFrameworkBinding; |
|
|
|
|
|
|
|
|
|
targetFrameworkBinding = helper.BindStringEnum( |
|
|
|
|
"targetFrameworkComboBox", TargetFrameworkProperty, |
|
|
|
|
"v2.0", |
|
|
|
|
(from targetFramework in TargetFramework.TargetFrameworks |
|
|
|
|
where targetFramework.DisplayName != null |
|
|
|
|
select new StringPair(targetFramework.Name, targetFramework.DisplayName)).ToArray()); |
|
|
|
|
targetFrameworkBinding.CreateLocationButton("targetFrameworkLabel"); |
|
|
|
|
helper.Saved += delegate { |
|
|
|
|
CompilableProject cProject = (CompilableProject)project; |
|
|
|
|
cProject.AddOrRemoveExtensions(); |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|