Updates for sync becoming mandatory

This commit is contained in:
MikeMaximus
2018-03-02 15:56:12 -06:00
parent 609ee09cfa
commit 1b6b2fa3a0
11 changed files with 75 additions and 154 deletions
+18 -10
View File
@@ -4,6 +4,7 @@ Imports System.IO
Public Class frmGameManager
Private oSettings As mgrSettings
Private sBackupFolder As String
Private bPendingRestores As Boolean = False
Private oCurrentBackupItem As clsBackup
@@ -39,12 +40,12 @@ Public Class frmGameManager
Private eCurrentMode As eModes = eModes.Disabled
Property BackupFolder As String
Property Settings As mgrSettings
Get
Return sBackupFolder & Path.DirectorySeparatorChar
Return oSettings
End Get
Set(value As String)
sBackupFolder = value
Set(value As mgrSettings)
oSettings = value
End Set
End Property
@@ -75,6 +76,15 @@ Public Class frmGameManager
End Set
End Property
Private Property BackupFolder As String
Get
Return Settings.BackupFolder & Path.DirectorySeparatorChar
End Get
Set(value As String)
sBackupFolder = value
End Set
End Property
Private Property GameData As OrderedDictionary
Get
Return oGameData
@@ -201,7 +211,6 @@ Public Class frmGameManager
oBackupItem.FileName = oBackupItem.FileName.Replace(oOriginalApp.ID, oNewApp.ID)
mgrManifest.DoManifestUpdateByManifestID(oBackupItem, mgrSQLite.Database.Local)
Next
oLocalBackupData = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Local)
End If
'Remote
@@ -213,7 +222,6 @@ Public Class frmGameManager
oBackupItem.FileName = oBackupItem.FileName.Replace(oOriginalApp.ID, oNewApp.ID)
mgrManifest.DoManifestUpdateByManifestID(oBackupItem, mgrSQLite.Database.Remote)
Next
oRemoteBackupData = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Remote)
End If
End If
End Sub
@@ -657,9 +665,6 @@ Public Class frmGameManager
CurrentBackupItem = DirectCast(oRemoteBackupData(oApp.ID), clsBackup)
'Override Path
CurrentBackupItem.RestorePath = oApp.Path
sFileName = BackupFolder & CurrentBackupItem.FileName
btnOpenBackupFile.Enabled = True
@@ -673,7 +678,6 @@ Public Class frmGameManager
lblBackupFileData.Text = frmGameManager_ErrorNoBackupExists
End If
mgrRestore.DoPathOverride(CurrentBackupItem, oApp)
lblRestorePathData.Text = CurrentBackupItem.RestorePath
Else
oComboItems.Add(New KeyValuePair(Of String, String)(String.Empty, frmGameManager_None))
@@ -1226,6 +1230,8 @@ Public Class frmGameManager
End Select
If bSuccess Then
mgrMonitorList.SyncMonitorLists(Settings.SyncFields)
LoadBackupData()
IsDirty = False
LoadData()
If eCurrentMode = eModes.View Then
@@ -1251,6 +1257,7 @@ Public Class frmGameManager
If mgrCommon.ShowMessage(frmGameManager_ConfirmGameDelete, oApp.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
mgrMonitorList.DoListDelete(oApp.ID)
mgrMonitorList.SyncMonitorLists(Settings.SyncFields)
LoadData()
eCurrentMode = eModes.Disabled
ModeChange()
@@ -1265,6 +1272,7 @@ Public Class frmGameManager
If mgrCommon.ShowMessage(frmGameManager_ConfirmMultiGameDelete, sMonitorIDs.Count, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
mgrMonitorList.DoListDeleteMulti(sMonitorIDs)
mgrMonitorList.SyncMonitorLists(Settings.SyncFields)
LoadData()
eCurrentMode = eModes.Disabled
ModeChange()
+12 -13
View File
@@ -709,7 +709,7 @@ Public Class frmMain
End If
mgrMonitorList.DoListUpdate(oProcess.GameInfo)
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
UpdateTimeSpent(dCurrentHours, oProcess.TimeSpent.TotalHours)
End Sub
@@ -840,18 +840,17 @@ Public Class frmMain
Dim frm As New frmTags
PauseScan()
frm.ShowDialog()
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
ResumeScan()
End Sub
Private Sub OpenGameManager(Optional ByVal bPendingRestores As Boolean = False)
Dim frm As New frmGameManager
PauseScan()
frm.BackupFolder = oSettings.BackupFolder
frm.Settings = oSettings
frm.PendingRestores = bPendingRestores
frm.ShowDialog()
LoadGameSettings()
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
ResumeScan()
'Handle backup trigger
@@ -901,7 +900,7 @@ Public Class frmMain
frm.GameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList)
frm.ShowDialog()
LoadGameSettings()
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
ResumeScan()
End Sub
@@ -910,7 +909,7 @@ Public Class frmMain
PauseScan()
frm.ShowDialog()
mgrPath.CustomVariablesReload()
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
ResumeScan()
End Sub
@@ -975,18 +974,18 @@ Public Class frmMain
Private Sub HandleSyncWatcher() Handles tmFileWatcherQueue.Elapsed
tmFileWatcherQueue.Stop()
StopSyncWatcher()
If oSettings.Sync Then
UpdateLog(frmMain_MasterListChanged, False, ToolTipIcon.Info, True)
SyncGameSettings()
LoadGameSettings()
End If
UpdateLog(frmMain_MasterListChanged, False, ToolTipIcon.Info, True)
SyncGameSettings()
LoadGameSettings()
CheckForNewBackups()
StartSyncWatcher()
End Sub
Private Sub SyncGameSettings()
'Sync Monitor List
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields, False)
mgrMonitorList.SyncMonitorLists(oSettings.SyncFields, False)
End Sub
Private Sub LocalDatabaseCheck()
@@ -1477,7 +1476,7 @@ Public Class frmMain
oSettings.BackupFolder = sBackupPath
oSettings.SaveSettings()
oSettings.LoadSettings()
If oSettings.Sync Then mgrMonitorList.HandleBackupLocationChange(oSettings)
mgrMonitorList.HandleBackupLocationChange(oSettings)
End If
Return True
Else
+13 -26
View File
@@ -29,7 +29,6 @@ Partial Class frmSettings
Me.chkAutoSaveLog = New System.Windows.Forms.CheckBox()
Me.btnOptionalFields = New System.Windows.Forms.Button()
Me.chkTimeTracking = New System.Windows.Forms.CheckBox()
Me.chkSync = New System.Windows.Forms.CheckBox()
Me.chkShowDetectionTips = New System.Windows.Forms.CheckBox()
Me.grpFolderOptions = New System.Windows.Forms.GroupBox()
Me.btnBackupFolder = New System.Windows.Forms.Button()
@@ -124,7 +123,7 @@ Partial Class frmSettings
'chkAutoSaveLog
'
Me.chkAutoSaveLog.AutoSize = True
Me.chkAutoSaveLog.Location = New System.Drawing.Point(12, 251)
Me.chkAutoSaveLog.Location = New System.Drawing.Point(12, 262)
Me.chkAutoSaveLog.Name = "chkAutoSaveLog"
Me.chkAutoSaveLog.Size = New System.Drawing.Size(231, 17)
Me.chkAutoSaveLog.TabIndex = 5
@@ -133,11 +132,11 @@ Partial Class frmSettings
'
'btnOptionalFields
'
Me.btnOptionalFields.Location = New System.Drawing.Point(103, 61)
Me.btnOptionalFields.Location = New System.Drawing.Point(5, 65)
Me.btnOptionalFields.Name = "btnOptionalFields"
Me.btnOptionalFields.Size = New System.Drawing.Size(134, 23)
Me.btnOptionalFields.Size = New System.Drawing.Size(216, 23)
Me.btnOptionalFields.TabIndex = 3
Me.btnOptionalFields.Text = "Choose &Optional Fields..."
Me.btnOptionalFields.Text = "Choose &Optional Sync Fields..."
Me.btnOptionalFields.UseVisualStyleBackColor = True
'
'chkTimeTracking
@@ -150,20 +149,10 @@ Partial Class frmSettings
Me.chkTimeTracking.Text = "Enable time tracking"
Me.chkTimeTracking.UseVisualStyleBackColor = True
'
'chkSync
'
Me.chkSync.AutoSize = True
Me.chkSync.Location = New System.Drawing.Point(6, 65)
Me.chkSync.Name = "chkSync"
Me.chkSync.Size = New System.Drawing.Size(98, 17)
Me.chkSync.TabIndex = 2
Me.chkSync.Text = "Enable syncing"
Me.chkSync.UseVisualStyleBackColor = True
'
'chkShowDetectionTips
'
Me.chkShowDetectionTips.AutoSize = True
Me.chkShowDetectionTips.Location = New System.Drawing.Point(12, 228)
Me.chkShowDetectionTips.Location = New System.Drawing.Point(12, 239)
Me.chkShowDetectionTips.Name = "chkShowDetectionTips"
Me.chkShowDetectionTips.Size = New System.Drawing.Size(159, 17)
Me.chkShowDetectionTips.TabIndex = 4
@@ -372,9 +361,9 @@ Partial Class frmSettings
Me.grpBackupHandling.Controls.Add(Me.chkRestoreNotify)
Me.grpBackupHandling.Controls.Add(Me.chkAutoMark)
Me.grpBackupHandling.Location = New System.Drawing.Point(6, 88)
Me.grpBackupHandling.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2)
Me.grpBackupHandling.Margin = New System.Windows.Forms.Padding(2)
Me.grpBackupHandling.Name = "grpBackupHandling"
Me.grpBackupHandling.Padding = New System.Windows.Forms.Padding(2, 2, 2, 2)
Me.grpBackupHandling.Padding = New System.Windows.Forms.Padding(2)
Me.grpBackupHandling.Size = New System.Drawing.Size(354, 87)
Me.grpBackupHandling.TabIndex = 1
Me.grpBackupHandling.TabStop = False
@@ -384,7 +373,7 @@ Partial Class frmSettings
'
Me.chkAutoRestore.AutoSize = True
Me.chkAutoRestore.Location = New System.Drawing.Point(8, 41)
Me.chkAutoRestore.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2)
Me.chkAutoRestore.Margin = New System.Windows.Forms.Padding(2)
Me.chkAutoRestore.Name = "chkAutoRestore"
Me.chkAutoRestore.Size = New System.Drawing.Size(190, 17)
Me.chkAutoRestore.TabIndex = 1
@@ -395,7 +384,7 @@ Partial Class frmSettings
'
Me.chkRestoreNotify.AutoSize = True
Me.chkRestoreNotify.Location = New System.Drawing.Point(8, 19)
Me.chkRestoreNotify.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2)
Me.chkRestoreNotify.Margin = New System.Windows.Forms.Padding(2)
Me.chkRestoreNotify.Name = "chkRestoreNotify"
Me.chkRestoreNotify.Size = New System.Drawing.Size(216, 17)
Me.chkRestoreNotify.TabIndex = 0
@@ -464,7 +453,7 @@ Partial Class frmSettings
'lblMinutes
'
Me.lblMinutes.AutoSize = True
Me.lblMinutes.Location = New System.Drawing.Point(232, 205)
Me.lblMinutes.Location = New System.Drawing.Point(232, 216)
Me.lblMinutes.Name = "lblMinutes"
Me.lblMinutes.Size = New System.Drawing.Size(43, 13)
Me.lblMinutes.TabIndex = 17
@@ -472,7 +461,7 @@ Partial Class frmSettings
'
'nudSupressBackupThreshold
'
Me.nudSupressBackupThreshold.Location = New System.Drawing.Point(176, 203)
Me.nudSupressBackupThreshold.Location = New System.Drawing.Point(176, 214)
Me.nudSupressBackupThreshold.Maximum = New Decimal(New Integer() {999, 0, 0, 0})
Me.nudSupressBackupThreshold.Name = "nudSupressBackupThreshold"
Me.nudSupressBackupThreshold.Size = New System.Drawing.Size(51, 20)
@@ -481,7 +470,7 @@ Partial Class frmSettings
'chkSupressBackup
'
Me.chkSupressBackup.AutoSize = True
Me.chkSupressBackup.Location = New System.Drawing.Point(12, 204)
Me.chkSupressBackup.Location = New System.Drawing.Point(12, 215)
Me.chkSupressBackup.Name = "chkSupressBackup"
Me.chkSupressBackup.Size = New System.Drawing.Size(158, 17)
Me.chkSupressBackup.TabIndex = 2
@@ -492,11 +481,10 @@ Partial Class frmSettings
'
Me.grpGameData.Controls.Add(Me.chkSessionTracking)
Me.grpGameData.Controls.Add(Me.chkTimeTracking)
Me.grpGameData.Controls.Add(Me.chkSync)
Me.grpGameData.Controls.Add(Me.btnOptionalFields)
Me.grpGameData.Location = New System.Drawing.Point(6, 106)
Me.grpGameData.Name = "grpGameData"
Me.grpGameData.Size = New System.Drawing.Size(354, 92)
Me.grpGameData.Size = New System.Drawing.Size(354, 97)
Me.grpGameData.TabIndex = 1
Me.grpGameData.TabStop = False
Me.grpGameData.Text = "Game Data"
@@ -572,7 +560,6 @@ Partial Class frmSettings
Friend WithEvents chkShowDetectionTips As System.Windows.Forms.CheckBox
Friend WithEvents chkStartToTray As System.Windows.Forms.CheckBox
Friend WithEvents chkCreateFolder As System.Windows.Forms.CheckBox
Friend WithEvents chkSync As System.Windows.Forms.CheckBox
Friend WithEvents chkStartWindows As System.Windows.Forms.CheckBox
Friend WithEvents chkTimeTracking As System.Windows.Forms.CheckBox
Friend WithEvents grp7zGeneral As GroupBox
+2 -24
View File
@@ -68,15 +68,9 @@ Public Class frmSettings
oSettings.Custom7zArguments = txt7zArguments.Text.Trim
oSettings.Custom7zLocation = txt7zLocation.Text.Trim
'Turning syncing from off to on is the same as changing the backup folder
If chkSync.Checked = True And oSettings.Sync = False Then
bSyncSettingsChanged = True
End If
oSettings.Sync = chkSync.Checked
If Directory.Exists(txtBackupFolder.Text) Then
If oSettings.BackupFolder <> txtBackupFolder.Text Then
If chkSync.Checked Then bSyncSettingsChanged = True
bSyncSettingsChanged = True
End If
oSettings.BackupFolder = txtBackupFolder.Text
Else
@@ -96,7 +90,7 @@ Public Class frmSettings
End If
'We must trigger a sync if optional fields have changed
If Settings.Sync And (eCurrentSyncFields <> Settings.SyncFields) Then
If eCurrentSyncFields <> Settings.SyncFields Then
bSyncSettingsChanged = True
End If
@@ -181,7 +175,6 @@ Public Class frmSettings
chkAutoRestore.Checked = oSettings.AutoRestore
chkAutoMark.Checked = oSettings.AutoMark
txtBackupFolder.Text = oSettings.BackupFolder
chkSync.Checked = oSettings.Sync
chkTimeTracking.Checked = oSettings.TimeTracking
chkSessionTracking.Checked = oSettings.SessionTracking
chkSupressBackup.Checked = oSettings.SupressBackup
@@ -201,8 +194,6 @@ Public Class frmSettings
'Retrieve 7z Info
GetUtilityInfo(oSettings.Custom7zLocation)
'Toggle Sync Button
ToggleSyncButton()
End Sub
Private Sub LoadCombos()
@@ -236,14 +227,6 @@ Public Class frmSettings
lstSettings.SelectedIndex = 0
End Sub
Private Sub ToggleSyncButton()
If chkSync.Checked Then
btnOptionalFields.Enabled = True
Else
btnOptionalFields.Enabled = False
End If
End Sub
Private Sub OpenOptionalFields()
Dim frm As New frmSyncFields
frm.SyncFields = Settings.SyncFields
@@ -298,7 +281,6 @@ Public Class frmSettings
chkTimeTracking.Text = frmSettings_chkTimeTracking
chkSessionTracking.Text = frmSettings_chkSessionTracking
chkStartWindows.Text = frmSettings_chkStartWindows
chkSync.Text = frmSettings_chkSync
chkShowDetectionTips.Text = frmSettings_chkShowDetectionTips
chkAutoSaveLog.Text = frmSettings_chkAutoSaveLog
chkStartToTray.Text = frmSettings_chkStartToTray
@@ -373,10 +355,6 @@ Public Class frmSettings
OpenOptionalFields()
End Sub
Private Sub chkSync_CheckedChanged(sender As Object, e As EventArgs) Handles chkSync.CheckedChanged
ToggleSyncButton()
End Sub
Private Sub lstSettings_SelectedValueChanged(sender As Object, e As EventArgs) Handles lstSettings.SelectedValueChanged
ChangePanel()
End Sub
+7 -19
View File
@@ -30,7 +30,6 @@ Partial Class frmStartUpWizard
Me.lblStep1Title = New System.Windows.Forms.Label()
Me.lblStep1Instructions = New System.Windows.Forms.Label()
Me.tbPage2 = New System.Windows.Forms.TabPage()
Me.chkSync = New System.Windows.Forms.CheckBox()
Me.chkCreateFolder = New System.Windows.Forms.CheckBox()
Me.lblStep2Title = New System.Windows.Forms.Label()
Me.lblStep2Instructions = New System.Windows.Forms.Label()
@@ -91,7 +90,7 @@ Partial Class frmStartUpWizard
Me.lblStep1Instructions2.Name = "lblStep1Instructions2"
Me.lblStep1Instructions2.Size = New System.Drawing.Size(303, 53)
Me.lblStep1Instructions2.TabIndex = 2
Me.lblStep1Instructions2.Text = "If you'd like to learn about advanced features or have any other questions before" & _
Me.lblStep1Instructions2.Text = "If you'd like to learn about advanced features or have any other questions before" &
" you get started, there is a detailed online manual available."
'
'llbManual
@@ -126,7 +125,6 @@ Partial Class frmStartUpWizard
'tbPage2
'
Me.tbPage2.BackColor = System.Drawing.SystemColors.Control
Me.tbPage2.Controls.Add(Me.chkSync)
Me.tbPage2.Controls.Add(Me.chkCreateFolder)
Me.tbPage2.Controls.Add(Me.lblStep2Title)
Me.tbPage2.Controls.Add(Me.lblStep2Instructions)
@@ -140,16 +138,6 @@ Partial Class frmStartUpWizard
Me.tbPage2.TabIndex = 1
Me.tbPage2.Text = "TabPage2"
'
'chkSync
'
Me.chkSync.AutoSize = True
Me.chkSync.Location = New System.Drawing.Point(17, 105)
Me.chkSync.Name = "chkSync"
Me.chkSync.Size = New System.Drawing.Size(261, 17)
Me.chkSync.TabIndex = 5
Me.chkSync.Text = "Import any existing GBM data in the backup folder"
Me.chkSync.UseVisualStyleBackColor = True
'
'chkCreateFolder
'
Me.chkCreateFolder.AutoSize = True
@@ -172,12 +160,13 @@ Partial Class frmStartUpWizard
'
'lblStep2Instructions
'
Me.lblStep2Instructions.Location = New System.Drawing.Point(14, 151)
Me.lblStep2Instructions.Location = New System.Drawing.Point(14, 103)
Me.lblStep2Instructions.Name = "lblStep2Instructions"
Me.lblStep2Instructions.Size = New System.Drawing.Size(335, 31)
Me.lblStep2Instructions.Size = New System.Drawing.Size(335, 50)
Me.lblStep2Instructions.TabIndex = 6
Me.lblStep2Instructions.Text = "GBM will store all your backup files along with a manifest database (gbm.s3db) in" & _
" this location. "
Me.lblStep2Instructions.Text = "GBM will store all your backup files along with a manifest database (gbm.s3db) in" &
" this location. Any existing GBM data in this folder will be automatically impo" &
"rted."
'
'btnFolderBrowse
'
@@ -283,7 +272,7 @@ Partial Class frmStartUpWizard
Me.lblStep4Instructions3.Name = "lblStep4Instructions3"
Me.lblStep4Instructions3.Size = New System.Drawing.Size(303, 33)
Me.lblStep4Instructions3.TabIndex = 18
Me.lblStep4Instructions3.Text = "You can change anything you've setup in this wizard and find more settings and fe" & _
Me.lblStep4Instructions3.Text = "You can change anything you've setup in this wizard and find more settings and fe" &
"atures by exploring the menus. Thanks!"
'
'lblStep4Instructions2
@@ -381,7 +370,6 @@ Partial Class frmStartUpWizard
Friend WithEvents btnOpenMonitorList As System.Windows.Forms.Button
Friend WithEvents lblStep4Instructions3 As System.Windows.Forms.Label
Friend WithEvents lblStep4Instructions2 As System.Windows.Forms.Label
Friend WithEvents chkSync As System.Windows.Forms.CheckBox
Friend WithEvents lblStep1Instructions2 As System.Windows.Forms.Label
Friend WithEvents llbManual As System.Windows.Forms.LinkLabel
End Class
+5 -8
View File
@@ -38,7 +38,6 @@ Public Class frmStartUpWizard
llbManual.Text = frmStartUpWizard_llbManual
lblStep1Title.Text = frmStartUpWizard_lblStep1Title
lblStep1Instructions.Text = frmStartUpWizard_lblStep1Instructions
chkSync.Text = frmStartUpWizard_chkSync
chkCreateFolder.Text = frmStartUpWizard_chkCreateFolder
lblStep2Title.Text = frmStartUpWizard_lblStep2Title
lblStep2Instructions.Text = frmStartUpWizard_lblStep2Instructions
@@ -80,7 +79,6 @@ Public Class frmStartUpWizard
Case eSteps.Step2
txtBackupPath.Text = oSettings.BackupFolder
chkCreateFolder.Checked = oSettings.CreateSubFolder
chkSync.Checked = oSettings.Sync
btnBack.Enabled = True
btnNext.Enabled = True
tabWizard.SelectTab(1)
@@ -109,7 +107,7 @@ Public Class frmStartUpWizard
If mgrCommon.ShowMessage(frmStartUpWizard_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrMonitorList.DoImport(sImportURL) Then
oGameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList)
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
End If
End If
End Sub
@@ -124,16 +122,16 @@ Public Class frmStartUpWizard
frm.GameData = oGameData
frm.ShowDialog()
LoadGameSettings()
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
End Sub
Private Sub OpenMonitorList()
Dim frm As New frmGameManager
frm.BackupFolder = oSettings.BackupFolder
frm.Settings = oSettings
frm.DisableExternalFunctions = True
frm.ShowDialog()
LoadGameSettings()
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
End Sub
Private Function ValidateBackupPath(ByVal strPath As String, ByRef sErrorMessage As String) As Boolean
@@ -183,10 +181,9 @@ Public Class frmStartUpWizard
If ValidateBackupPath(txtBackupPath.Text, sErrorMessage) Then
oSettings.BackupFolder = txtBackupPath.Text
oSettings.CreateSubFolder = chkCreateFolder.Checked
oSettings.Sync = chkSync.Checked
oSettings.SaveSettings()
oSettings.LoadSettings()
If oSettings.Sync Then CheckSync()
CheckSync()
eCurrentStep = eSteps.Step3
Else
bError = True
-11
View File
@@ -28,17 +28,6 @@ Public Class mgrRestore
Public Event UpdateRestoreInfo(oRestoreInfo As clsBackup)
Public Event SetLastAction(sMessage As String)
'This should only be needed by the Game Manager after v1.1.0
Public Shared Sub DoPathOverride(ByRef oCheckBackup As clsBackup, ByVal oCheckGame As clsGame)
If Path.IsPathRooted(oCheckGame.Path) Then
oCheckBackup.AbsolutePath = True
Else
oCheckBackup.AbsolutePath = False
End If
oCheckBackup.RestorePath = oCheckGame.Path
End Sub
Public Shared Function CheckPath(ByRef oRestoreInfo As clsBackup, ByVal oGame As clsGame, ByRef bTriggerReload As Boolean) As Boolean
Dim sProcess As String
Dim sRestorePath As String
+13 -2
View File
@@ -72,7 +72,7 @@ Public Class mgrSQLite
'Add Tables (Settings)
sSql = "CREATE TABLE settings (SettingsID INTEGER NOT NULL PRIMARY KEY, MonitorOnStartup BOOLEAN NOT NULL, StartToTray BOOLEAN NOT NULL, ShowDetectionToolTips BOOLEAN NOT NULL, " &
"DisableConfirmation BOOLEAN NOT NULL, CreateSubFolder BOOLEAN NOT NULL, ShowOverwriteWarning BOOLEAN NOT NULL, RestoreOnLaunch BOOLEAN NOT NULL, " &
"BackupFolder TEXT NOT NULL, Sync BOOLEAN NOT NULL, StartWithWindows BOOLEAN NOT NULL, TimeTracking BOOLEAN NOT NULL, " &
"BackupFolder TEXT NOT NULL, StartWithWindows BOOLEAN NOT NULL, TimeTracking BOOLEAN NOT NULL, " &
"SupressBackup BOOLEAN NOT NULL, SupressBackupThreshold INTEGER NOT NULL, CompressionLevel INTEGER NOT NULL, Custom7zArguments TEXT, " &
"Custom7zLocation TEXT, SyncFields INTEGER NOT NULL, AutoSaveLog BOOLEAN NOT NULL, AutoRestore BOOLEAN NOT NULL, AutoMark BOOLEAN NOT NULL, SessionTracking BOOLEAN NOT NULL);"
@@ -767,7 +767,18 @@ Public Class mgrSQLite
BackupDB("v108")
'Overhaul Tables
sSQL = "CREATE TABLE monitorlist_new (MonitorID TEXT NOT NULL PRIMARY KEY, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, " &
sSQL = "CREATE TABLE settings_new (SettingsID INTEGER NOT NULL PRIMARY KEY, MonitorOnStartup BOOLEAN NOT NULL, StartToTray BOOLEAN NOT NULL, ShowDetectionToolTips BOOLEAN NOT NULL, " &
"DisableConfirmation BOOLEAN NOT NULL, CreateSubFolder BOOLEAN NOT NULL, ShowOverwriteWarning BOOLEAN NOT NULL, RestoreOnLaunch BOOLEAN NOT NULL, " &
"BackupFolder TEXT NOT NULL, StartWithWindows BOOLEAN NOT NULL, TimeTracking BOOLEAN NOT NULL, " &
"SupressBackup BOOLEAN NOT NULL, SupressBackupThreshold INTEGER NOT NULL, CompressionLevel INTEGER NOT NULL, Custom7zArguments TEXT, " &
"Custom7zLocation TEXT, SyncFields INTEGER NOT NULL, AutoSaveLog BOOLEAN NOT NULL, AutoRestore BOOLEAN NOT NULL, AutoMark BOOLEAN NOT NULL, SessionTracking BOOLEAN NOT NULL);"
sSQL &= "INSERT INTO settings_new(SettingsID, MonitorOnStartup, StartToTray, ShowDetectionToolTips, DisableConfirmation, CreateSubFolder, ShowOverwriteWarning, RestoreOnLaunch, " &
"BackupFolder, StartWithWindows, TimeTracking, SupressBackup, SupressBackupThreshold, CompressionLevel, Custom7zArguments, Custom7zLocation, SyncFields, AutoSaveLog, " &
"AutoRestore, AutoMark, SessionTracking) SELECT SettingsID, MonitorOnStartup, StartToTray, ShowDetectionToolTips, DisableConfirmation, CreateSubFolder, ShowOverwriteWarning, RestoreOnLaunch, " &
"BackupFolder, StartWithWindows, TimeTracking, SupressBackup, SupressBackupThreshold, CompressionLevel, Custom7zArguments, Custom7zLocation, SyncFields, AutoSaveLog, " &
"AutoRestore, AutoMark, SessionTracking FROM settings;" &
"DROP TABLE settings; ALTER TABLE settings_new RENAME TO settings;"
sSQL &= "CREATE TABLE monitorlist_new (MonitorID TEXT NOT NULL PRIMARY KEY, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, " &
"AbsolutePath BOOLEAN NOT NULL, FolderSave BOOLEAN NOT NULL, FileType TEXT, TimeStamp BOOLEAN NOT NULL, ExcludeList TEXT NOT NULL, " &
"ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN NOT NULL, MonitorOnly BOOLEAN NOT NULL, " &
"BackupLimit INTEGER NOT NULL, CleanFolder BOOLEAN NOT NULL, Parameter TEXT, Comments TEXT, IsRegEx BOOLEAN NOT NULL);"
+1 -13
View File
@@ -11,7 +11,6 @@ Public Class mgrSettings
Private bRestoreOnLaunch As Boolean = False
Private bAutoRestore As Boolean = False
Private bAutoMark As Boolean = False
Private bSync As Boolean = True
Private bTimeTracking As Boolean = True
Private bSessionTracking As Boolean = False
Private bSupressBackup As Boolean = False
@@ -113,15 +112,6 @@ Public Class mgrSettings
End Set
End Property
Property Sync As Boolean
Get
Return bSync
End Get
Set(value As Boolean)
bSync = value
End Set
End Property
Property TimeTracking As Boolean
Get
Return bTimeTracking
@@ -269,7 +259,7 @@ Public Class mgrSettings
oDatabase.RunParamQuery(sSQL, New Hashtable)
sSQL = "INSERT INTO settings VALUES (1, @MonitorOnStartup, @StartToTray, @ShowDetectionToolTips, @DisableConfirmation, "
sSQL &= "@CreateSubFolder, @ShowOverwriteWarning, @RestoreOnLaunch, @BackupFolder, @Sync, @StartWithWindows, "
sSQL &= "@CreateSubFolder, @ShowOverwriteWarning, @RestoreOnLaunch, @BackupFolder, @StartWithWindows, "
sSQL &= "@TimeTracking, @SupressBackup, @SupressBackupThreshold, @CompressionLevel, @Custom7zArguments, @Custom7zLocation, "
sSQL &= "@SyncFields, @AutoSaveLog, @AutoRestore, @AutoMark, @SessionTracking)"
@@ -281,7 +271,6 @@ Public Class mgrSettings
hshParams.Add("ShowOverwriteWarning", ShowOverwriteWarning)
hshParams.Add("RestoreOnLaunch", RestoreOnLaunch)
hshParams.Add("BackupFolder", BackupFolder)
hshParams.Add("Sync", Sync)
hshParams.Add("StartWithWindows", StartWithWindows)
hshParams.Add("TimeTracking", TimeTracking)
hshParams.Add("SupressBackup", SupressBackup)
@@ -316,7 +305,6 @@ Public Class mgrSettings
ShowOverwriteWarning = CBool(dr("ShowOverwriteWarning"))
RestoreOnLaunch = CBool(dr("RestoreOnLaunch"))
BackupFolder = CStr(dr("BackupFolder"))
Sync = CBool(dr("Sync"))
StartWithWindows = CBool(dr("StartWithWindows"))
TimeTracking = CBool(dr("TimeTracking"))
SupressBackup = CBool(dr("SupressBackup"))
+2 -20
View File
@@ -4012,7 +4012,7 @@ Namespace My.Resources
End Property
'''<summary>
''' Looks up a localized string similar to Choose &amp;Optional Fields....
''' Looks up a localized string similar to Choose &amp;Optional Sync Fields....
'''</summary>
Friend ReadOnly Property frmSettings_btnOptionalFields() As String
Get
@@ -4200,15 +4200,6 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Enable syncing.
'''</summary>
Friend ReadOnly Property frmSettings_chkSync() As String
Get
Return ResourceManager.GetString("frmSettings_chkSync", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Enable time tracking.
'''</summary>
@@ -4497,15 +4488,6 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Import any existing GBM data in the backup folder.
'''</summary>
Friend ReadOnly Property frmStartUpWizard_chkSync() As String
Get
Return ResourceManager.GetString("frmStartUpWizard_chkSync", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Would you like to choose games to import from the official list?[BR][BR]This requires an active internet connection..
'''</summary>
@@ -4588,7 +4570,7 @@ Namespace My.Resources
End Property
'''<summary>
''' Looks up a localized string similar to GBM will store all your backup files along with a manifest database (gbm.s3db) in this location. .
''' Looks up a localized string similar to GBM will store all your backup files along with a manifest database (gbm.s3db) in this location. Any existing GBM data in this folder will be automatically imported..
'''</summary>
Friend ReadOnly Property frmStartUpWizard_lblStep2Instructions() As String
Get
+2 -8
View File
@@ -1084,9 +1084,6 @@
<data name="frmSettings_chkSupressBackup" xml:space="preserve">
<value>Ignore sessions shorter than</value>
</data>
<data name="frmSettings_chkSync" xml:space="preserve">
<value>Enable syncing</value>
</data>
<data name="frmSettings_chkTimeTracking" xml:space="preserve">
<value>Enable time tracking</value>
</data>
@@ -1135,9 +1132,6 @@
<data name="frmStartUpWizard_chkCreateFolder" xml:space="preserve">
<value>Create a sub-folder for each game</value>
</data>
<data name="frmStartUpWizard_chkSync" xml:space="preserve">
<value>Import any existing GBM data in the backup folder</value>
</data>
<data name="frmStartUpWizard_ConfirmOfficialImport" xml:space="preserve">
<value>Would you like to choose games to import from the official list?[BR][BR]This requires an active internet connection.</value>
</data>
@@ -1166,7 +1160,7 @@
<value>Welcome to GBM</value>
</data>
<data name="frmStartUpWizard_lblStep2Instructions" xml:space="preserve">
<value>GBM will store all your backup files along with a manifest database (gbm.s3db) in this location. </value>
<value>GBM will store all your backup files along with a manifest database (gbm.s3db) in this location. Any existing GBM data in this folder will be automatically imported.</value>
</data>
<data name="frmStartUpWizard_lblStep2Intro" xml:space="preserve">
<value>Choose where GBM saves your backup files:</value>
@@ -1610,7 +1604,7 @@
<value>A backup cannot be run on the selected game(s) with their current configuration.</value>
</data>
<data name="frmSettings_btnOptionalFields" xml:space="preserve">
<value>Choose &amp;Optional Fields...</value>
<value>Choose &amp;Optional Sync Fields...</value>
</data>
<data name="frmSyncFields_btnCancel" xml:space="preserve">
<value>&amp;Cancel</value>