Fix #166, also includes a minor form load bug fix
This commit is contained in:
@@ -8,6 +8,7 @@ Public Class frmGameManager
|
|||||||
Private sBackupFolder As String
|
Private sBackupFolder As String
|
||||||
Private bPendingRestores As Boolean = False
|
Private bPendingRestores As Boolean = False
|
||||||
Private oCurrentBackupItem As clsBackup
|
Private oCurrentBackupItem As clsBackup
|
||||||
|
Private oLastPlayedGame As clsGame
|
||||||
Private oCurrentGame As clsGame
|
Private oCurrentGame As clsGame
|
||||||
Private oTagsToSave As New List(Of KeyValuePair(Of String, String))
|
Private oTagsToSave As New List(Of KeyValuePair(Of String, String))
|
||||||
Private oProcessesToSave As New List(Of KeyValuePair(Of String, String))
|
Private oProcessesToSave As New List(Of KeyValuePair(Of String, String))
|
||||||
@@ -69,6 +70,15 @@ Public Class frmGameManager
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Property LastPlayedGame As clsGame
|
||||||
|
Get
|
||||||
|
Return oLastPlayedGame
|
||||||
|
End Get
|
||||||
|
Set(value As clsGame)
|
||||||
|
oLastPlayedGame = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Property CurrentGame As clsGame
|
Property CurrentGame As clsGame
|
||||||
Get
|
Get
|
||||||
Return oCurrentGame
|
Return oCurrentGame
|
||||||
@@ -1810,6 +1820,7 @@ Public Class frmGameManager
|
|||||||
tmFilterTimer = New Timer()
|
tmFilterTimer = New Timer()
|
||||||
tmFilterTimer.Interval = 1000
|
tmFilterTimer.Interval = 1000
|
||||||
tmFilterTimer.Enabled = False
|
tmFilterTimer.Enabled = False
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmGameManager_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub frmGameManager_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
@@ -1826,7 +1837,7 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
LoadBackupData()
|
LoadBackupData()
|
||||||
|
|
||||||
'Event will take care of initial load
|
'Event will take care of initial load (on Windows)
|
||||||
If PendingRestores Then
|
If PendingRestores Then
|
||||||
optPendingRestores.Checked = True
|
optPendingRestores.Checked = True
|
||||||
Else
|
Else
|
||||||
@@ -1838,8 +1849,11 @@ Public Class frmGameManager
|
|||||||
AssignDirtyHandlers(grpStats.Controls)
|
AssignDirtyHandlers(grpStats.Controls)
|
||||||
AssignDirtyHandlersMisc()
|
AssignDirtyHandlersMisc()
|
||||||
|
|
||||||
|
'Mono doesn't fire events in the same way as .NET, so we'll to do this to get an initial load on Linux and prevent multiple loads in Windows.
|
||||||
|
If mgrCommon.IsUnix Then
|
||||||
LoadData(False)
|
LoadData(False)
|
||||||
ModeChange()
|
ModeChange()
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub lstGames_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstGames.SelectedIndexChanged
|
Private Sub lstGames_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstGames.SelectedIndexChanged
|
||||||
@@ -2043,6 +2057,11 @@ Public Class frmGameManager
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmGameManager_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
|
Private Sub frmGameManager_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
|
||||||
|
'Load Last Played Game
|
||||||
|
If Not LastPlayedGame Is Nothing Then
|
||||||
|
lstGames.SelectedItem = New KeyValuePair(Of String, String)(LastPlayedGame.ID, LastPlayedGame.Name)
|
||||||
|
End If
|
||||||
|
|
||||||
txtQuickFilter.Focus()
|
txtQuickFilter.Focus()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -882,6 +882,7 @@ Public Class frmMain
|
|||||||
PauseScan()
|
PauseScan()
|
||||||
frm.Settings = oSettings
|
frm.Settings = oSettings
|
||||||
frm.PendingRestores = bPendingRestores
|
frm.PendingRestores = bPendingRestores
|
||||||
|
frm.LastPlayedGame = oProcess.GameInfo
|
||||||
frm.ShowDialog()
|
frm.ShowDialog()
|
||||||
LoadGameSettings()
|
LoadGameSettings()
|
||||||
ResumeScan()
|
ResumeScan()
|
||||||
|
|||||||
Reference in New Issue
Block a user