Esempio n. 1
0
        private string GetValue(string startFolder)
        {
            using (var dialog = new FolderBrowserDialog
            {
                SelectedPath = startFolder
            })
            {
                shower.ShowDialog(dialog);

                return(dialog.SelectedPath);
            }
        }
Esempio n. 2
0
 private string GetValue(string startLocation)
 {
     using (var dialog = new OpenFileDialog
     {
         InitialDirectory = Path.GetDirectoryName(startLocation),
         FileName = startLocation,
         Filter = "Excel spreadsheet|*.csv;*.xlsx;*.xls|All files|*.*"
     })
     {
         shower.ShowDialog(dialog);
         return(dialog.FileName);
     }
 }
Esempio n. 3
0
        private ExportResult GetValue()
        {
            using (var dialog = new SaveFileDialog
            {
                Filter = "Excel spreadsheet|*.xlsx;*.xls;|All files|*.*"
            })
            {
                shower.ShowDialog(dialog);

                if (!String.IsNullOrWhiteSpace(dialog.FileName))
                {
                    return(ExportResult.Success(dialog.FileName));
                }

                return(ExportResult.Incomplete());
            }
        }