private void buttonBrows1_Click(object sender, System.EventArgs e) { try { if (FilePath != String.Empty) { FileSelector.InitialPath = Path.GetDirectoryName(FilePath); } } catch { } string file = ForSave ? FileSelector.BrowseFileForSave(fileType) : FileSelector.BrowseFile(fileType); if (file != null) { FilePath = file; if (FilePathBrowsed != null) { FilePathBrowsed(sender, e); } } }
public static string BrowseFile(string filter) { FileSelector.Filter = filter; return(FileSelector.BrowseFile()); }
public static string BrowseFile(FileType type) { FileSelector.FileExtension = type; return(FileSelector.BrowseFile()); }