示例#1
0
        protected string BrowseForFolderInternal(string selectedPath = null, string title = null)
        {
            WpfCustomDialogManager.ConfirmAccess();
            var dialog = new VistaFolderBrowserDialog {
                SelectedPath = selectedPath, Description = title
            };

            return(dialog.ShowDialog() == true ? dialog.SelectedPath : null);
        }
示例#2
0
        protected string BrowseForFileInternal(string initialDirectory = null, string title = null,
                                               string defaultExt       = null,
                                               bool checkFileExists    = true)
        {
            WpfCustomDialogManager.ConfirmAccess();
            var dialog = new OpenFileDialog {
                InitialDirectory = initialDirectory,
                DefaultExt       = defaultExt,
                CheckFileExists  = checkFileExists,
                Title            = title
            };

            return(dialog.ShowDialog() == true ? dialog.FileName : null);
        }
示例#3
0
 public Task <string> BrowseForFile(string initialDirectory = null,
                                    string title            = null,
                                    string defaultExt       = null, bool checkFileExists = true)
 =>
 WpfCustomDialogManager.Schedule(
     () => BrowseForFileInternal(initialDirectory, title, defaultExt, checkFileExists));
示例#4
0
 public Task <string> BrowseForFolder(string selectedPath = null,
                                      string title        = null) => WpfCustomDialogManager.Schedule(() => BrowseForFolderInternal(selectedPath, title));