AGS.Editor.GUIController.ShowSelectFolderOrDefaultDialog C# (CSharp) Method

ShowSelectFolderOrDefaultDialog() public method

public ShowSelectFolderOrDefaultDialog ( string title, string defaultPath, bool allowNewFolder ) : string
title string
defaultPath string
allowNewFolder bool
return string
        public string ShowSelectFolderOrDefaultDialog(string title, string defaultPath, bool allowNewFolder)
        {
            string result = defaultPath;
            FolderBrowserDialog dialog = new FolderBrowserDialog();
            dialog.Description = title;
            dialog.ShowNewFolderButton = allowNewFolder;
            if (defaultPath.Length > 0)
            {
                dialog.SelectedPath = defaultPath;
            }
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                result = dialog.SelectedPath;
            }
            return result;
        }

Same methods

GUIController::ShowSelectFolderOrDefaultDialog ( string title, string defaultPath ) : string
GUIController