Exemplo n.º 1
0
        public SelectFolderResult SelectFolder()
        {
            var dialog = new CommonOpenFileDialog();
            dialog.IsFolderPicker = true;
            dialog.Multiselect = false;
            var dialogResult = dialog.ShowDialog();
            var result = new SelectFolderResult();

            if (dialogResult == CommonFileDialogResult.Ok)
            {
                result.Result = true;
                result.Folder = dialog.FileNames.FirstOrDefault();
            }

            return result;
        }
Exemplo n.º 2
0
        public SelectFolderResult SelectFolder()
        {
            var dialog = new CommonOpenFileDialog();

            dialog.IsFolderPicker = true;
            dialog.Multiselect    = false;
            var dialogResult = dialog.ShowDialog();
            var result       = new SelectFolderResult();

            if (dialogResult == CommonFileDialogResult.Ok)
            {
                result.Result = true;
                result.Folder = dialog.FileNames.FirstOrDefault();
            }

            return(result);
        }