diff --git a/GBM/Managers/mgrMonitorList.vb b/GBM/Managers/mgrMonitorList.vb index b06168a..ac1ba2c 100644 --- a/GBM/Managers/mgrMonitorList.vb +++ b/GBM/Managers/mgrMonitorList.vb @@ -517,6 +517,14 @@ Public Class mgrMonitorList hshCompareTo = ReadList(eListTypes.FullList, mgrSQLite.Database.Local) End If + 'Sync Wipe Protection + If hshCompareFrom.Count = 0 And hshCompareTo.Count > 0 Then + If mgrCommon.ShowMessage(mgrMonitorList_WarningSyncProtection, MsgBoxStyle.YesNo) = MsgBoxResult.No Then + RaiseEvent UpdateLog(mgrMonitorList_ErrorSyncCancel, False, ToolTipIcon.Warning, True) + Exit Sub + End If + End If + hshSyncItems = hshCompareFrom.Clone For Each oFromItem In hshCompareFrom.Values diff --git a/GBM/Managers/mgrSQLite.vb b/GBM/Managers/mgrSQLite.vb index c57d9e7..8e093d3 100644 --- a/GBM/Managers/mgrSQLite.vb +++ b/GBM/Managers/mgrSQLite.vb @@ -828,12 +828,9 @@ Public Class mgrSQLite "DROP TABLE monitorlist; ALTER TABLE monitorlist_new RENAME TO monitorlist;" 'We need to push the local game list against the remote database in case they had syncing disabled - Dim hshMonitorList As Hashtable = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList, mgrSQLite.Database.Local) Dim oSettings As New mgrSettings oSettings.LoadSettings() - mgrMonitorList.DoListAddUpdateSync(hshMonitorList, Database.Remote, oSettings.SyncFields) - mgrTags.SyncTags(True) - mgrGameTags.SyncGameTags(True) + mgrMonitorList.SyncMonitorLists(oSettings.SyncFields) sSQL &= "CREATE TABLE manifest_new (ManifestID TEXT NOT NULL PRIMARY KEY, MonitorID TEXT NOT NULL, FileName TEXT NOT NULL, " & "DateUpdated TEXT NOT NULL, UpdatedBy TEXT NOT NULL, CheckSum TEXT);" diff --git a/GBM/My Project/Resources.Designer.vb b/GBM/My Project/Resources.Designer.vb index c904e1b..7ea4b9a 100644 --- a/GBM/My Project/Resources.Designer.vb +++ b/GBM/My Project/Resources.Designer.vb @@ -5844,6 +5844,15 @@ Namespace My.Resources End Get End Property + ''' + ''' Looks up a localized string similar to The sync was aborted by the user.. + ''' + Friend ReadOnly Property mgrMonitorList_ErrorSyncCancel() As String + Get + Return ResourceManager.GetString("mgrMonitorList_ErrorSyncCancel", resourceCulture) + End Get + End Property + ''' ''' Looks up a localized string similar to Export Complete. [PARAM] item(s) have been exported.. ''' @@ -5925,6 +5934,15 @@ Namespace My.Resources End Get End Property + ''' + ''' Looks up a localized string similar to The database GBM is attempting to sync with appears to be empty, syncing with this database will delete all data. Do you still want to sync with this database? (Not Recommended). + ''' + Friend ReadOnly Property mgrMonitorList_WarningSyncProtection() As String + Get + Return ResourceManager.GetString("mgrMonitorList_WarningSyncProtection", resourceCulture) + End Get + End Property + ''' ''' Looks up a localized string similar to There's no response from:[BR][PARAM][BR]Either the server is not responding or the URL is invalid.. ''' diff --git a/GBM/My Project/Resources.resx b/GBM/My Project/Resources.resx index 0e1ac6f..e16cf84 100644 --- a/GBM/My Project/Resources.resx +++ b/GBM/My Project/Resources.resx @@ -2167,4 +2167,10 @@ Use Game ID for folder and file names + + The sync was aborted by the user. + + + The database GBM is attempting to sync with appears to be empty, syncing with this database will delete all data. Do you still want to sync with this database? (Not Recommended) + \ No newline at end of file