Skip to content

Commit bfcab1e

Browse files
committed
Use FolderNameEditor for base path option
1 parent 1b5377d commit bfcab1e

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

OptionPageGrid.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,21 @@
55
using Microsoft.VisualStudio.Shell.Interop;
66
using System;
77
using System.ComponentModel;
8+
using System.Drawing.Design;
9+
using System.Windows.Forms.Design;
810

911
namespace CopyRelativePath
1012
{
13+
// Note: A better alternative could be CommonOpenFileDialog
14+
internal class FolderEditor : FolderNameEditor
15+
{
16+
protected override void InitializeDialog(FolderBrowser folderBrowser)
17+
{
18+
base.InitializeDialog(folderBrowser);
19+
folderBrowser.Description = "Base Directory for Relative Path";
20+
}
21+
}
22+
1123
public class OptionPageGrid : DialogPage
1224
{
1325
public const string ExtensionName = "Copy Relative Path Extension";
@@ -23,6 +35,7 @@ public class OptionPageGrid : DialogPage
2335
[Category(BehaviorCategoryName)]
2436
[DisplayName("Base directory")]
2537
[Description("Absolute path to a directory that is used to resolve a relative path.\nIf empty, the solution directory is used.")]
38+
[Editor(typeof(FolderEditor), typeof(UITypeEditor))]
2639
public string OptionBasePath { get; set; }
2740

2841
[Category("URL")]

0 commit comments

Comments
 (0)