コード例 #1
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            FolderBrowser2 browser = new FolderBrowser2();

            if (value != null)
            {
                browser.DirectoryPath = string.Format("{0}", value);
            }

            if (browser.ShowDialog(null) == DialogResult.OK)
            {
                return(browser.DirectoryPath);
            }

            return(value);
        }