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 btnExport.Enabled = True
Case eModes.MultiSelect Case eModes.MultiSelect
lstGames.Enabled = True lstGames.Enabled = True
lblQuickFilter.Enabled = True lblQuickFilter.Enabled = False
txtQuickFilter.Enabled = True txtQuickFilter.Enabled = False
WipeControls(grpConfig.Controls) WipeControls(grpConfig.Controls)
WipeControls(grpExtra.Controls) WipeControls(grpExtra.Controls)
WipeControls(grpStats.Controls) WipeControls(grpStats.Controls)
@@ -1202,27 +1202,34 @@ Public Class frmGameManager
Dim oData As KeyValuePair(Of String, String) Dim oData As KeyValuePair(Of String, String)
Dim sMsg As String = String.Empty Dim sMsg As String = String.Empty
Dim oGame As clsGame Dim oGame As clsGame
Dim bDoBackup As Boolean = False
If lstGames.SelectedItems.Count > 0 Then If lstGames.SelectedItems.Count > 0 Then
BackupList.Clear() BackupList.Clear()
For Each oData In lstGames.SelectedItems For Each oData In lstGames.SelectedItems
oGame = DirectCast(AppData(oData.Key), clsGame) 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 Next
If BackupList.Count = 1 Then If BackupList.Count = 1 Then
bDoBackup = True
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmBackup, BackupList(0).Name) sMsg = mgrCommon.FormatString(frmGameManager_ConfirmBackup, BackupList(0).Name)
ElseIf BackupList.Count > 1 Then ElseIf BackupList.Count > 1 Then
bDoBackup = True
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmMultiBackup, BackupList.Count) sMsg = mgrCommon.FormatString(frmGameManager_ConfirmMultiBackup, BackupList.Count)
Else
mgrCommon.ShowMessage(frmGameManager_ErrorNoValidBackup, MsgBoxStyle.Information)
End If End If
If bDoBackup Then
If mgrCommon.ShowMessage(sMsg, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then If mgrCommon.ShowMessage(sMsg, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
TriggerBackup = True TriggerBackup = True
Me.Close() Me.Close()
End If End If
End If End If
End If
End Sub End Sub
Private Sub TriggerSelectedRestore() Private Sub TriggerSelectedRestore()
@@ -1237,7 +1244,8 @@ Public Class frmGameManager
For Each oData In lstGames.SelectedItems For Each oData In lstGames.SelectedItems
If oRemoteBackupData.Contains(oData.Value) Then If oRemoteBackupData.Contains(oData.Value) Then
oGame = DirectCast(AppData(oData.Key), clsGame) 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 End If
Next Next
@@ -1255,7 +1263,6 @@ Public Class frmGameManager
mgrCommon.ShowMessage(frmGameManager_ErrorNoBackupData, MsgBoxStyle.Information) mgrCommon.ShowMessage(frmGameManager_ErrorNoBackupData, MsgBoxStyle.Information)
End If End If
'We need this check in case a bunch of games with no backups are multi-selected
If bDoRestore Then If bDoRestore Then
If mgrCommon.ShowMessage(sMsg, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then If mgrCommon.ShowMessage(sMsg, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
TriggerRestore = True TriggerRestore = True
+10 -1
View File
@@ -1492,7 +1492,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<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> '''</summary>
Friend ReadOnly Property frmGameManager_ErrorNoBackupData() As String Friend ReadOnly Property frmGameManager_ErrorNoBackupData() As String
Get Get
@@ -1527,6 +1527,15 @@ Namespace My.Resources
End Get End Get
End Property 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> '''<summary>
''' Looks up a localized string similar to [PARAM] uses a relative path and the game path has not been set.. ''' Looks up a localized string similar to [PARAM] uses a relative path and the game path has not been set..
'''</summary> '''</summary>
+4 -1
View File
@@ -566,7 +566,7 @@
<value>A game with this exact name and process already exists.</value> <value>A game with this exact name and process already exists.</value>
</data> </data>
<data name="frmGameManager_ErrorNoBackupData" xml:space="preserve"> <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>
<data name="frmGameManager_ErrorNoBackupExists" xml:space="preserve"> <data name="frmGameManager_ErrorNoBackupExists" xml:space="preserve">
<value>The backup file does not exist.</value> <value>The backup file does not exist.</value>
@@ -1657,4 +1657,7 @@
<data name="frmGameManager_lblQuickFilter" xml:space="preserve"> <data name="frmGameManager_lblQuickFilter" xml:space="preserve">
<value>Quick Filter:</value> <value>Quick Filter:</value>
</data> </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> </root>