File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 99 ''' <summary>
1010 ''' Shows a file picker to open a file
1111 ''' </summary>
12- ''' <returns>The path of the chosen file</returns>
12+ ''' <param name="MultiSelect">Whether to allow file picker to select multiple files</param>
13+ ''' <returns>The path, or paths, of the chosen file</returns>
1314 ''' <remarks></remarks>
14- Function ShowOpenFileDialog() As String
15+ Function ShowOpenFileDialog( Optional MultiSelect As Boolean = False ) As Object
1516
1617 ''' <summary>
1718 ''' Shows a file picker to save a file
Original file line number Diff line number Diff line change @@ -41,15 +41,21 @@ Namespace Helpers.PreparationTasks
4141 ''' <summary>
4242 ''' Shows a file picker to open a file
4343 ''' </summary>
44- ''' <returns>The path of the chosen file</returns>
44+ ''' <param name="MultiSelect">Whether to allow file picker to select multiple files</param>
45+ ''' <returns>The path, or paths, of the chosen file</returns>
4546 ''' <remarks></remarks>
46- Public Function ShowOpenFileDialog() As String Implements IUserInterfaceInterop.ShowOpenFileDialog
47+ Public Function ShowOpenFileDialog( Optional MultiSelect As Boolean = False ) As Object Implements IUserInterfaceInterop.ShowOpenFileDialog
4748 Dim ofd As New OpenFileDialog() With {
48- .SupportMultiDottedExtensions = True
49+ .SupportMultiDottedExtensions = True ,
50+ .Multiselect = MultiSelect
4951 }
5052
5153 If ofd.ShowDialog() = DialogResult.OK Then
52- Return ofd.FileName
54+ If MultiSelect Then
55+ Return ofd.FileNames
56+ Else
57+ Return ofd.FileName
58+ End If
5359 End If
5460 Return ""
5561 End Function
You can’t perform that action at this time.
0 commit comments