ZooFlow: clean up
This commit is contained in:
parent
4d8d00f6df
commit
eb59a4e13d
@ -19,7 +19,7 @@ Public Class ClassFolderwatcher
|
|||||||
FWFolderWatcher.EnableRaisingEvents = False
|
FWFolderWatcher.EnableRaisingEvents = False
|
||||||
My.Application.Globix.Folderwatchstarted = False
|
My.Application.Globix.Folderwatchstarted = False
|
||||||
'FolderWatch neu instanzieren
|
'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")
|
Logger.Info(" >> FolderWatch neu instanziert")
|
||||||
FWFolderWatcher.IncludeSubdirectories = False
|
FWFolderWatcher.IncludeSubdirectories = False
|
||||||
FWFolderWatcher.EnableRaisingEvents = True
|
FWFolderWatcher.EnableRaisingEvents = True
|
||||||
@ -56,12 +56,12 @@ Public Class ClassFolderwatcher
|
|||||||
End Function
|
End Function
|
||||||
Public Function StartStop_FolderWatch()
|
Public Function StartStop_FolderWatch()
|
||||||
Try
|
Try
|
||||||
If My.Application.Globix.CURRENT_FOLDERWATCH = "" Then
|
If My.Application.Globix.CurrentFolderWatchPath = "" Then
|
||||||
'MsgBox("Bitte definieren Sie einen Überwachungsordner:", MsgBoxStyle.Exclamation)
|
'MsgBox("Bitte definieren Sie einen Überwachungsordner:", MsgBoxStyle.Exclamation)
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
If FWFolderWatcher Is Nothing Then
|
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")
|
Logger.Info(" >> FolderWatch Gestartet")
|
||||||
FWFolderWatcher.IncludeSubdirectories = False
|
FWFolderWatcher.IncludeSubdirectories = False
|
||||||
FWFolderWatcher.EnableRaisingEvents = True
|
FWFolderWatcher.EnableRaisingEvents = True
|
||||||
@ -75,7 +75,7 @@ Public Class ClassFolderwatcher
|
|||||||
If FWFolderWatcher.EnableRaisingEvents = False Then
|
If FWFolderWatcher.EnableRaisingEvents = False Then
|
||||||
' Dim watcher As New FileSystemWatcher()
|
' Dim watcher As New FileSystemWatcher()
|
||||||
' watcher.Path = CURRENT_FOLDERWATCH
|
' 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")
|
Logger.Info(" >> FolderWatch Gestartet")
|
||||||
FWFolderWatcher.IncludeSubdirectories = False
|
FWFolderWatcher.IncludeSubdirectories = False
|
||||||
FWFolderWatcher.EnableRaisingEvents = True
|
FWFolderWatcher.EnableRaisingEvents = True
|
||||||
@ -97,6 +97,7 @@ Public Class ClassFolderwatcher
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
Logger.Error(ex.Message)
|
||||||
MsgBox("Error in StartStop_FolderWatch:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
MsgBox("Error in StartStop_FolderWatch:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||||
Return 99
|
Return 99
|
||||||
End Try
|
End Try
|
||||||
@ -118,7 +119,7 @@ Public Class ClassFolderwatcher
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If FWScan Is Nothing Then
|
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")
|
Logger.Info(" >> FolderWatch Scan Gestartet")
|
||||||
FWScan.IncludeSubdirectories = False
|
FWScan.IncludeSubdirectories = False
|
||||||
FWScan.EnableRaisingEvents = True
|
FWScan.EnableRaisingEvents = True
|
||||||
@ -149,6 +150,7 @@ Public Class ClassFolderwatcher
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
Logger.Error(ex.Message)
|
||||||
MsgBox("Error in StartStop_FolderWatchSCAN:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
MsgBox("Error in StartStop_FolderWatchSCAN:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||||
Return 99
|
Return 99
|
||||||
End Try
|
End Try
|
||||||
@ -194,6 +196,7 @@ Public Class ClassFolderwatcher
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
Logger.Error(ex.Message)
|
||||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in folder_watch_Created")
|
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in folder_watch_Created")
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ Namespace Globix
|
|||||||
Public Property TEMP_FILES As List(Of String) = New List(Of String)
|
Public Property TEMP_FILES As List(Of String) = New List(Of String)
|
||||||
Public Property CurrMessageID As String
|
Public Property CurrMessageID As String
|
||||||
Public Property CURRENT_FILENAME As String
|
Public Property CURRENT_FILENAME As String
|
||||||
Public Property CURRENT_FOLDERWATCH As String
|
Public Property CurrentFolderWatchPath As String
|
||||||
Public Property CURRENT_SCAN_FOLDERWATCH As String
|
Public Property CURRENT_SCAN_FOLDERWATCH As String
|
||||||
Public Property CURRENT_WORKFILE_GUID As Long
|
Public Property CURRENT_WORKFILE_GUID As Long
|
||||||
Public Property CURRENT_WORKFILE As String
|
Public Property CURRENT_WORKFILE As String
|
||||||
|
|||||||
@ -45,7 +45,7 @@ Public Class frmGlobixBasicConfig
|
|||||||
'SaveConfigValue("FW_started", "False")
|
'SaveConfigValue("FW_started", "False")
|
||||||
My.UIConfig.Globix.FolderWatchStarted = False
|
My.UIConfig.Globix.FolderWatchStarted = False
|
||||||
My.UIConfigManager.Save()
|
My.UIConfigManager.Save()
|
||||||
My.Application.Globix.CURRENT_FOLDERWATCH = ""
|
My.Application.Globix.CurrentFolderWatchPath = ""
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@ -81,8 +81,8 @@ Public Class frmGlobixBasicConfig
|
|||||||
My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = folderwatch
|
My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = folderwatch
|
||||||
Me.txtScanFolderWatch.Text = My.Application.Globix.CURRENT_SCAN_FOLDERWATCH
|
Me.txtScanFolderWatch.Text = My.Application.Globix.CURRENT_SCAN_FOLDERWATCH
|
||||||
Else
|
Else
|
||||||
My.Application.Globix.CURRENT_FOLDERWATCH = folderwatch
|
My.Application.Globix.CurrentFolderWatchPath = folderwatch
|
||||||
Me.txtFolderWatch.Text = My.Application.Globix.CURRENT_FOLDERWATCH
|
Me.txtFolderWatch.Text = My.Application.Globix.CurrentFolderWatchPath
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If My.Application.Globix.Folderwatchstarted = True And FOLDER_TYPE = "DEFAULT" Then
|
If My.Application.Globix.Folderwatchstarted = True And FOLDER_TYPE = "DEFAULT" Then
|
||||||
@ -104,14 +104,14 @@ Public Class frmGlobixBasicConfig
|
|||||||
oReload = True
|
oReload = True
|
||||||
Dim oFolderwatch = My.Database.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'DEFAULT' AND USER_ID = " & My.Application.User.UserId)
|
Dim oFolderwatch = My.Database.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'DEFAULT' AND USER_ID = " & My.Application.User.UserId)
|
||||||
If Not oFolderwatch Is Nothing Then
|
If Not oFolderwatch Is Nothing Then
|
||||||
My.Application.Globix.CURRENT_FOLDERWATCH = oFolderwatch
|
My.Application.Globix.CurrentFolderWatchPath = oFolderwatch
|
||||||
End If
|
End If
|
||||||
Me.txtFolderWatch.Text = My.Application.Globix.CURRENT_FOLDERWATCH
|
Me.txtFolderWatch.Text = My.Application.Globix.CurrentFolderWatchPath
|
||||||
Dim oSCANFolderwatch = My.Database.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'SCAN' AND USER_ID = " & My.Application.User.UserId)
|
Dim oSCANFolderwatch = My.Database.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'SCAN' AND USER_ID = " & My.Application.User.UserId)
|
||||||
If Not oSCANFolderwatch Is Nothing Then
|
If Not oSCANFolderwatch Is Nothing Then
|
||||||
My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = oSCANFolderwatch
|
My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = oSCANFolderwatch
|
||||||
End If
|
End If
|
||||||
Me.txtFolderWatch.Text = My.Application.Globix.CURRENT_FOLDERWATCH
|
Me.txtFolderWatch.Text = My.Application.Globix.CurrentFolderWatchPath
|
||||||
Me.txtScanFolderWatch.Text = My.Application.Globix.CURRENT_SCAN_FOLDERWATCH
|
Me.txtScanFolderWatch.Text = My.Application.Globix.CURRENT_SCAN_FOLDERWATCH
|
||||||
|
|
||||||
If Not ClassFolderwatcher.FWFolderWatcher Is Nothing Then
|
If Not ClassFolderwatcher.FWFolderWatcher Is Nothing Then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user