MS Globix Folderwatch

This commit is contained in:
2022-02-25 14:41:18 +01:00
parent 80a541ff36
commit 1e3ee983e7
6 changed files with 100 additions and 107 deletions

View File

@@ -59,6 +59,7 @@ Public Class ClassFolderwatcher
My.Application.Globix.Folderwatchstarted = True
My.UIConfig.Globix.FolderWatchStarted = True
My.UIConfigManager.Save()
Logger.Info("Folderwatch successfully started!")
Return 1
End If
@@ -66,7 +67,7 @@ Public Class ClassFolderwatcher
'Gestartet also Stoppen
FWFolderWatcher.EnableRaisingEvents = False
My.Application.Globix.Folderwatchstarted = False
Logger.Info(" >> FolderWatch gestoppt")
Logger.Info("Folderwatch stopped!")
My.UIConfig.Globix.FolderWatchStarted = False
My.UIConfigManager.Save()
Return 0
@@ -78,20 +79,6 @@ Public Class ClassFolderwatcher
End Function
Public Function StartStop_FolderWatchSCAN() As Integer
Try
If My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = "" Then
If FWFolderWatcher.EnableRaisingEvents = True Then
Stop_FWSCAN()
Return 0
Else
If My.Application.User.Language = "de-DE" Then
MsgBox("Bitte definieren Sie einen Überwachungsordner für Scan-Eingänge:", MsgBoxStyle.Exclamation)
Else
MsgBox("Please define a watchfolder for Scanning:", MsgBoxStyle.Exclamation)
End If
Return False
End If
End If
If FWScan Is Nothing Then
FWScan = New FileSystemWatcher(My.Application.Globix.CURRENT_SCAN_FOLDERWATCH, "*.*")
Logger.Info(" >> FolderWatch Scan Gestartet")
@@ -152,9 +139,6 @@ Public Class ClassFolderwatcher
AddHandler oWatcher.Created, AddressOf OnCreated
Logger.Debug("Folder Watcher started for Path [{0}]", pPath)
My.UIConfig.Globix.FolderWatchScanStarted = True
My.UIConfigManager.Save()
Return oWatcher
End Function