Additions for issue #48

This commit is contained in:
Michael J. Seiferling
2016-06-07 17:11:52 -06:00
parent 0ad4fd890d
commit 2beff1b46d
15 changed files with 753 additions and 47 deletions
+14 -2
View File
@@ -18,6 +18,7 @@ Public Class mgrSettings
Private s7zArguments As String = String.Empty
Private s7zLocation As String = String.Empty
Private sBackupFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).TrimEnd(New Char() {"\", "/"})
Private eSyncFields As clsGame.eOptionalSyncFields = clsGame.eOptionalSyncFields.None Or clsGame.eOptionalSyncFields.TimeStamp
Property StartWithWindows As Boolean
Get
@@ -220,6 +221,15 @@ Public Class mgrSettings
End Set
End Property
Property SyncFields As clsGame.eOptionalSyncFields
Get
Return eSyncFields
End Get
Set(value As clsGame.eOptionalSyncFields)
eSyncFields = value
End Set
End Property
Private Sub SaveFromClass()
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
Dim sSQL As String
@@ -230,7 +240,8 @@ Public Class mgrSettings
sSQL = "INSERT INTO settings VALUES (1, @MonitorOnStartup, @StartToTray, @ShowDetectionToolTips, @DisableConfirmation, "
sSQL &= "@CreateSubFolder, @ShowOverwriteWarning, @RestoreOnLaunch, @BackupFolder, @Sync, @CheckSum, @StartWithWindows, "
sSQL &= "@TimeTracking, @SupressBackup, @SupressBackupThreshold, @CompressionLevel, @Custom7zArguments, @Custom7zLocation)"
sSQL &= "@TimeTracking, @SupressBackup, @SupressBackupThreshold, @CompressionLevel, @Custom7zArguments, @Custom7zLocation, "
sSQL &= "@SyncFields)"
hshParams.Add("MonitorOnStartup", MonitorOnStartup)
hshParams.Add("StartToTray", StartToTray)
@@ -249,7 +260,7 @@ Public Class mgrSettings
hshParams.Add("CompressionLevel", CompressionLevel)
hshParams.Add("Custom7zArguments", Custom7zArguments)
hshParams.Add("Custom7zLocation", Custom7zLocation)
hshParams.Add("SyncFields", SyncFields)
oDatabase.RunParamQuery(sSQL, hshParams)
End Sub
@@ -281,6 +292,7 @@ Public Class mgrSettings
CompressionLevel = CInt(dr("CompressionLevel"))
If Not IsDBNull(dr("Custom7zArguments")) Then Custom7zArguments = CStr(dr("Custom7zArguments"))
If Not IsDBNull(dr("Custom7zLocation")) Then Custom7zLocation = CStr(dr("Custom7zLocation"))
SyncFields = CInt(dr("SyncFields"))
Next
oDatabase.Disconnect()