ZooFlow: clean up
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user