Updated game id sync confirmations

This commit is contained in:
MikeMaximus
2018-03-05 13:51:32 -06:00
parent fe6b90311a
commit b23ace4b54
5 changed files with 32 additions and 11 deletions
+2 -2
View File
@@ -1496,7 +1496,7 @@ Public Class frmGameManager
sLocation = mgrCommon.OpenFileBrowser("XML_Import", frmGameManager_ChooseImportXML, "xml", frmGameManager_XML, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), False) sLocation = mgrCommon.OpenFileBrowser("XML_Import", frmGameManager_ChooseImportXML, "xml", frmGameManager_XML, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), False)
If sLocation <> String.Empty Then If sLocation <> String.Empty Then
If mgrMonitorList.DoImport(sLocation) Then If mgrMonitorList.DoImport(sLocation, False) Then
mgrMonitorList.SyncMonitorLists(Settings.SyncFields) mgrMonitorList.SyncMonitorLists(Settings.SyncFields)
LoadData() LoadData()
LoadBackupData() LoadBackupData()
@@ -1526,7 +1526,7 @@ Public Class frmGameManager
End If End If
If mgrCommon.ShowMessage(frmGameManager_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then If mgrCommon.ShowMessage(frmGameManager_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrMonitorList.DoImport(sImportURL) Then If mgrMonitorList.DoImport(sImportURL, True) Then
mgrMonitorList.SyncMonitorLists(Settings.SyncFields) mgrMonitorList.SyncMonitorLists(Settings.SyncFields)
LoadData() LoadData()
LoadBackupData() LoadBackupData()
+1 -1
View File
@@ -105,7 +105,7 @@ Public Class frmStartUpWizard
End If End If
If mgrCommon.ShowMessage(frmStartUpWizard_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then If mgrCommon.ShowMessage(frmStartUpWizard_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrMonitorList.DoImport(sImportURL) Then If mgrMonitorList.DoImport(sImportURL, True) Then
oGameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList) oGameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList)
mgrMonitorList.SyncMonitorLists(oSettings.SyncFields) mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
End If End If
+12 -3
View File
@@ -782,11 +782,20 @@ Public Class mgrMonitorList
Return oList Return oList
End Function End Function
Public Shared Function DoImport(ByVal sPath As String) As Boolean Public Shared Function DoImport(ByVal sPath As String, ByVal bOfficial As Boolean) As Boolean
Dim sWarning As String
'Set Warning Message
If bOfficial Then
sWarning = mgrMonitorList_ConfirmOfficialGameIDSync
Else
sWarning = mgrMonitorList_ConfirmFileGameIDSync
End If
If (sPath.IndexOf("http://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Or If (sPath.IndexOf("http://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Or
(sPath.IndexOf("https://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Then (sPath.IndexOf("https://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Then
If mgrCommon.CheckAddress(sPath) Then If mgrCommon.CheckAddress(sPath) Then
If mgrCommon.ShowMessage(mgrMonitorList_ConfirmGameIDSync, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then If mgrCommon.ShowMessage(sWarning, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
ImportSyncGameID(sPath, True) ImportSyncGameID(sPath, True)
End If End If
ImportMonitorList(sPath, True) ImportMonitorList(sPath, True)
@@ -797,7 +806,7 @@ Public Class mgrMonitorList
End If End If
Else Else
If File.Exists(sPath) Then If File.Exists(sPath) Then
If mgrCommon.ShowMessage(mgrMonitorList_ConfirmGameIDSync, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then If mgrCommon.ShowMessage(sWarning, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
ImportSyncGameID(sPath) ImportSyncGameID(sPath)
End If End If
ImportMonitorList(sPath) ImportMonitorList(sPath)
+12 -3
View File
@@ -5438,11 +5438,20 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to GBM now uses a unique identifier for each game. For the import feature to work as intended, your existing game configurations need to use the same identifiers.[BR][BR]Do you want to sync your game identifiers? (Recommened). ''' Looks up a localized string similar to Do you want to sync your local game ids with this export file? (Not Recommended) [BR][BR]You should only do this if you&apos;re managing your own game configurations..
'''</summary> '''</summary>
Friend ReadOnly Property mgrMonitorList_ConfirmGameIDSync() As String Friend ReadOnly Property mgrMonitorList_ConfirmFileGameIDSync() As String
Get Get
Return ResourceManager.GetString("mgrMonitorList_ConfirmGameIDSync", resourceCulture) Return ResourceManager.GetString("mgrMonitorList_ConfirmFileGameIDSync", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Do you want to sync your local game ids with the official game list? (Recommended)[BR][BR]This allows you to easily keep your game configurations up to date if they change in the future..
'''</summary>
Friend ReadOnly Property mgrMonitorList_ConfirmOfficialGameIDSync() As String
Get
Return ResourceManager.GetString("mgrMonitorList_ConfirmOfficialGameIDSync", resourceCulture)
End Get End Get
End Property End Property
+5 -2
View File
@@ -2026,8 +2026,8 @@
<data name="frmFilter_FieldGameID" xml:space="preserve"> <data name="frmFilter_FieldGameID" xml:space="preserve">
<value>Game ID</value> <value>Game ID</value>
</data> </data>
<data name="mgrMonitorList_ConfirmGameIDSync" xml:space="preserve"> <data name="mgrMonitorList_ConfirmOfficialGameIDSync" xml:space="preserve">
<value>GBM now uses a unique identifier for each game. For the import feature to work as intended, your existing game configurations need to use the same identifiers.[BR][BR]Do you want to sync your game identifiers? (Recommened)</value> <value>Do you want to sync your local game ids with the official game list? (Recommended)[BR][BR]This allows you to easily keep your game configurations up to date if they change in the future.</value>
</data> </data>
<data name="mgrMonitorList_ErrorGameIDVerFailure" xml:space="preserve"> <data name="mgrMonitorList_ErrorGameIDVerFailure" xml:space="preserve">
<value>This file cannot be used to sync game indentifiers. It was created with an older version of GBM.</value> <value>This file cannot be used to sync game indentifiers. It was created with an older version of GBM.</value>
@@ -2035,4 +2035,7 @@
<data name="mgrMonitorList_ImportVersionWarning" xml:space="preserve"> <data name="mgrMonitorList_ImportVersionWarning" xml:space="preserve">
<value>This export file was created with a version of GBM prior to 1.1.0 and does not contain unique game identifiers.[BR][BR]Do you still want to import configurations from this file? (Not Recommended)</value> <value>This export file was created with a version of GBM prior to 1.1.0 and does not contain unique game identifiers.[BR][BR]Do you still want to import configurations from this file? (Not Recommended)</value>
</data> </data>
<data name="mgrMonitorList_ConfirmFileGameIDSync" xml:space="preserve">
<value>Do you want to sync your local game ids with this export file? (Not Recommended) [BR][BR]You should only do this if you're managing your own game configurations.</value>
</data>
</root> </root>