NetIde.Services.Shell.NiShell.BrowseForFolder C# (CSharp) Method

BrowseForFolder() public method

public BrowseForFolder ( string title, NiBrowseForFolderOptions options, string &selectedFolder ) : HResult
title string
options NiBrowseForFolderOptions
selectedFolder string
return HResult
        public HResult BrowseForFolder(string title, NiBrowseForFolderOptions options, out string selectedFolder)
        {
            selectedFolder = null;

            try
            {
                var browser = new FolderBrowser
                {
                    Title = title,
                    ShowEditBox = (options & NiBrowseForFolderOptions.HideEditBox) == 0,
                    ShowNewFolderButton = (options & NiBrowseForFolderOptions.HideNewFolderButton) == 0
                };

                if (browser.ShowDialog(NetIde.Util.Forms.Form.FindDefaultOwnerWindow(this)) == DialogResult.OK)
                {
                    selectedFolder = browser.SelectedPath;

                    return HResult.OK;
                }

                return HResult.False;
            }
            catch (Exception ex)
            {
                return ErrorUtil.GetHResult(ex);
            }
        }