ClearCanvas.Desktop.View.WinForms.DesktopWindowView.ShowSelectFolderDialogBox C# (CSharp) Method

ShowSelectFolderDialogBox() public method

Shows a 'Select folder' dialog in front of this window.
public ShowSelectFolderDialogBox ( SelectFolderDialogCreationArgs args ) : FileDialogResult
args SelectFolderDialogCreationArgs
return FileDialogResult
    	public FileDialogResult ShowSelectFolderDialogBox(SelectFolderDialogCreationArgs args)
    	{
    		var dialog = new FolderBrowserDialog();
    		dialog.SelectedPath = args.Path ?? "";
    		dialog.Description = args.Prompt ?? "";
    		dialog.ShowNewFolderButton = args.AllowCreateNewFolder;

    		var dr = dialog.ShowDialog(_form);
    		if (dr == DialogResult.OK)
    		{
    			return new FileDialogResult(DialogBoxAction.Ok, dialog.SelectedPath);
    		}
    		return new FileDialogResult(DialogBoxAction.Cancel, (string)null);
    	}