1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
5
using ICSharpCode.Core;
6
using ICSharpCode.SharpDevelop.Project;
8
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
10
public class ReferencePaths : AbstractXmlFormsProjectOptionPanel
12
public override void LoadPanelContents()
16
StringListEditor editor = new StringListEditor();
17
editor.BrowseForDirectory = true;
18
editor.ListCaption = StringParser.Parse("&${res:Dialog.ProjectOptions.ReferencePaths}:");
19
editor.TitleText = StringParser.Parse("&${res:Dialog.ExportProjectToHtml.FolderLabel}");
20
editor.AddButtonText = StringParser.Parse("${res:Dialog.ProjectOptions.ReferencePaths.AddPath}");
21
editor.ListChanged += delegate { IsDirty = true; };
22
SemicolonSeparatedStringListBinding b = new SemicolonSeparatedStringListBinding(editor);
23
helper.AddBinding("ReferencePath", b);
24
this.Controls.Add(editor);
25
b.CreateLocationButton(editor);
27
helper.AddConfigurationSelector(this);
30
sealed class SemicolonSeparatedStringListBinding : ConfigurationGuiBinding
32
StringListEditor editor;
34
public SemicolonSeparatedStringListBinding(StringListEditor editor)
39
public override void Load()
41
string[] values = Get("").Split(';');
42
if (values.Length == 1 && values[0].Length == 0) {
43
editor.LoadList(new string[0]);
45
editor.LoadList(values);
49
public override bool Save()
51
Set(string.Join(";", editor.GetList()));