Reworked notifications
This commit is contained in:
@@ -173,11 +173,11 @@ Public Class mgrBackup
|
||||
prs7z.StartInfo.RedirectStandardOutput = True
|
||||
prs7z.StartInfo.CreateNoWindow = True
|
||||
prs7z.Start()
|
||||
RaiseEvent UpdateLog("Backup of " & sSavePath & " in progress...", True, ToolTipIcon.Info, True)
|
||||
RaiseEvent UpdateLog("Backup of " & sSavePath & " in progress...", False, ToolTipIcon.Info, True)
|
||||
While Not prs7z.StandardOutput.EndOfStream
|
||||
If CancelOperation Then
|
||||
prs7z.Kill()
|
||||
RaiseEvent UpdateLog("Backup Aborted by user. The backup file for " & oGame.Name & " will be unusable.", False, ToolTipIcon.Error, True)
|
||||
RaiseEvent UpdateLog("Backup Aborted. The backup file for " & oGame.Name & " will be unusable.", True, ToolTipIcon.Error, True)
|
||||
Exit While
|
||||
End If
|
||||
RaiseEvent UpdateLog(prs7z.StandardOutput.ReadLine, False, ToolTipIcon.Info, False)
|
||||
@@ -188,13 +188,13 @@ Public Class mgrBackup
|
||||
RaiseEvent UpdateLog(oGame.Name & " backup completed.", False, ToolTipIcon.Info, True)
|
||||
bBackupCompleted = True
|
||||
Else
|
||||
RaiseEvent UpdateLog(oGame.Name & " backup operation finished with warnings or errors.", False, ToolTipIcon.Error, True)
|
||||
RaiseEvent UpdateLog(oGame.Name & " backup finished with warnings or errors.", True, ToolTipIcon.Warning, True)
|
||||
bBackupCompleted = False
|
||||
End If
|
||||
End If
|
||||
prs7z.Dispose()
|
||||
Else
|
||||
RaiseEvent UpdateLog("Backup Aborted. The path " & sSavePath & " for " & oGame.Name & " does not exist.", False, ToolTipIcon.Error, True)
|
||||
RaiseEvent UpdateLog("Backup Aborted. The saved game path for " & oGame.Name & " does not exist.", True, ToolTipIcon.Error, True)
|
||||
bBackupCompleted = False
|
||||
End If
|
||||
|
||||
@@ -206,7 +206,7 @@ Public Class mgrBackup
|
||||
End If
|
||||
|
||||
If Not DoManifestUpdate(oGame, sBackupFile, dTimeStamp, sHash) Then
|
||||
RaiseEvent UpdateLog("The manifest update for " & oGame.Name & " failed.", False, ToolTipIcon.Error, True)
|
||||
RaiseEvent UpdateLog("The manifest update for " & oGame.Name & " failed.", True, ToolTipIcon.Error, True)
|
||||
End If
|
||||
|
||||
'Write the process path if we have it
|
||||
@@ -215,7 +215,7 @@ Public Class mgrBackup
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
RaiseEvent UpdateLog("An unexpected error occured during the backup process of " & oGame.Name & vbCrLf & ex.Message, False, ToolTipIcon.Error, True)
|
||||
RaiseEvent UpdateLog("An unexpected error occured during the backup of " & oGame.Name & vbCrLf & ex.Message, False, ToolTipIcon.Error, True)
|
||||
End Try
|
||||
End If
|
||||
|
||||
|
||||
@@ -208,11 +208,11 @@ Public Class mgrRestore
|
||||
prs7z.StartInfo.RedirectStandardOutput = True
|
||||
prs7z.StartInfo.CreateNoWindow = True
|
||||
prs7z.Start()
|
||||
RaiseEvent UpdateLog("Restore to " & sExtractPath & " in progress...", True, ToolTipIcon.Info, True)
|
||||
RaiseEvent UpdateLog("Restore to " & sExtractPath & " in progress...", False, ToolTipIcon.Info, True)
|
||||
While Not prs7z.StandardOutput.EndOfStream
|
||||
If CancelOperation Then
|
||||
prs7z.Kill()
|
||||
RaiseEvent UpdateLog("Restored Aborted by user. The save games for " & oBackupInfo.Name & " will be damaged or invalid.", False, ToolTipIcon.Error, True)
|
||||
RaiseEvent UpdateLog("Restored Aborted. The saved games for " & oBackupInfo.Name & " may now be invalid.", True, ToolTipIcon.Error, True)
|
||||
Exit While
|
||||
End If
|
||||
RaiseEvent UpdateLog(prs7z.StandardOutput.ReadLine, False, ToolTipIcon.Info, False)
|
||||
@@ -220,16 +220,16 @@ Public Class mgrRestore
|
||||
prs7z.WaitForExit()
|
||||
If Not CancelOperation Then
|
||||
If prs7z.ExitCode = 0 Then
|
||||
RaiseEvent UpdateLog(oBackupInfo.Name & " backup restored.", True, ToolTipIcon.Info, True)
|
||||
RaiseEvent UpdateLog(oBackupInfo.Name & " backup restored.", False, ToolTipIcon.Info, True)
|
||||
bRestoreCompleted = True
|
||||
Else
|
||||
RaiseEvent UpdateLog(oBackupInfo.Name & " restore operation finished with warnings or errors.", False, ToolTipIcon.Info, True)
|
||||
RaiseEvent UpdateLog(oBackupInfo.Name & " restore finished with warnings or errors.", True, ToolTipIcon.Warning, True)
|
||||
bRestoreCompleted = False
|
||||
End If
|
||||
End If
|
||||
prs7z.Dispose()
|
||||
Else
|
||||
RaiseEvent UpdateLog("Restore Aborted. The backup file could not be found. Ensure the backup location is available.", False, ToolTipIcon.Error, True)
|
||||
RaiseEvent UpdateLog("Restore Aborted. The backup file could not be found.", True, ToolTipIcon.Error, True)
|
||||
End If
|
||||
|
||||
If bRestoreCompleted Then
|
||||
|
||||
Reference in New Issue
Block a user