From 898e72f163d1202b60c5a034cd81cee8d52b2d96 Mon Sep 17 00:00:00 2001 From: "Michael J. Seiferling" Date: Fri, 14 Sep 2018 11:46:20 -0600 Subject: [PATCH] Restricted backup import functionality for #150 --- GBM/Forms/frmGameManager.vb | 6 +++++- GBM/My Project/Resources.Designer.vb | 11 ++++++++++- GBM/My Project/Resources.resx | 5 ++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/GBM/Forms/frmGameManager.vb b/GBM/Forms/frmGameManager.vb index 3ea59db..59d59bd 100644 --- a/GBM/Forms/frmGameManager.vb +++ b/GBM/Forms/frmGameManager.vb @@ -1938,7 +1938,11 @@ Public Class frmGameManager End Sub Private Sub btnImportBackup_Click(sender As Object, e As EventArgs) Handles btnImportBackup.Click - TriggerSelectedImportBackup() + If CurrentGame.AppendTimeStamp Then + TriggerSelectedImportBackup() + Else + mgrCommon.ShowMessage(frmGameManager_WarningImportBackupSaveMulti, MsgBoxStyle.Information) + End If End Sub Private Sub chkFolderSave_CheckedChanged(sender As Object, e As EventArgs) Handles chkFolderSave.CheckedChanged diff --git a/GBM/My Project/Resources.Designer.vb b/GBM/My Project/Resources.Designer.vb index c41fcd1..f08f3bb 100644 --- a/GBM/My Project/Resources.Designer.vb +++ b/GBM/My Project/Resources.Designer.vb @@ -2446,7 +2446,7 @@ Namespace My.Resources End Property ''' - ''' Looks up a localized string similar to This feature is intended to import 7-Zip backup archives compatible with the selected game configuration.[BR][BR]GBM does NOT verify these files, you should only use files created by GBM or other compatible archives that were created using the same settings as the current game configuration.[BR][BR]This message will only be shown once.. + ''' Looks up a localized string similar to This feature is intended to import 7-Zip backup archives compatible with the selected game configuration.[BR][BR]GBM does NOT verify these files, you should only use files created by GBM or compatible archives created using the same settings as the current game configuration.[BR][BR]This message will only be shown once.. ''' Friend ReadOnly Property frmGameManager_WarningImportBackup() As String Get @@ -2454,6 +2454,15 @@ Namespace My.Resources End Get End Property + ''' + ''' Looks up a localized string similar to The "Save multiple backups" option must be enabled on this configuration to import backup files.. + ''' + Friend ReadOnly Property frmGameManager_WarningImportBackupSaveMulti() As String + Get + Return ResourceManager.GetString("frmGameManager_WarningImportBackupSaveMulti", resourceCulture) + End Get + End Property + ''' ''' Looks up a localized string similar to XML. ''' diff --git a/GBM/My Project/Resources.resx b/GBM/My Project/Resources.resx index c4bff63..476214d 100644 --- a/GBM/My Project/Resources.resx +++ b/GBM/My Project/Resources.resx @@ -2249,9 +2249,12 @@ Pro&cesses... - This feature is intended to import 7-Zip backup archives compatible with the selected game configuration.[BR][BR]GBM does NOT verify these files, you should only use files created by GBM or other compatible archives that were created using the same settings as the current game configuration.[BR][BR]This message will only be shown once. + This feature is intended to import 7-Zip backup archives compatible with the selected game configuration.[BR][BR]GBM does NOT verify these files, you should only use files created by GBM or compatible archives created using the same settings as the current game configuration.[BR][BR]This message will only be shown once. [PARAM] is a reserved variable, you must enter a different name. + + The "Save multiple backups" option must be enabled on this configuration to import backup files. + \ No newline at end of file