Fixed sync setting conflict with issue #67

This commit is contained in:
MikeMaximus
2017-03-16 17:12:01 -06:00
parent c2a9d3ee77
commit 2ccc10bb9c
+2 -8
View File
@@ -919,34 +919,28 @@ Public Class frmMain
End Sub
Private Sub StartSyncWatcher()
If oSettings.Sync Then
oFileWatcher.EnableRaisingEvents = True
End If
End Sub
Private Sub StopSyncWatcher()
If oSettings.Sync Then
oFileWatcher.EnableRaisingEvents = False
End If
End Sub
Private Sub SetupSyncWatcher()
If oSettings.Sync Then
oFileWatcher.Path = oSettings.BackupFolder
oFileWatcher.Filter = "gbm.s3db"
oFileWatcher.NotifyFilter = NotifyFilters.LastWrite
End If
End Sub
Private Sub HandleSyncWatcher() Handles oFileWatcher.Changed
If oSettings.Sync Then
StopSyncWatcher()
If oSettings.Sync Then
UpdateLog(frmMain_MasterListChanged, False, ToolTipIcon.Info, True)
SyncGameSettings()
LoadGameSettings()
End If
CheckForNewBackups()
StartSyncWatcher()
End If
End Sub
Private Sub SyncGameSettings()