Updates for issue #67
This commit is contained in:
+25
-4
@@ -341,14 +341,18 @@ Public Class frmMain
|
|||||||
If iCount > 1 Then
|
If iCount > 1 Then
|
||||||
If bRestored Then
|
If bRestored Then
|
||||||
sNotification = mgrCommon.FormatString(frmMain_RestoreNotificationMulti, iCount)
|
sNotification = mgrCommon.FormatString(frmMain_RestoreNotificationMulti, iCount)
|
||||||
|
gMonNotification.Tag = 1
|
||||||
Else
|
Else
|
||||||
sNotification = mgrCommon.FormatString(frmMain_NewSaveNotificationMulti, iCount)
|
sNotification = mgrCommon.FormatString(frmMain_NewSaveNotificationMulti, iCount)
|
||||||
|
gMonNotification.Tag = 0
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If bRestored Then
|
If bRestored Then
|
||||||
sNotification = mgrCommon.FormatString(frmMain_RestoreNotificationSingle, iCount)
|
sNotification = mgrCommon.FormatString(frmMain_RestoreNotificationSingle, iCount)
|
||||||
|
gMonNotification.Tag = 1
|
||||||
Else
|
Else
|
||||||
sNotification = mgrCommon.FormatString(frmMain_NewSaveNotificationSingle, iCount)
|
sNotification = mgrCommon.FormatString(frmMain_NewSaveNotificationSingle, iCount)
|
||||||
|
gMonNotification.Tag = 0
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
gMonNotification.Image = Icon_Inbox
|
gMonNotification.Image = Icon_Inbox
|
||||||
@@ -372,6 +376,7 @@ Public Class frmMain
|
|||||||
Dim slRestoreData As SortedList = mgrRestore.CompareManifests()
|
Dim slRestoreData As SortedList = mgrRestore.CompareManifests()
|
||||||
Dim sNotReady As New List(Of String)
|
Dim sNotReady As New List(Of String)
|
||||||
Dim sNotInstalled As New List(Of String)
|
Dim sNotInstalled As New List(Of String)
|
||||||
|
Dim sNoCheckSum As New List(Of String)
|
||||||
Dim oBackup As clsBackup
|
Dim oBackup As clsBackup
|
||||||
Dim sFileName As String
|
Dim sFileName As String
|
||||||
Dim sExtractPath As String
|
Dim sExtractPath As String
|
||||||
@@ -394,27 +399,31 @@ Public Class frmMain
|
|||||||
oBackup = DirectCast(de.Value, clsBackup)
|
oBackup = DirectCast(de.Value, clsBackup)
|
||||||
|
|
||||||
'Check if backup file is ready to restore
|
'Check if backup file is ready to restore
|
||||||
|
If oBackup.CheckSum <> String.Empty Then
|
||||||
sFileName = oSettings.BackupFolder & IO.Path.DirectorySeparatorChar & oBackup.FileName
|
sFileName = oSettings.BackupFolder & IO.Path.DirectorySeparatorChar & oBackup.FileName
|
||||||
If mgrHash.Generate_SHA256_Hash(sFileName) <> oBackup.CheckSum Then
|
If mgrHash.Generate_SHA256_Hash(sFileName) <> oBackup.CheckSum Then
|
||||||
sNotReady.Add(de.Key)
|
sNotReady.Add(de.Key)
|
||||||
bFinished = False
|
bFinished = False
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
sNoCheckSum.Add(de.Key)
|
||||||
|
End If
|
||||||
|
|
||||||
'Check if the restore location exists, if not we assume the game is not installed and should be auto-marked.
|
'Check if the restore location exists, if not we assume the game is not installed and should be auto-marked.
|
||||||
If oSettings.AutoMark Then
|
|
||||||
If oBackup.AbsolutePath Then
|
If oBackup.AbsolutePath Then
|
||||||
sExtractPath = oBackup.RestorePath
|
sExtractPath = oBackup.RestorePath
|
||||||
Else
|
Else
|
||||||
sExtractPath = oBackup.RelativeRestorePath
|
sExtractPath = oBackup.RelativeRestorePath
|
||||||
End If
|
End If
|
||||||
If Not IO.Directory.Exists(sExtractPath) Then
|
If Not IO.Directory.Exists(sExtractPath) Then
|
||||||
|
If oSettings.AutoMark Then
|
||||||
If mgrManifest.DoGlobalManifestCheck(de.Key, mgrSQLite.Database.Local) Then
|
If mgrManifest.DoGlobalManifestCheck(de.Key, mgrSQLite.Database.Local) Then
|
||||||
mgrManifest.DoManifestUpdateByName(de.Value, mgrSQLite.Database.Local)
|
mgrManifest.DoManifestUpdateByName(de.Value, mgrSQLite.Database.Local)
|
||||||
Else
|
Else
|
||||||
mgrManifest.DoManifestAdd(de.Value, mgrSQLite.Database.Local)
|
mgrManifest.DoManifestAdd(de.Value, mgrSQLite.Database.Local)
|
||||||
End If
|
End If
|
||||||
sNotInstalled.Add(de.Key)
|
|
||||||
End If
|
End If
|
||||||
|
sNotInstalled.Add(de.Key)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -427,7 +436,15 @@ Public Class frmMain
|
|||||||
'Remove any backup files that should not be automatically restored
|
'Remove any backup files that should not be automatically restored
|
||||||
For Each s As String In sNotInstalled
|
For Each s As String In sNotInstalled
|
||||||
slRestoreData.Remove(s)
|
slRestoreData.Remove(s)
|
||||||
UpdateLog(mgrCommon.FormatString(frmMain_AutoMarked, s), False, ToolTipIcon.Info, True)
|
If oSettings.AutoMark Then
|
||||||
|
UpdateLog(mgrCommon.FormatString(frmMain_AutoMark, s), False, ToolTipIcon.Info, True)
|
||||||
|
Else
|
||||||
|
UpdateLog(mgrCommon.FormatString(frmMain_NoAutoMark, s), False, ToolTipIcon.Info, True)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
For Each s As String In sNoCheckSum
|
||||||
|
slRestoreData.Remove(s)
|
||||||
|
UpdateLog(mgrCommon.FormatString(frmMain_NoCheckSum, s), False, ToolTipIcon.Info, True)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
'Automatically restore backup files
|
'Automatically restore backup files
|
||||||
@@ -449,7 +466,7 @@ Public Class frmMain
|
|||||||
'Update the notifier
|
'Update the notifier
|
||||||
If oSettings.RestoreOnLaunch Then
|
If oSettings.RestoreOnLaunch Then
|
||||||
If slRestoreData.Count > 0 Then
|
If slRestoreData.Count > 0 Then
|
||||||
UpdateNotifier(slRestoreData.Count, oSettings.AutoMark)
|
UpdateNotifier(slRestoreData.Count, oSettings.AutoRestore)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -911,10 +928,12 @@ Public Class frmMain
|
|||||||
|
|
||||||
Private Sub HandleSyncWatcher() Handles oFileWatcher.Changed
|
Private Sub HandleSyncWatcher() Handles oFileWatcher.Changed
|
||||||
If oSettings.Sync Then
|
If oSettings.Sync Then
|
||||||
|
StopSyncWatcher()
|
||||||
UpdateLog(frmMain_MasterListChanged, False, ToolTipIcon.Info, True)
|
UpdateLog(frmMain_MasterListChanged, False, ToolTipIcon.Info, True)
|
||||||
SyncGameSettings()
|
SyncGameSettings()
|
||||||
LoadGameSettings()
|
LoadGameSettings()
|
||||||
CheckForNewBackups()
|
CheckForNewBackups()
|
||||||
|
StartSyncWatcher()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1590,7 +1609,9 @@ Public Class frmMain
|
|||||||
Private Sub gMonNotification_Click(sender As Object, e As EventArgs) Handles gMonNotification.Click, gMonTrayNotification.Click
|
Private Sub gMonNotification_Click(sender As Object, e As EventArgs) Handles gMonNotification.Click, gMonTrayNotification.Click
|
||||||
gMonNotification.Visible = False
|
gMonNotification.Visible = False
|
||||||
gMonTrayNotification.Visible = False
|
gMonTrayNotification.Visible = False
|
||||||
|
If gMonNotification.Tag = 0 Then
|
||||||
OpenGameManager(True)
|
OpenGameManager(True)
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnLogToggle_Click(sender As Object, e As EventArgs) Handles btnLogToggle.Click
|
Private Sub btnLogToggle_Click(sender As Object, e As EventArgs) Handles btnLogToggle.Click
|
||||||
|
|||||||
Generated
+20
-2
@@ -2304,9 +2304,9 @@ Namespace My.Resources
|
|||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to The saved game folder for [PARAM] does not exist, the backup has been automatically marked as restored..
|
''' Looks up a localized string similar to The saved game folder for [PARAM] does not exist, the backup has been automatically marked as restored..
|
||||||
'''</summary>
|
'''</summary>
|
||||||
Friend ReadOnly Property frmMain_AutoMarked() As String
|
Friend ReadOnly Property frmMain_AutoMark() As String
|
||||||
Get
|
Get
|
||||||
Return ResourceManager.GetString("frmMain_AutoMarked", resourceCulture)
|
Return ResourceManager.GetString("frmMain_AutoMark", resourceCulture)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -3102,6 +3102,24 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to The saved game folder for [PARAM] does not exist, this backup has been skipped..
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmMain_NoAutoMark() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmMain_NoAutoMark", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to The backup file for [PARAM] has no checksum, it cannot be automatically restored..
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmMain_NoCheckSum() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmMain_NoCheckSum", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to Game details are unavailable..
|
''' Looks up a localized string similar to Game details are unavailable..
|
||||||
'''</summary>
|
'''</summary>
|
||||||
|
|||||||
@@ -1735,7 +1735,7 @@
|
|||||||
<data name="frmGameManager_chkCleanFolder" xml:space="preserve">
|
<data name="frmGameManager_chkCleanFolder" xml:space="preserve">
|
||||||
<value>Clean folder on restore</value>
|
<value>Clean folder on restore</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="frmMain_AutoMarked" xml:space="preserve">
|
<data name="frmMain_AutoMark" xml:space="preserve">
|
||||||
<value>The saved game folder for [PARAM] does not exist, the backup has been automatically marked as restored.</value>
|
<value>The saved game folder for [PARAM] does not exist, the backup has been automatically marked as restored.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="frmMain_RestoreNotReady" xml:space="preserve">
|
<data name="frmMain_RestoreNotReady" xml:space="preserve">
|
||||||
@@ -1759,4 +1759,10 @@
|
|||||||
<data name="frmMain_RestoreNotificationSingle" xml:space="preserve">
|
<data name="frmMain_RestoreNotificationSingle" xml:space="preserve">
|
||||||
<value>[PARAM] New Backup Restored</value>
|
<value>[PARAM] New Backup Restored</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="frmMain_NoAutoMark" xml:space="preserve">
|
||||||
|
<value>The saved game folder for [PARAM] does not exist, this backup has been skipped.</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmMain_NoCheckSum" xml:space="preserve">
|
||||||
|
<value>The backup file for [PARAM] has no checksum, it cannot be automatically restored.</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
Reference in New Issue
Block a user