MS
This commit is contained in:
@@ -38,7 +38,7 @@ Public Class ClassFolderWatcher
|
||||
Public Shared Function StartStop_FolderWatch()
|
||||
Try
|
||||
If CURRENT_FOLDERWATCH = "" Then
|
||||
MsgBox("Bitte definieren Sie einen Überwachungsordner:", MsgBoxStyle.Exclamation)
|
||||
'MsgBox("Bitte definieren Sie einen Überwachungsordner:", MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End If
|
||||
If FolderWatcher Is Nothing Then
|
||||
@@ -90,8 +90,13 @@ Public Class ClassFolderWatcher
|
||||
Public Shared Function StartStop_FolderWatchSCAN()
|
||||
Try
|
||||
If CURRENT_SCAN_FOLDERWATCH = "" Then
|
||||
MsgBox("Bitte definieren Sie einen Überwachungsordner für Scan-Eingänge:", MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
If FolderWatcher.EnableRaisingEvents = True Then
|
||||
Stop_FWSCAN()
|
||||
Return 0
|
||||
Else
|
||||
MsgBox("Bitte definieren Sie einen Überwachungsordner für Scan-Eingänge:", MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
If FolderWatcher_SCAN Is Nothing Then
|
||||
FolderWatcher_SCAN = New System.IO.FileSystemWatcher(CURRENT_SCAN_FOLDERWATCH, "*.*")
|
||||
@@ -128,6 +133,18 @@ Public Class ClassFolderWatcher
|
||||
Return 99
|
||||
End Try
|
||||
End Function
|
||||
Public Shared Function Stop_FWSCAN()
|
||||
If FolderWatcher.EnableRaisingEvents = True Then
|
||||
'Gestartet also Stoppen
|
||||
FolderWatcher.EnableRaisingEvents = False
|
||||
FW_started = False
|
||||
ClassLogger.Add(" >> FolderWatch gestoppt", False)
|
||||
SaveConfigValue("FW_started", "False")
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
Private Shared Sub OnCreated(source As Object, e As FileSystemEventArgs)
|
||||
Try
|
||||
For Each row As DataRow In DTEXCLUDE_FILES.Rows
|
||||
|
||||
Reference in New Issue
Block a user