ZooFlow: clean up

This commit is contained in:
Jonathan Jenne
2021-01-19 16:23:19 +01:00
parent 4d8d00f6df
commit eb59a4e13d
3 changed files with 15 additions and 12 deletions

View File

@@ -19,7 +19,7 @@ Public Class ClassFolderwatcher
FWFolderWatcher.EnableRaisingEvents = False
My.Application.Globix.Folderwatchstarted = False
'FolderWatch neu instanzieren
FWFolderWatcher = New System.IO.FileSystemWatcher(My.Application.Globix.CURRENT_FOLDERWATCH, "*.*")
FWFolderWatcher = New System.IO.FileSystemWatcher(My.Application.Globix.CurrentFolderWatchPath, "*.*")
Logger.Info(" >> FolderWatch neu instanziert")
FWFolderWatcher.IncludeSubdirectories = False
FWFolderWatcher.EnableRaisingEvents = True
@@ -56,12 +56,12 @@ Public Class ClassFolderwatcher
End Function
Public Function StartStop_FolderWatch()
Try
If My.Application.Globix.CURRENT_FOLDERWATCH = "" Then
If My.Application.Globix.CurrentFolderWatchPath = "" Then
'MsgBox("Bitte definieren Sie einen Überwachungsordner:", MsgBoxStyle.Exclamation)
Return False
End If
If FWFolderWatcher Is Nothing Then
FWFolderWatcher = New System.IO.FileSystemWatcher(My.Application.Globix.CURRENT_FOLDERWATCH, "*.*")
FWFolderWatcher = New System.IO.FileSystemWatcher(My.Application.Globix.CurrentFolderWatchPath, "*.*")
Logger.Info(" >> FolderWatch Gestartet")
FWFolderWatcher.IncludeSubdirectories = False
FWFolderWatcher.EnableRaisingEvents = True
@@ -75,7 +75,7 @@ Public Class ClassFolderwatcher
If FWFolderWatcher.EnableRaisingEvents = False Then
' Dim watcher As New FileSystemWatcher()
' watcher.Path = CURRENT_FOLDERWATCH
FWFolderWatcher = New System.IO.FileSystemWatcher(My.Application.Globix.CURRENT_FOLDERWATCH, "*.*")
FWFolderWatcher = New System.IO.FileSystemWatcher(My.Application.Globix.CurrentFolderWatchPath, "*.*")
Logger.Info(" >> FolderWatch Gestartet")
FWFolderWatcher.IncludeSubdirectories = False
FWFolderWatcher.EnableRaisingEvents = True
@@ -97,6 +97,7 @@ Public Class ClassFolderwatcher
End If
Catch ex As Exception
Logger.Error(ex.Message)
MsgBox("Error in StartStop_FolderWatch:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
Return 99
End Try
@@ -118,7 +119,7 @@ Public Class ClassFolderwatcher
End If
End If
If FWScan Is Nothing Then
FWScan = New System.IO.FileSystemWatcher(My.Application.Globix.CURRENT_SCAN_FOLDERWATCH, "*.*")
FWScan = New FileSystemWatcher(My.Application.Globix.CURRENT_SCAN_FOLDERWATCH, "*.*")
Logger.Info(" >> FolderWatch Scan Gestartet")
FWScan.IncludeSubdirectories = False
FWScan.EnableRaisingEvents = True
@@ -149,6 +150,7 @@ Public Class ClassFolderwatcher
End If
Catch ex As Exception
Logger.Error(ex.Message)
MsgBox("Error in StartStop_FolderWatchSCAN:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
Return 99
End Try
@@ -194,6 +196,7 @@ Public Class ClassFolderwatcher
End If
Catch ex As Exception
Logger.Error(ex.Message)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in folder_watch_Created")
End Try