Beispiel #1
0
 /// <summary>
 /// Obtain user-selected folder location for pleasant purposes
 /// </summary>
 /// <param name="title"></param>
 /// <param name="dir">dir to start nav</param>
 /// <returns>Empty if nothing selected or dlg cancelled, selected dir otherwise</returns>
 /// 
 public static string GetUsersFolder(string title, string dir)
 {
     try
     {
         FolderSelect.FolderSelectDialog fsd = new FolderSelect.FolderSelectDialog();
         fsd.Title = title;
         fsd.InitialDirectory = dir;
         if (fsd.ShowDialog())
             return fsd.FileName;
         else
             return string.Empty;
     }
     catch (Exception) { }
     return string.Empty;
 }
Beispiel #2
0
 /// <summary>
 /// Obtain user-selected folder location for pleasant purposes
 /// </summary>
 /// <param name="title"></param>
 /// <param name="dir">dir to start nav</param>
 /// <returns>Empty if nothing selected or dlg cancelled, selected dir otherwise</returns>
 ///
 public static string GetUsersFolder(string title, string dir)
 {
     try
     {
         FolderSelect.FolderSelectDialog fsd = new FolderSelect.FolderSelectDialog();
         fsd.Title            = title;
         fsd.InitialDirectory = dir;
         if (fsd.ShowDialog())
         {
             return(fsd.FileName);
         }
         else
         {
             return(string.Empty);
         }
     }
     catch (Exception) { }
     return(string.Empty);
 }