Solution 1 is perfectly valid, it seems you are stuck on the idea 'I have to use an OpenFileDialog'. In fact, you need to open all files (whether they have the same extension or not) in a given folder and its subfolders.
Let me try to translate that to VB (that's not my favorite) according to what you already have:
Dim rootPath As String
Using dialog As New FolderBrowserDialog()
If (dialog.DialogResult = DialogResult.OK)
rootPath = dialog.SelectedPath
End If
End Using
If Not String.IsNullOrEmpty(rootPath)
Dim files As String() = Directory.GetFiles(rootPath, "*.*", SearchOption.AllDirectories)
Parallel.ForEach(files, Sub(currentFile)
Crypto.HashSum512.HashSum.FileToCheck = currentFile
Dim ValueHash = Crypto.HashSum512.HashSum.ComputeHash
Dim safedelegate As New SafeThreadedText(AddressOf ChangeUiOutput)
Dim SafeThreadValueHash As String = currentFile.ToString & vbTab & ValueHash & vbCrLf
WaitEvents.Set()
Me.Invoke(safedelegate, SafeThreadValueHash)
End Sub)
End If
If you have to process only a subset of all the files in the root folder, you can use another parameter than
*.*
in the GetFiles() call.
Keep trying; it would be such a pity to restart a project from scratch just because of such a trivial problem.
As for '
start from scratch with a new language': you don't really think it's a language problem, do you?