4 changed files with 96 additions and 2 deletions
@ -0,0 +1,31 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<optionpanels:ProjectOptionPanel |
||||||
|
x:Class="ICSharpCode.SharpDevelop.Gui.OptionPanels.ReferencePaths" |
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||||
|
xmlns:core="http://icsharpcode.net/sharpdevelop/core" |
||||||
|
xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets" |
||||||
|
xmlns:project="clr-namespace:ICSharpCode.SharpDevelop.Project" |
||||||
|
xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui" |
||||||
|
xmlns:optionpanels="clr-namespace:ICSharpCode.SharpDevelop.Gui.OptionPanels"> |
||||||
|
|
||||||
|
<Grid> |
||||||
|
<Grid.RowDefinitions> |
||||||
|
<RowDefinition ></RowDefinition> |
||||||
|
</Grid.RowDefinitions> |
||||||
|
<Grid.ColumnDefinitions> |
||||||
|
<ColumnDefinition |
||||||
|
Width="40"></ColumnDefinition> |
||||||
|
<ColumnDefinition |
||||||
|
Width="300"></ColumnDefinition> |
||||||
|
</Grid.ColumnDefinitions> |
||||||
|
|
||||||
|
<optionpanels:StorageLocationPicker Margin="5,40,0,0" |
||||||
|
x:Name="location" Location="{Binding ReferencePath.Location}" /> |
||||||
|
|
||||||
|
<WindowsFormsHost Grid.Column="1" Grid.RowSpan="2"> |
||||||
|
<gui:StringListEditor x:Name="editor"/> |
||||||
|
</WindowsFormsHost> |
||||||
|
|
||||||
|
</Grid> |
||||||
|
</optionpanels:ProjectOptionPanel> |
@ -0,0 +1,58 @@ |
|||||||
|
/* |
||||||
|
* Created by SharpDevelop. |
||||||
|
* User: Peter Forstmeier |
||||||
|
* Date: 20.03.2012 |
||||||
|
* Time: 19:47 |
||||||
|
* |
||||||
|
* To change this template use Tools | Options | Coding | Edit Standard Headers. |
||||||
|
*/ |
||||||
|
using System; |
||||||
|
using ICSharpCode.Core; |
||||||
|
using ICSharpCode.SharpDevelop.Project; |
||||||
|
|
||||||
|
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels |
||||||
|
{ |
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for ReferencePathsXAML.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class ReferencePaths : ProjectOptionPanel |
||||||
|
{ |
||||||
|
public ReferencePaths() |
||||||
|
{ |
||||||
|
InitializeComponent(); |
||||||
|
editor.BrowseForDirectory = true; |
||||||
|
editor.ListCaption = StringParser.Parse("&${res:Dialog.ProjectOptions.ReferencePaths}:"); |
||||||
|
editor.TitleText = StringParser.Parse("&${res:Global.Folder}:"); |
||||||
|
editor.AddButtonText = StringParser.Parse("${res:Dialog.ProjectOptions.ReferencePaths.AddPath}"); |
||||||
|
editor.ListChanged += delegate { IsDirty = true; }; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
public ProjectProperty<string> ReferencePath { |
||||||
|
get { |
||||||
|
return GetProperty("ReferencePath", "",TextBoxEditMode.EditEvaluatedProperty); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
protected override void Load(MSBuildBasedProject project, string configuration, string platform) |
||||||
|
{ |
||||||
|
base.Load(project, configuration, platform); |
||||||
|
string prop = GetProperty("ReferencePath", "", TextBoxEditMode.EditRawProperty).Value.ToString(); |
||||||
|
|
||||||
|
string[] values = prop.Split(';'); |
||||||
|
if (values.Length == 1 && values[0].Length == 0) { |
||||||
|
editor.LoadList(new string[0]); |
||||||
|
} else { |
||||||
|
editor.LoadList(values); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
protected override bool Save(MSBuildBasedProject project, string configuration, string platform) |
||||||
|
{ |
||||||
|
ReferencePath.Value = String.Join(";", editor.GetList()); |
||||||
|
return base.Save(project, configuration, platform); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue