Customize Msgbox title, handle minDate when file not found, show filename in msgbox

This commit is contained in:
Jonathan Jenne
2021-05-04 14:06:08 +02:00
parent 580597569d
commit e029c20ae9
3 changed files with 35 additions and 81 deletions

View File

@@ -194,25 +194,9 @@ Public Class ClassFolderWatcher
'Die Datei übergeben
LOGGER.Info(">> OnCreated-File:" & e.FullPath)
Dim oFileExists As Date = ClassIndexFunctions.FileExistsinDropTable(e.FullPath)
If IsNothing(oFileExists) Then
If ClassIndexFunctions.CheckDuplicateFiles(e.FullPath, "FolderWatch/Scan") Then
ClassFilehandle.Decide_FileHandle(e.FullPath, oHandleType)
Else
Dim oResult As DialogResult
Dim oDate As String = oFileExists.ToString("d")
If USER_LANGUAGE = "de-DE" Then
oResult = MsgBox($"Die Datei wurde bereits am [{oDate}] verarbeitet. Wollen Sie die gleiche Datei noch einmal verarbeiten?", MsgBoxStyle.Question Or MsgBoxStyle.YesNo, "GLOBIX - FolderWatch")
Else
oResult = MsgBox($"This file has already been processed at [{oDate}]. Do you want to process the same file again?", MsgBoxStyle.Question Or MsgBoxStyle.YesNo, "GLOBIX - FolderWatch")
End If
If oResult = DialogResult.Yes Then
ClassFilehandle.Decide_FileHandle(e.FullPath, oHandleType)
End If
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in folder_watch_Created")
End Try