This commit is contained in:
SchreiberM
2017-02-15 13:40:11 +01:00
parent 110434ea04
commit 670f5a795a
6 changed files with 244 additions and 27 deletions

View File

@@ -15,29 +15,6 @@ Public Class frmMain
Dim strIPAddress As String
Public Shared TIMER_SCAN As New System.Windows.Forms.Timer
Public Shared Sub RUN_TIMER()
Try
If TIMER_SCAN.Enabled = False And CURRENT_SCAN_FOLDERWATCH <> "" And FWSCAN_started = True Then
If System.IO.Directory.Exists(CURRENT_SCAN_FOLDERWATCH) = False Then
ClassLogger.Add(">> SCAN PATH '" & CURRENT_SCAN_FOLDERWATCH & "'not accessable!", False)
Exit Sub
End If
TIMER_SCAN.Interval = 30000
TIMER_SCAN.Enabled = True
AddHandler TIMER_SCAN.Tick, AddressOf Scan_TickHandler
Else
If TIMER_SCAN.Enabled = True And CURRENT_SCAN_FOLDERWATCH <> "" And FWSCAN_started = True Then
TIMER_SCAN.Enabled = False
RUN_TIMER()
Else
TIMER_SCAN.Enabled = False
End If
End If
Catch ex As Exception
MsgBox("Unexpected Error in RUN_TIMER:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Shared Sub Scan_TickHandler(sender As Object, e As EventArgs)
Try
If ClassFolderWatcher.NEW_FILES = False Then Exit Sub
@@ -139,6 +116,32 @@ Public Class frmMain
LabelProxyServer.Visibility = BarItemVisibility.Never
End If
End Sub
Public Shared Sub RUN_TIMER()
Try
If TIMER_SCAN.Enabled = False And CURRENT_SCAN_FOLDERWATCH <> "" And FWSCAN_started = True Then
If System.IO.Directory.Exists(CURRENT_SCAN_FOLDERWATCH) = False Then
ClassLogger.Add(">> SCAN PATH '" & CURRENT_SCAN_FOLDERWATCH & "'not accessable!", False)
Exit Sub
End If
TIMER_SCAN.Interval = 30000
TIMER_SCAN.Enabled = True
AddHandler TIMER_SCAN.Tick, AddressOf Scan_TickHandler
Else
If TIMER_SCAN.Enabled = True And CURRENT_SCAN_FOLDERWATCH <> "" And FWSCAN_started = True Then
TIMER_SCAN.Enabled = False
itemRefreshProxy.Visibility = BarItemVisibility.Always
BarButtonItemScan.visibility = always
RUN_TIMER()
Else
TIMER_SCAN.Enabled = False
End If
End If
Catch ex As Exception
MsgBox("Unexpected Error in RUN_TIMER:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Sub Load_Connection_Dep_Data()
SetBackground()
If ERROR_INIT = "NONE" Then