Merge branch 'master' of http://dd-vmp07-com04:3000/AppStd/Monorepo
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
Public Class ClassExclusions
|
||||
|
||||
Public Function Load(ExclusionPath As String) As Boolean
|
||||
Public Property FileExclusionPath As String = IO.Path.Combine(My.Application.UserAppDataPath, "FileExclusions.xml")
|
||||
|
||||
Public Function Load() As Boolean
|
||||
Dim rowresult As String = ""
|
||||
Try
|
||||
'if file doesn't exist, create the file with its default xml table
|
||||
If Not IO.File.Exists(My.Application.Globix.PATH_FileExclusions) Then
|
||||
If Not IO.File.Exists(FileExclusionPath) Then
|
||||
My.Application.Globix.DTEXCLUDE_FILES = CreateExclusionTable()
|
||||
My.Application.Globix.DTEXCLUDE_FILES.WriteXml(My.Application.Globix.PATH_FileExclusions)
|
||||
My.Application.Globix.DTEXCLUDE_FILES.WriteXml(FileExclusionPath)
|
||||
End If
|
||||
My.Application.Globix.DTEXCLUDE_FILES = GetTablefromXML(ExclusionPath)
|
||||
My.Application.Globix.DTEXCLUDE_FILES = GetTablefromXML(FileExclusionPath)
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -19,7 +19,6 @@ Namespace Globix
|
||||
Public Property Folderwatchstarted As Boolean = False
|
||||
Public Property ScanFolderwatchstarted As Boolean = False
|
||||
Public Property DTEXCLUDE_FILES As DataTable
|
||||
Public Property PATH_FileExclusions As String = Path.Combine(Application.UserAppDataPath(), "FileExclusions.xml")
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
@@ -3,8 +3,10 @@ Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class frmGlobixBasicConfig
|
||||
Private Logger As Logger
|
||||
Private oFormLoad As Boolean = False
|
||||
Private clsFW As ClassFolderwatcher
|
||||
Private FormLoading As Boolean = False
|
||||
Private FolderWatcher As ClassFolderwatcher
|
||||
Private ReadOnly FileExclusions As New ClassExclusions()
|
||||
|
||||
Public Sub New()
|
||||
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
@@ -72,10 +74,10 @@ Public Class frmGlobixBasicConfig
|
||||
Logger.Error($"Unexpected error in Adding Folder to TBGI_FOLDERWATCH_USER [{oSql}]")
|
||||
End If
|
||||
If My.Application.Globix.Folderwatchstarted = True And FOLDER_TYPE = "DEFAULT" Then
|
||||
clsFW.Restart_FolderWatch()
|
||||
FolderWatcher.Restart_FolderWatch()
|
||||
End If
|
||||
If My.UIConfig.Globix.FolderWatchScanStarted = True And FOLDER_TYPE = "SCAN" Then
|
||||
clsFW.Restart_FolderWatchSCAN()
|
||||
FolderWatcher.Restart_FolderWatchSCAN()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in CheckFolder:")
|
||||
@@ -85,9 +87,9 @@ Public Class frmGlobixBasicConfig
|
||||
|
||||
Private Sub frmGlobixBasicConfig_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Logger = My.LogConfig.GetLogger()
|
||||
clsFW = New ClassFolderwatcher(My.LogConfig)
|
||||
FolderWatcher = New ClassFolderwatcher(My.LogConfig)
|
||||
Try
|
||||
oFormLoad = True
|
||||
FormLoading = True
|
||||
If My.Application.Globix.Folderwatchstarted = True Then
|
||||
ToggleSwitchHotfolder.IsOn = True
|
||||
Else
|
||||
@@ -104,7 +106,7 @@ Public Class frmGlobixBasicConfig
|
||||
Me.TextEditScanfolder.Text = My.Application.Globix.CURRENT_SCAN_FOLDERWATCH
|
||||
|
||||
|
||||
oFormLoad = False
|
||||
FormLoading = False
|
||||
Me.DataGridView1.DataSource = My.Application.Globix.DTEXCLUDE_FILES
|
||||
If My.Application.GlobixDropAreaStyle = "PROGRESSIVE" Then
|
||||
Me.PictureEdit1.EditValue = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources._1_LOGO_ZOO_FLOW_DROP3
|
||||
@@ -120,14 +122,15 @@ Public Class frmGlobixBasicConfig
|
||||
|
||||
|
||||
Sub CheckFWHF_State()
|
||||
clsFW.StartStop_FolderWatch()
|
||||
FolderWatcher.StartStop_FolderWatch()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub SimpleButton1_Click(sender As Object, e As EventArgs) Handles SimpleButton1.Click
|
||||
|
||||
My.Application.Globix.DTEXCLUDE_FILES.AcceptChanges()
|
||||
My.Application.Globix.DTEXCLUDE_FILES.WriteXml(My.Application.Globix.PATH_FileExclusions)
|
||||
My.Application.Globix.DTEXCLUDE_FILES.WriteXml(FileExclusions.FileExclusionPath)
|
||||
MsgBox("Changes saved.", MsgBoxStyle.Information)
|
||||
End Sub
|
||||
|
||||
@@ -143,7 +146,7 @@ Public Class frmGlobixBasicConfig
|
||||
End Sub
|
||||
Private Sub ToggleSwitchHotfolder_Toggled(sender As Object, e As EventArgs) Handles ToggleSwitchHotfolder.Toggled
|
||||
Dim oToggle As ToggleSwitch = TryCast(sender, ToggleSwitch)
|
||||
If oFormLoad = True Then
|
||||
If FormLoading = True Then
|
||||
Exit Sub
|
||||
End If
|
||||
If oToggle.IsOn Then
|
||||
@@ -159,17 +162,17 @@ Public Class frmGlobixBasicConfig
|
||||
|
||||
Private Sub ToggleSwitch1_Toggled(sender As Object, e As EventArgs) Handles ToggleSwitchScanfolder.Toggled
|
||||
Dim oToggle As ToggleSwitch = TryCast(sender, ToggleSwitch)
|
||||
If oFormLoad = True Then
|
||||
If FormLoading = True Then
|
||||
Exit Sub
|
||||
End If
|
||||
If oToggle.IsOn Then
|
||||
If My.Application.Globix.CURRENT_SCAN_FOLDERWATCH <> "" Then
|
||||
clsFW.StartStop_FolderWatchSCAN()
|
||||
FolderWatcher.StartStop_FolderWatchSCAN()
|
||||
Else
|
||||
ToggleSwitchScanfolder.IsOn = False
|
||||
End If
|
||||
Else
|
||||
clsFW.StartStop_FolderWatchSCAN()
|
||||
FolderWatcher.StartStop_FolderWatchSCAN()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user