Fixes for issue #50

This commit is contained in:
Michael J. Seiferling
2016-05-27 17:13:17 -06:00
parent ef70c08469
commit b8b4c63910
3 changed files with 30 additions and 11 deletions
+13 -6
View File
@@ -884,8 +884,8 @@ Public Class frmGameManager
btnExport.Enabled = True
Case eModes.MultiSelect
lstGames.Enabled = True
lblQuickFilter.Enabled = True
txtQuickFilter.Enabled = True
lblQuickFilter.Enabled = False
txtQuickFilter.Enabled = False
WipeControls(grpConfig.Controls)
WipeControls(grpExtra.Controls)
WipeControls(grpStats.Controls)
@@ -1202,27 +1202,34 @@ Public Class frmGameManager
Dim oData As KeyValuePair(Of String, String)
Dim sMsg As String = String.Empty
Dim oGame As clsGame
Dim bDoBackup As Boolean = False
If lstGames.SelectedItems.Count > 0 Then
BackupList.Clear()
For Each oData In lstGames.SelectedItems
oGame = DirectCast(AppData(oData.Key), clsGame)
BackupList.Add(oGame)
'Filter out any games set to monitor only
If Not oGame.MonitorOnly Then BackupList.Add(oGame)
Next
If BackupList.Count = 1 Then
bDoBackup = True
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmBackup, BackupList(0).Name)
ElseIf BackupList.Count > 1 Then
bDoBackup = True
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmMultiBackup, BackupList.Count)
Else
mgrCommon.ShowMessage(frmGameManager_ErrorNoValidBackup, MsgBoxStyle.Information)
End If
If bDoBackup Then
If mgrCommon.ShowMessage(sMsg, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
TriggerBackup = True
Me.Close()
End If
End If
End If
End Sub
Private Sub TriggerSelectedRestore()
@@ -1237,7 +1244,8 @@ Public Class frmGameManager
For Each oData In lstGames.SelectedItems
If oRemoteBackupData.Contains(oData.Value) Then
oGame = DirectCast(AppData(oData.Key), clsGame)
RestoreList.Add(oGame)
'Filter out any games set to monitor only
If Not oGame.MonitorOnly Then RestoreList.Add(oGame)
End If
Next
@@ -1255,7 +1263,6 @@ Public Class frmGameManager
mgrCommon.ShowMessage(frmGameManager_ErrorNoBackupData, MsgBoxStyle.Information)
End If
'We need this check in case a bunch of games with no backups are multi-selected
If bDoRestore Then
If mgrCommon.ShowMessage(sMsg, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
TriggerRestore = True
+10 -1
View File
@@ -1492,7 +1492,7 @@ Namespace My.Resources
End Property
'''<summary>
''' Looks up a localized string similar to The selected game(s) have no backup data..
''' Looks up a localized string similar to The selected game(s) have no backup data or can&apos;t be restored with their current configuration..
'''</summary>
Friend ReadOnly Property frmGameManager_ErrorNoBackupData() As String
Get
@@ -1527,6 +1527,15 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Looks up a localized string similar to A backup cannot be run on the selected game(s) with their current configuration..
'''</summary>
Friend ReadOnly Property frmGameManager_ErrorNoValidBackup() As String
Get
Return ResourceManager.GetString("frmGameManager_ErrorNoValidBackup", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to [PARAM] uses a relative path and the game path has not been set..
'''</summary>
+4 -1
View File
@@ -566,7 +566,7 @@
<value>A game with this exact name and process already exists.</value>
</data>
<data name="frmGameManager_ErrorNoBackupData" xml:space="preserve">
<value>The selected game(s) have no backup data.</value>
<value>The selected game(s) have no backup data or can't be restored with their current configuration.</value>
</data>
<data name="frmGameManager_ErrorNoBackupExists" xml:space="preserve">
<value>The backup file does not exist.</value>
@@ -1657,4 +1657,7 @@
<data name="frmGameManager_lblQuickFilter" xml:space="preserve">
<value>Quick Filter:</value>
</data>
<data name="frmGameManager_ErrorNoValidBackup" xml:space="preserve">
<value>A backup cannot be run on the selected game(s) with their current configuration.</value>
</data>
</root>