Added common message box function
This commit is contained in:
@@ -202,11 +202,11 @@ Public Class frmAddWizard
|
||||
Next
|
||||
|
||||
If hshDupeCheck.Contains(sNewGame) Then
|
||||
MsgBox("A game with this exact name and process already exists.", MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("A game with this exact name and process already exists.", MsgBoxStyle.Exclamation)
|
||||
Else
|
||||
mgrMonitorList.DoListAdd(oGameToSave)
|
||||
If MsgBox(oGameToSave.Name & " has been saved." & vbCrLf & vbCrLf &
|
||||
"Would you like to add tags for " & oGameToSave.Name & "?", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage(oGameToSave.Name & " has been saved." & vbCrLf & vbCrLf &
|
||||
"Would you like to add tags for " & oGameToSave.Name & "?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
OpenTags(oGameToSave)
|
||||
End If
|
||||
Me.Close()
|
||||
@@ -286,7 +286,7 @@ Public Class frmAddWizard
|
||||
DoSave()
|
||||
End Select
|
||||
|
||||
If bError Then MsgBox(sErrorMessage, MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
||||
If bError Then mgrCommon.ShowMessage(sErrorMessage, MsgBoxStyle.Exclamation)
|
||||
StepHandler()
|
||||
End Sub
|
||||
|
||||
@@ -330,14 +330,14 @@ Public Class frmAddWizard
|
||||
ReadShortcut(sTemp)
|
||||
File.Delete(sTemp)
|
||||
Catch e2 As Exception
|
||||
MsgBox("An error occured working with the shortcut file." & vbCrLf & vbCrLf & e2.Message, MsgBoxStyle.Critical, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("An error occured working with the shortcut file." & vbCrLf & vbCrLf & e2.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
Else
|
||||
MsgBox("An error occured reading the shortcut file." & vbCrLf & vbCrLf & e1.Message, MsgBoxStyle.Critical, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("An error occured reading the shortcut file." & vbCrLf & vbCrLf & e1.Message, MsgBoxStyle.Critical)
|
||||
End If
|
||||
End Try
|
||||
Else
|
||||
MsgBox("This file is not a shorcut.")
|
||||
mgrCommon.ShowMessage("This file is not a shorcut.", MsgBoxStyle.Information)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -135,9 +135,9 @@ Public Class frmFileFolderSearch
|
||||
If FoundItem = "Cancel" Then FoundItem = String.Empty
|
||||
|
||||
If oDrives.Count > iCurrentDrive And FoundItem = String.Empty Then
|
||||
oResult = MsgBox("The location was not found on the " & oSearchDrive.Root.ToString & _
|
||||
oResult = mgrCommon.ShowMessage("The location was not found on the " & oSearchDrive.Root.ToString & _
|
||||
" drive. Do you wish to search the " & oDrives(iCurrentDrive).RootDirectory.ToString & _
|
||||
" drive?", MsgBoxStyle.YesNo, "Game Backup Monitor")
|
||||
" drive?", MsgBoxStyle.YesNo)
|
||||
If oResult = MsgBoxResult.Yes Then
|
||||
Search(oDrives(iCurrentDrive))
|
||||
Else
|
||||
|
||||
+21
-21
@@ -349,7 +349,7 @@ Public Class frmGameManager
|
||||
Private Function HandleDirty() As MsgBoxResult
|
||||
Dim oResult As MsgBoxResult
|
||||
|
||||
oResult = MsgBox("There are unsaved changes on this form. Do you want to save?", MsgBoxStyle.YesNoCancel, "Game Backup Monitor")
|
||||
oResult = mgrCommon.ShowMessage("There are unsaved changes on this form. Do you want to save?", MsgBoxStyle.YesNoCancel)
|
||||
|
||||
Select Case oResult
|
||||
Case MsgBoxResult.Yes
|
||||
@@ -393,7 +393,7 @@ Public Class frmGameManager
|
||||
If File.Exists(sFileName) Then
|
||||
Process.Start("explorer.exe", "/select," & sFileName)
|
||||
Else
|
||||
MsgBox("The backup file does not exist.", MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("The backup file does not exist.", MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -482,7 +482,7 @@ Public Class frmGameManager
|
||||
If Directory.Exists(sPath) Then
|
||||
Process.Start("explorer.exe", sPath)
|
||||
Else
|
||||
MsgBox("The restore path does not exist.", MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("The restore path does not exist.", MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -583,8 +583,8 @@ Public Class frmGameManager
|
||||
Dim oDir As DirectoryInfo
|
||||
Dim sSubDir As String
|
||||
|
||||
If MsgBox("This will delete the backup file and all records of this backup. This cannot be undone. " & vbCrLf & vbCrLf & "Do you want to remove the data for " _
|
||||
& CurrentBackupItem.Name & "?", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage("This will delete the backup file and all records of this backup. This cannot be undone. " & vbCrLf & vbCrLf & "Do you want to remove the data for " _
|
||||
& CurrentBackupItem.Name & "?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
mgrManifest.DoManifestDelete(CurrentBackupItem, mgrSQLite.Database.Local)
|
||||
mgrManifest.DoManifestDelete(CurrentBackupItem, mgrSQLite.Database.Remote)
|
||||
|
||||
@@ -601,9 +601,9 @@ Public Class frmGameManager
|
||||
oDir = New DirectoryInfo(sSubDir)
|
||||
If oDir.GetDirectories.Length > 0 Or oDir.GetFiles.Length > 0 Then
|
||||
'Confirm
|
||||
If MsgBox("The backup folder " & sSubDir & " still contains " & oDir.GetDirectories.Length & " directories and " &
|
||||
If mgrCommon.ShowMessage("The backup folder " & sSubDir & " still contains " & oDir.GetDirectories.Length & " directories and " &
|
||||
oDir.GetFiles.Length & " files." & vbCrLf & vbCrLf & "Do you want to delete the contents and remove the sub-folder for this game?",
|
||||
MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
If Directory.Exists(sSubDir) Then Directory.Delete(sSubDir, True)
|
||||
End If
|
||||
Else
|
||||
@@ -982,7 +982,7 @@ Public Class frmGameManager
|
||||
Next
|
||||
|
||||
sChanges = vbCrLf & vbCrLf & "Monitor this game: " & mgrCommon.BooleanYesNo(oApp.Enabled) & vbCrLf & "Monitor only (No backup): " & mgrCommon.BooleanYesNo(oApp.MonitorOnly)
|
||||
If MsgBox("Are you sure you want to save the following changes to " & sMonitorIDs.Count & " selected games?" & sChanges, MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage("Are you sure you want to save the following changes to " & sMonitorIDs.Count & " selected games?" & sChanges, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
bSuccess = True
|
||||
mgrMonitorList.DoListUpdateMulti(sMonitorIDs, oApp)
|
||||
eCurrentMode = eModes.Disabled
|
||||
@@ -1008,7 +1008,7 @@ Public Class frmGameManager
|
||||
oData = lstGames.SelectedItems(0)
|
||||
oApp = DirectCast(AppData(oData.Key), clsGame)
|
||||
|
||||
If MsgBox("Are you sure you want to delete " & oApp.Name & "? This cannot be undone." & vbCrLf & vbCrLf & "This will not delete any backup files that already exist for this game.", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage("Are you sure you want to delete " & oApp.Name & "? This cannot be undone." & vbCrLf & vbCrLf & "This will not delete any backup files that already exist for this game.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
mgrMonitorList.DoListDelete(oApp.ID)
|
||||
LoadData()
|
||||
eCurrentMode = eModes.Disabled
|
||||
@@ -1022,7 +1022,7 @@ Public Class frmGameManager
|
||||
sMonitorIDs.Add(oApp.ID)
|
||||
Next
|
||||
|
||||
If MsgBox("Are you sure you want to delete the " & sMonitorIDs.Count & " selected games? This cannot be undone.", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage("Are you sure you want to delete the " & sMonitorIDs.Count & " selected games? This cannot be undone.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
mgrMonitorList.DoListDeleteMulti(sMonitorIDs)
|
||||
LoadData()
|
||||
eCurrentMode = eModes.Disabled
|
||||
@@ -1044,25 +1044,25 @@ Public Class frmGameManager
|
||||
|
||||
Private Function CoreValidatation(ByVal oApp As clsGame) As Boolean
|
||||
If txtName.Text = String.Empty Then
|
||||
MsgBox("You must enter a valid application name.", MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("You must enter a valid application name.", MsgBoxStyle.Exclamation)
|
||||
txtName.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
If txtProcess.Text = String.Empty Then
|
||||
MsgBox("You must enter a valid process name.", MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("You must enter a valid process name.", MsgBoxStyle.Exclamation)
|
||||
txtProcess.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
If chkFolderSave.Checked = False And txtFileType.Text = String.Empty Then
|
||||
MsgBox("You must choose items to include in the backup, or choose to save the entire folder.", MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("You must choose items to include in the backup, or choose to save the entire folder.", MsgBoxStyle.Exclamation)
|
||||
btnInclude.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
If mgrMonitorList.DoDuplicateListCheck(oApp.Name, oApp.ProcessName, , oApp.ID) Then
|
||||
MsgBox("A game with this exact name and process already exists.", MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("A game with this exact name and process already exists.", MsgBoxStyle.Exclamation)
|
||||
txtName.Focus()
|
||||
Return False
|
||||
End If
|
||||
@@ -1085,7 +1085,7 @@ Public Class frmGameManager
|
||||
Next
|
||||
|
||||
If oMarkList.Count = 1 Then
|
||||
If MsgBox("Do you want to mark " & oMarkList(0).Name & " as restored? This cannot be undone.", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage("Do you want to mark " & oMarkList(0).Name & " as restored? This cannot be undone.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
bWasUpdated = True
|
||||
If mgrManifest.DoManifestCheck(oMarkList(0).Name, mgrSQLite.Database.Local) Then
|
||||
mgrManifest.DoManifestUpdate(oMarkList(0), mgrSQLite.Database.Local)
|
||||
@@ -1094,7 +1094,7 @@ Public Class frmGameManager
|
||||
End If
|
||||
End If
|
||||
ElseIf oMarkList.Count > 1 Then
|
||||
If MsgBox("Do you want to mark " & oMarkList.Count & " games as restored? This cannot be undone.", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage("Do you want to mark " & oMarkList.Count & " games as restored? This cannot be undone.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
bWasUpdated = True
|
||||
For Each oGameBackup In oMarkList
|
||||
If mgrManifest.DoManifestCheck(oGameBackup.Name, mgrSQLite.Database.Local) Then
|
||||
@@ -1105,7 +1105,7 @@ Public Class frmGameManager
|
||||
Next
|
||||
End If
|
||||
Else
|
||||
MsgBox("The selected game(s) have no backup data.", MsgBoxStyle.Information, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("The selected game(s) have no backup data.", MsgBoxStyle.Information)
|
||||
End If
|
||||
|
||||
'Don't bother updating unless we actually did something
|
||||
@@ -1144,7 +1144,7 @@ Public Class frmGameManager
|
||||
sMsg = "Are you sure you want to run a backup for " & BackupList.Count & " games? This will close the form."
|
||||
End If
|
||||
|
||||
If MsgBox(sMsg, MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage(sMsg, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
TriggerBackup = True
|
||||
Me.Close()
|
||||
End If
|
||||
@@ -1179,12 +1179,12 @@ Public Class frmGameManager
|
||||
bDoRestore = True
|
||||
sMsg = "Are you sure you want to restore the backups for " & RestoreList.Count & " games? This will close the form."
|
||||
Else
|
||||
MsgBox("The selected game(s) have no backup data.", MsgBoxStyle.Information, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("The selected game(s) have no backup data.", MsgBoxStyle.Information)
|
||||
End If
|
||||
|
||||
'We need this check in case a bunch of games with no backups are multi-selected
|
||||
If bDoRestore Then
|
||||
If MsgBox(sMsg, MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage(sMsg, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
TriggerRestore = True
|
||||
Me.Close()
|
||||
End If
|
||||
@@ -1218,7 +1218,7 @@ Public Class frmGameManager
|
||||
|
||||
Private Sub ImportOfficialGameList()
|
||||
|
||||
If MsgBox("Would you like to choose games to import from the official game list?" & vbCrLf & vbCrLf & "This require an active internet connection.", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage("Would you like to choose games to import from the official game list?" & vbCrLf & vbCrLf & "This require an active internet connection.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
If mgrMonitorList.DoImport(mgrPath.OfficialImportURL) Then
|
||||
LoadData()
|
||||
End If
|
||||
|
||||
@@ -72,7 +72,7 @@ Public Class frmIncludeExclude
|
||||
Catch uaex As UnauthorizedAccessException
|
||||
'Do Nothing
|
||||
Catch ex As Exception
|
||||
MsgBox("An unexpected error occured while reading the file system: " & vbCrLf & vbCrLf & ex.Message, MsgBoxStyle.Critical, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("An unexpected error occured while reading the file system: " & vbCrLf & vbCrLf & ex.Message, MsgBoxStyle.Critical)
|
||||
Finally
|
||||
treFiles.EndUpdate()
|
||||
Cursor.Current = Cursors.Default
|
||||
|
||||
+22
-22
@@ -281,7 +281,7 @@ Public Class frmMain
|
||||
If oSettings.DisableConfirmation Then
|
||||
bDoBackup = True
|
||||
Else
|
||||
If MsgBox("Do you wish to backup data from " & oProcess.GameInfo.Name & "?", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage("Do you wish to backup data from " & oProcess.GameInfo.Name & "?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
bDoBackup = True
|
||||
Else
|
||||
bDoBackup = False
|
||||
@@ -550,10 +550,10 @@ Public Class frmMain
|
||||
|
||||
'Functions handling the opening of other windows
|
||||
Private Sub OpenAbout()
|
||||
MsgBox("Game Backup Monitor" & vbCrLf & sVersion & vbCrLf & sRevision & vbCrLf & Chr(169) & sConstCopyright & vbCrLf & vbCrLf &
|
||||
mgrCommon.ShowMessage("Game Backup Monitor" & vbCrLf & sVersion & vbCrLf & sRevision & vbCrLf & Chr(169) & sConstCopyright & vbCrLf & vbCrLf &
|
||||
"This program comes with ABSOLUTELY NO WARRANTY." & vbCrLf &
|
||||
"This is free software, and you are welcome to redistribute it under certain conditions." & vbCrLf & vbCrLf &
|
||||
"See gpl-3.0.html in the program folder for details.", MsgBoxStyle.Information, "Game Backup Monitor")
|
||||
"See gpl-3.0.html in the program folder for details.", MsgBoxStyle.Information)
|
||||
End Sub
|
||||
|
||||
Private Sub OpenTags()
|
||||
@@ -702,7 +702,7 @@ Public Class frmMain
|
||||
|
||||
'The application cannot continue if this fails
|
||||
If Not oBackup.CheckForUtilities(mgrPath.Utility7zLocation) Then
|
||||
MsgBox("7-Zip was not found in the Game Backup Monitor utilities folder. The application cannot continue.", MsgBoxStyle.Critical, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("7-Zip was not found in the Game Backup Monitor utilities folder. The application cannot continue.", MsgBoxStyle.Critical)
|
||||
bShutdown = True
|
||||
Me.Close()
|
||||
End If
|
||||
@@ -783,9 +783,9 @@ Public Class frmMain
|
||||
Dim sGame As String = oProcess.GameInfo.Name
|
||||
|
||||
If bProcessIsAdmin Then
|
||||
MsgBox(sGame & " is running as Administrator and GBM is not." &
|
||||
mgrCommon.ShowMessage(sGame & " is running as Administrator and GBM is not." &
|
||||
vbCrLf & "You cannot cancel monitoring at this time." _
|
||||
& vbCrLf & vbCrLf & "Run GBM as Administrator to prevent this issue.", MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
||||
& vbCrLf & vbCrLf & "Run GBM as Administrator to prevent this issue.", MsgBoxStyle.Exclamation)
|
||||
RestartAsAdmin()
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -794,7 +794,7 @@ Public Class frmMain
|
||||
sGame = "the unknown game"
|
||||
End If
|
||||
|
||||
If MsgBox("Do you wish to cancel the monitoring of " & sGame & "?" & vbCrLf & vbCrLf & "Warning: When monitoring is cancelled, session time is NOT saved.", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage("Do you wish to cancel the monitoring of " & sGame & "?" & vbCrLf & vbCrLf & "Warning: When monitoring is cancelled, session time is NOT saved.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
UpdateLog("Monitoring of " & sGame & " was cancelled.", False)
|
||||
SetLastAction("Monitoring of " & oProcess.GameInfo.CroppedName & " was cancelled")
|
||||
|
||||
@@ -816,7 +816,7 @@ Public Class frmMain
|
||||
Dim bClose As Boolean = False
|
||||
|
||||
If bPrompt Then
|
||||
If MsgBox("Are you sure you want to exit? Your games will no longer be monitored.", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage("Are you sure you want to exit? Your games will no longer be monitored.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
bClose = True
|
||||
End If
|
||||
Else
|
||||
@@ -1038,7 +1038,7 @@ Public Class frmMain
|
||||
Private Sub VerifyCustomPathVariables()
|
||||
Dim sGames As String = String.Empty
|
||||
If Not mgrPath.VerifyCustomVariables(hshScanList, sGames) Then
|
||||
MsgBox("The following monitored game(s) contain a custom path variable that is not set." & vbCrLf & sGames & vbCrLf & vbCrLf & "You will encounter backup/restore errors with these games until the variables are set.", MsgBoxStyle.Critical, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("The following monitored game(s) contain a custom path variable that is not set." & vbCrLf & sGames & vbCrLf & vbCrLf & "You will encounter backup/restore errors with these games until the variables are set.", MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1066,7 +1066,7 @@ Public Class frmMain
|
||||
Try
|
||||
IO.Directory.CreateDirectory(sSettingsRoot)
|
||||
Catch ex As Exception
|
||||
MsgBox("An error occured creating application settings folder. The application cannot proceed." & vbCrLf & vbCrLf & ex.Message, MsgBoxStyle.Critical, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("An error occured creating application settings folder. The application cannot proceed." & vbCrLf & vbCrLf & ex.Message, MsgBoxStyle.Critical)
|
||||
bShutdown = True
|
||||
Me.Close()
|
||||
End Try
|
||||
@@ -1082,9 +1082,9 @@ Public Class frmMain
|
||||
If Not oDatabase.CheckDBVer(iDBVer) Then
|
||||
Select Case iDB
|
||||
Case mgrSQLite.Database.Local
|
||||
MsgBox("Your local GBM data (Version " & iDBVer & ") is too new for your version of GBM (Version " & mgrCommon.AppVersion & ")." & vbCrLf & vbCrLf & "Please upgrade GBM or restore the settings file appropriate for your version. The application cannot proceed.", MsgBoxStyle.Critical, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("Your local GBM data (Version " & iDBVer & ") is too new for your version of GBM (Version " & mgrCommon.AppVersion & ")." & vbCrLf & vbCrLf & "Please upgrade GBM or restore the settings file appropriate for your version. The application cannot proceed.", MsgBoxStyle.Critical)
|
||||
Case mgrSQLite.Database.Remote
|
||||
MsgBox("The GBM data (Version " & iDBVer & ") in your backup folder is too new for your version of GBM (Version " & mgrCommon.AppVersion & ")." & vbCrLf & vbCrLf & "All computers sharing a backup folder must use the same version of GBM. The application cannot proceed.", MsgBoxStyle.Critical, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("The GBM data (Version " & iDBVer & ") in your backup folder is too new for your version of GBM (Version " & mgrCommon.AppVersion & ")." & vbCrLf & vbCrLf & "All computers sharing a backup folder must use the same version of GBM. The application cannot proceed.", MsgBoxStyle.Critical)
|
||||
End Select
|
||||
|
||||
bShutdown = True
|
||||
@@ -1133,9 +1133,9 @@ Public Class frmMain
|
||||
'Functions to handle other features
|
||||
Private Sub RestartAsAdmin()
|
||||
If mgrCommon.IsElevated Then
|
||||
MsgBox("Game Backup Monitor is already running as Administrator.", MsgBoxStyle.Information, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("Game Backup Monitor is already running as Administrator.", MsgBoxStyle.Information)
|
||||
Else
|
||||
If MsgBox("Do you want to restart Game Backup Monitor as Administrator?", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage("Do you want to restart Game Backup Monitor as Administrator?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
mgrCommon.RestartAsAdmin()
|
||||
bShutdown = True
|
||||
ShutdownApp(False)
|
||||
@@ -1148,10 +1148,10 @@ Public Class frmMain
|
||||
|
||||
PauseScan()
|
||||
|
||||
If MsgBox("This tool removes orphaned backup information from the local manifest based on the current backup folder. Data can become orphaned when backups are deleted by various computers that share the same backup folder on a cloud or network." & vbCrLf & vbCrLf &
|
||||
If mgrCommon.ShowMessage("This tool removes orphaned backup information from the local manifest based on the current backup folder. Data can become orphaned when backups are deleted by various computers that share the same backup folder on a cloud or network." & vbCrLf & vbCrLf &
|
||||
"When alternating between different backup folders you should NOT use this tool." & vbCrLf & vbCrLf &
|
||||
"Do you wish to proceed?", MsgBoxStyle.YesNo _
|
||||
, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
) = MsgBoxResult.Yes Then
|
||||
|
||||
slItems = mgrRestore.SyncLocalManifest()
|
||||
|
||||
@@ -1159,9 +1159,9 @@ Public Class frmMain
|
||||
For Each oItem As clsBackup In slItems.Values
|
||||
UpdateLog(oItem.Name & " entry was removed from local manfiest.", False)
|
||||
Next
|
||||
MsgBox(slItems.Count & " entries were removed from the local manifest.")
|
||||
mgrCommon.ShowMessage(slItems.Count & " entries were removed from the local manifest.", MsgBoxStyle.Information)
|
||||
Else
|
||||
MsgBox("The local manifest is clean.")
|
||||
mgrCommon.ShowMessage("The local manifest is clean.", MsgBoxStyle.Information)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -1175,9 +1175,9 @@ Public Class frmMain
|
||||
|
||||
PauseScan()
|
||||
|
||||
If MsgBox("This will rebuild all databases and shrink them to an optimal size." & vbCrLf &
|
||||
If mgrCommon.ShowMessage("This will rebuild all databases and shrink them to an optimal size." & vbCrLf &
|
||||
"This should only be used if your gbm.s3db files are becoming very large." & vbCrLf & vbCrLf &
|
||||
"Do you wish to continue?", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
"Do you wish to continue?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
|
||||
oLocalDatabase = New mgrSQLite(mgrSQLite.Database.Local)
|
||||
oRemoteDatabase = New mgrSQLite(mgrSQLite.Database.Remote)
|
||||
@@ -1326,7 +1326,7 @@ Public Class frmMain
|
||||
If oProcess.Duplicate Then
|
||||
sErrorMessage = "Multiple possible games have been detected running as Administrator and GBM is not, GBM cannot detect the path to identify your game or save your backup." & vbCrLf & vbCrLf &
|
||||
"Please run GBM as Administrator to properly detect and backup this game."
|
||||
MsgBox(sErrorMessage, MsgBoxStyle.Critical, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage(sErrorMessage, MsgBoxStyle.Exclamation)
|
||||
bAskForRestart = True
|
||||
Else
|
||||
If Not CheckForSavedPath() Then
|
||||
@@ -1346,7 +1346,7 @@ Public Class frmMain
|
||||
If oProcess.Duplicate Then
|
||||
sErrorMessage = "Multiple possible 64-bit games have been detected, GBM cannot detect the path to identify your game or save your backup." & vbCrLf & vbCrLf &
|
||||
"Please install the 64-bit version of GBM to detect and backup this game properly."
|
||||
MsgBox(sErrorMessage, MsgBoxStyle.Critical, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage(sErrorMessage, MsgBoxStyle.Exclamation)
|
||||
Else
|
||||
If Not CheckForSavedPath() Then
|
||||
sErrorMessage = oProcess.GameInfo.Name & " is a 64-bit game, GBM cannot detect the required information to save your backup."
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
End If
|
||||
oSettings.BackupFolder = txtBackupFolder.Text
|
||||
Else
|
||||
MsgBox("The backup folder does not exist. Please choose a valid backup folder.", MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("The backup folder does not exist. Please choose a valid backup folder.", MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ Public Class frmStartUpWizard
|
||||
'Make sure database is the latest version
|
||||
oDatabase.DatabaseUpgrade()
|
||||
mgrMonitorList.SyncMonitorLists(False)
|
||||
MsgBox("Existing data was detected in the backup folder and has been imported.", MsgBoxStyle.Information, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("Existing data was detected in the backup folder and has been imported.", MsgBoxStyle.Information)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -71,7 +71,7 @@ Public Class frmStartUpWizard
|
||||
End Sub
|
||||
|
||||
Private Sub DownloadSettings()
|
||||
If MsgBox("Would you like to choose games to import from the official game list?" & vbCrLf & vbCrLf & "This require an active internet connection.", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage("Would you like to choose games to import from the official game list?" & vbCrLf & vbCrLf & "This require an active internet connection.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
If mgrMonitorList.DoImport(mgrPath.OfficialImportURL) Then
|
||||
oGameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList)
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists()
|
||||
@@ -165,7 +165,7 @@ Public Class frmStartUpWizard
|
||||
Me.Close()
|
||||
End Select
|
||||
|
||||
If bError Then MsgBox(sErrorMessage, MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
||||
If bError Then mgrCommon.ShowMessage(sErrorMessage, MsgBoxStyle.Exclamation)
|
||||
StepHandler()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
Private Function HandleDirty() As MsgBoxResult
|
||||
Dim oResult As MsgBoxResult
|
||||
|
||||
oResult = MsgBox("There are unsaved changes on this form. Do you want to save?", MsgBoxStyle.YesNoCancel, "Game Backup Monitor")
|
||||
oResult = mgrCommon.ShowMessage("There are unsaved changes on this form. Do you want to save?", MsgBoxStyle.YesNoCancel)
|
||||
|
||||
Select Case oResult
|
||||
Case MsgBoxResult.Yes
|
||||
@@ -229,7 +229,7 @@
|
||||
If lstTags.SelectedItems.Count > 0 Then
|
||||
oTag = DirectCast(TagData(lstTags.SelectedItems(0).ToString), clsTag)
|
||||
|
||||
If MsgBox("Are you sure you want to delete " & oTag.Name & "? This cannot be undone." & vbCrLf & vbCrLf & "All games using this tag will have it removed.", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage("Are you sure you want to delete " & oTag.Name & "? This cannot be undone." & vbCrLf & vbCrLf & "All games using this tag will have it removed.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
mgrTags.DoTagDelete(oTag.ID)
|
||||
LoadData()
|
||||
eCurrentMode = eModes.Disabled
|
||||
@@ -248,13 +248,13 @@
|
||||
|
||||
Private Function CoreValidatation(ByVal oTag As clsTag) As Boolean
|
||||
If txtName.Text = String.Empty Then
|
||||
MsgBox("You must enter a valid tag name.", MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("You must enter a valid tag name.", MsgBoxStyle.Exclamation)
|
||||
txtName.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
If mgrTags.DoCheckDuplicate(oTag.Name, oTag.ID) Then
|
||||
MsgBox("A tag with this name already exists.", MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("A tag with this name already exists.", MsgBoxStyle.Exclamation)
|
||||
txtName.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
@@ -67,7 +67,7 @@ Public Class frmVariableManager
|
||||
Private Function HandleDirty() As MsgBoxResult
|
||||
Dim oResult As MsgBoxResult
|
||||
|
||||
oResult = MsgBox("There are unsaved changes on this form. Do you want to save?", MsgBoxStyle.YesNoCancel, "Game Backup Monitor")
|
||||
oResult = mgrCommon.ShowMessage("There are unsaved changes on this form. Do you want to save?", MsgBoxStyle.YesNoCancel)
|
||||
|
||||
Select Case oResult
|
||||
Case MsgBoxResult.Yes
|
||||
@@ -251,7 +251,7 @@ Public Class frmVariableManager
|
||||
If lstVariables.SelectedItems.Count > 0 Then
|
||||
oCustomVariable = DirectCast(VariableData(lstVariables.SelectedItems(0).ToString), clsPathVariable)
|
||||
|
||||
If MsgBox("Are you sure you want to delete " & oCustomVariable.Name & "? This cannot be undone.", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage("Are you sure you want to delete " & oCustomVariable.Name & "? This cannot be undone.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
mgrVariables.DoVariableDelete(oCustomVariable.ID)
|
||||
mgrVariables.DoPathUpdate(oCurrentVariable.FormattedName, oCurrentVariable.Path)
|
||||
LoadData()
|
||||
@@ -271,19 +271,19 @@ Public Class frmVariableManager
|
||||
|
||||
Private Function CoreValidatation(ByVal oCustomVariable As clsPathVariable) As Boolean
|
||||
If txtName.Text = String.Empty Then
|
||||
MsgBox("You must enter a valid path name.", MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("You must enter a valid path name.", MsgBoxStyle.Exclamation)
|
||||
txtName.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
If txtPath.Text = String.Empty Then
|
||||
MsgBox("You must enter a valid path.", MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("You must enter a valid path.", MsgBoxStyle.Exclamation)
|
||||
txtPath.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
If mgrVariables.DoCheckDuplicate(oCustomVariable.Name, oCustomVariable.ID) Then
|
||||
MsgBox("An custom variable with this name already exists.", MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("An custom variable with this name already exists.", MsgBoxStyle.Exclamation)
|
||||
txtName.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
@@ -109,7 +109,7 @@ Public Class mgrBackup
|
||||
RaiseEvent UpdateBackupInfo(oGame)
|
||||
|
||||
If mgrRestore.CheckManifest(oGame.Name) Then
|
||||
If MsgBox("The manifest shows the backup folder contains a backup for " & oGame.Name & " that has not been restored on this computer." & vbCrLf & vbCrLf & "Do you want to overwrite this file anyway?", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.No Then
|
||||
If mgrCommon.ShowMessage("The manifest shows the backup folder contains a backup for " & oGame.Name & " that has not been restored on this computer." & vbCrLf & vbCrLf & "Do you want to overwrite this file anyway?", MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
RaiseEvent UpdateLog("Backup aborted by user due to manifest conflict.", False, ToolTipIcon.Error, True)
|
||||
bDoBackup = False
|
||||
End If
|
||||
@@ -134,7 +134,7 @@ Public Class mgrBackup
|
||||
End If
|
||||
|
||||
If oSettings.ShowOverwriteWarning And File.Exists(sBackupFile) Then
|
||||
If MsgBox("A file with the same name already exists in the backup folder." & vbCrLf & vbCrLf & "Do you want to overwrite this file?", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.No Then
|
||||
If mgrCommon.ShowMessage("A file with the same name already exists in the backup folder." & vbCrLf & vbCrLf & "Do you want to overwrite this file?", MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
RaiseEvent UpdateLog(oGame.Name & " backup aborted by user due to overwrite.", False, ToolTipIcon.Error, True)
|
||||
bDoBackup = False
|
||||
End If
|
||||
|
||||
@@ -125,4 +125,10 @@ Public Class mgrCommon
|
||||
oProcess.Start()
|
||||
End Sub
|
||||
|
||||
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal oType As MsgBoxStyle) As MsgBoxResult
|
||||
Dim oResult As MsgBoxResult
|
||||
oResult = MsgBox(sMsg, oType, "Game Backup Monitor")
|
||||
Return oResult
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -23,9 +23,9 @@ Public Class mgrMonitorList
|
||||
|
||||
'If the remote database actually contains a list, then ask what to do
|
||||
If iGameCount > 0 Then
|
||||
If MsgBox("GBM data already exists in the backup folder." & vbCrLf & vbCrLf & _
|
||||
If mgrCommon.ShowMessage("GBM data already exists in the backup folder." & vbCrLf & vbCrLf & _
|
||||
"Do you want to make your local game list the new master game list in this folder? (Recommended)" & vbCrLf & vbCrLf & _
|
||||
"Choosing No will sync your local game list to the current master game list in this folder.", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
"Choosing No will sync your local game list to the current master game list in this folder.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
mgrMonitorList.SyncMonitorLists()
|
||||
Else
|
||||
mgrMonitorList.SyncMonitorLists(False)
|
||||
@@ -45,7 +45,7 @@ Public Class mgrMonitorList
|
||||
Dim oStringFilters As New Hashtable
|
||||
Dim eCurrentFilter As frmFilter.eFilterType = frmFilter.eFilterType.NoFilter
|
||||
|
||||
If MsgBox("Would you like to apply a filter to your export?", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage("Would you like to apply a filter to your export?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
Dim frm As New frmFilter
|
||||
frm.ShowDialog()
|
||||
oTagFilters = frm.TagFilters
|
||||
@@ -58,7 +58,7 @@ Public Class mgrMonitorList
|
||||
bSuccess = mgrXML.SerializeAndExport(oList, sLocation)
|
||||
|
||||
If bSuccess Then
|
||||
MsgBox("Export Complete. " & oList.Count & " item(s) have been exported.", MsgBoxStyle.Information, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("Export Complete. " & oList.Count & " item(s) have been exported.", MsgBoxStyle.Information)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -233,10 +233,10 @@ Public Class mgrMonitorList
|
||||
mgrTags.DoTagAddImport(frm.ImportData)
|
||||
|
||||
Cursor.Current = Cursors.Default
|
||||
MsgBox("Import Complete.", MsgBoxStyle.Information, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("Import Complete.", MsgBoxStyle.Information)
|
||||
End If
|
||||
Else
|
||||
MsgBox("This list does not contain any new games to import.", MsgBoxStyle.Information, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("This list does not contain any new games to import.", MsgBoxStyle.Information)
|
||||
End If
|
||||
|
||||
Application.DoEvents()
|
||||
@@ -249,7 +249,7 @@ Public Class mgrMonitorList
|
||||
ImportMonitorList(sPath, True)
|
||||
Return True
|
||||
Else
|
||||
MsgBox("There's no response from:" & vbCrLf & vbCrLf & sPath & vbCrLf & vbCrLf & "Either the server is not responding or the URL is invalid.")
|
||||
mgrCommon.ShowMessage("There's no response from:" & vbCrLf & vbCrLf & sPath & vbCrLf & vbCrLf & "Either the server is not responding or the URL is invalid.", MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
@@ -257,7 +257,7 @@ Public Class mgrMonitorList
|
||||
ImportMonitorList(sPath)
|
||||
Return True
|
||||
Else
|
||||
MsgBox("The file:" & vbCrLf & sPath & vbCrLf & "cannot be found.")
|
||||
mgrCommon.ShowMessage("The file:" & vbCrLf & sPath & vbCrLf & "cannot be found.", MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -347,7 +347,7 @@ Public Class mgrPath
|
||||
If bNoAuto Then
|
||||
sMessage = sSearchReason & vbCrLf & vbCrLf & "Do you wish to manually set the game path? (Path will be saved)"
|
||||
|
||||
If MsgBox(sMessage, MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
sFolder = SetManualgamePath()
|
||||
End If
|
||||
|
||||
@@ -356,14 +356,14 @@ Public Class mgrPath
|
||||
|
||||
sMessage = sSearchReason & vbCrLf & vbCrLf & "Do you wish to automatically search for the game path? (Path will be saved)"
|
||||
|
||||
If MsgBox(sMessage, MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
frmFind.ShowDialog()
|
||||
|
||||
If frmFind.FoundItem <> String.Empty Then
|
||||
sFolder = IO.Path.GetDirectoryName(frmFind.FoundItem)
|
||||
sMessage = sGameName & " was located in the following folder:" & vbCrLf & vbCrLf & _
|
||||
sFolder & vbCrLf & vbCrLf & "Is this correct?"
|
||||
If MsgBox(sMessage, MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
Return sFolder
|
||||
Else
|
||||
sFolder = String.Empty
|
||||
@@ -379,7 +379,7 @@ Public Class mgrPath
|
||||
sMessage = "Do you wish to manually set the game path? (Path will be saved)"
|
||||
End If
|
||||
|
||||
If MsgBox(sMessage, MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
sFolder = SetManualgamePath()
|
||||
End If
|
||||
End If
|
||||
@@ -391,9 +391,9 @@ Public Class mgrPath
|
||||
Dim dBrowser As FolderBrowserDialog
|
||||
|
||||
If Not Directory.Exists(sBackupPath) Then
|
||||
If MsgBox("The backup location " & sBackupPath & " is not available." & vbCrLf & _
|
||||
If mgrCommon.ShowMessage("The backup location " & sBackupPath & " is not available." & vbCrLf & _
|
||||
"It may be on an external or network drive that isn't connected." & vbCrLf & vbCrLf & _
|
||||
"Do you want to select another backup location and continue?", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
"Do you want to select another backup location and continue?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
dBrowser = New FolderBrowserDialog
|
||||
dBrowser.SelectedPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
|
||||
If dBrowser.ShowDialog = DialogResult.OK Then
|
||||
|
||||
@@ -31,8 +31,8 @@ Public Class mgrRestore
|
||||
Dim oResult As MsgBoxResult
|
||||
|
||||
If oCheckBackup.RestorePath <> oCheckGame.Path Then
|
||||
oResult = MsgBox("The restore path for " & oCheckBackup.CroppedName & " does not match it's current save path." & vbCrLf & vbCrLf & _
|
||||
"Do you want to restore to the current save path instead? (Recommended)", MsgBoxStyle.YesNoCancel, "Game Backup Monitor")
|
||||
oResult = mgrCommon.ShowMessage("The restore path for " & oCheckBackup.CroppedName & " does not match it's current save path." & vbCrLf & vbCrLf & _
|
||||
"Do you want to restore to the current save path instead? (Recommended)", MsgBoxStyle.YesNoCancel)
|
||||
If oResult = MsgBoxResult.Yes Then
|
||||
If Path.IsPathRooted(oCheckGame.Path) Then
|
||||
oCheckBackup.AbsolutePath = True
|
||||
@@ -198,8 +198,8 @@ Public Class mgrRestore
|
||||
|
||||
'Check if restore location exists, prompt to create if it doesn't.
|
||||
If Not Directory.Exists(sExtractPath) Then
|
||||
If MsgBox("The restore path " & sExtractPath & " does not exist." & vbCrLf & vbCrLf & _
|
||||
"Do you want to create the folder and continue?", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage("The restore path " & sExtractPath & " does not exist." & vbCrLf & vbCrLf & _
|
||||
"Do you want to create the folder and continue?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
Try
|
||||
Directory.CreateDirectory(sExtractPath)
|
||||
Catch ex As Exception
|
||||
@@ -218,8 +218,8 @@ Public Class mgrRestore
|
||||
sHash = mgrHash.Generate_SHA256_Hash(sBackupFile)
|
||||
If sHash <> oBackupInfo.CheckSum Then
|
||||
RaiseEvent UpdateLog("The backup file for " & oBackupInfo.Name & " has failed the file integrity check.", False, ToolTipIcon.Info, True)
|
||||
If MsgBox("The backup file for " & oBackupInfo.Name & " has failed the file intergity check. It may be corrupted, not exist or been modified by another application." & vbCrLf & vbCrLf & _
|
||||
"Do you still want to restore this backup? (Not Recommended)", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.No Then
|
||||
If mgrCommon.ShowMessage("The backup file for " & oBackupInfo.Name & " has failed the file intergity check. It may be corrupted, not exist or been modified by another application." & vbCrLf & vbCrLf & _
|
||||
"Do you still want to restore this backup? (Not Recommended)", MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
RaiseEvent UpdateLog("Restored Aborted by user due to a failed file integrity check.", False, ToolTipIcon.Info, True)
|
||||
bDoRestore = False
|
||||
End If
|
||||
|
||||
@@ -39,7 +39,7 @@ Public Class mgrSQLite
|
||||
File.Copy(mgrPath.RemoteDatabaseLocation, sNewFile, False)
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
MsgBox("An error occured creating a backup of the database file at " & sNewFile & vbCrLf & vbCrLf & ex.Message)
|
||||
mgrCommon.ShowMessage("An error occured creating a backup of the database file at " & sNewFile & vbCrLf & vbCrLf & ex.Message, MsgBoxStyle.Exclamation)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
@@ -99,7 +99,7 @@ Public Class mgrSQLite
|
||||
RunParamQuery(sSql, New Hashtable)
|
||||
Return True
|
||||
Catch e As Exception
|
||||
MsgBox("An error has occured attempting to create the local application database: " & vbCrLf & vbCrLf & e.Message)
|
||||
mgrCommon.ShowMessage("An error has occured attempting to create the local application database: " & vbCrLf & vbCrLf & e.Message, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
@@ -133,7 +133,7 @@ Public Class mgrSQLite
|
||||
RunParamQuery(sSql, New Hashtable)
|
||||
Return True
|
||||
Catch e As Exception
|
||||
MsgBox("An error has occured attempting to create the remote application database: " & vbCrLf & vbCrLf & e.Message)
|
||||
mgrCommon.ShowMessage("An error has occured attempting to create the remote application database: " & vbCrLf & vbCrLf & e.Message, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
@@ -185,7 +185,7 @@ Public Class mgrSQLite
|
||||
trans.Commit()
|
||||
Catch e As Exception
|
||||
trans.Rollback()
|
||||
MsgBox("An error has occured attempting run the query." & vbCrLf & vbCrLf & sSQL & vbCrLf & vbCrLf & e.Message)
|
||||
mgrCommon.ShowMessage("An error has occured attempting run the query." & vbCrLf & vbCrLf & sSQL & vbCrLf & vbCrLf & e.Message, MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
Finally
|
||||
command.Dispose()
|
||||
@@ -211,7 +211,7 @@ Public Class mgrSQLite
|
||||
trans.Commit()
|
||||
Catch e As Exception
|
||||
trans.Rollback()
|
||||
MsgBox("An error has occured attempting run the query." & vbCrLf & vbCrLf & sSQL & vbCrLf & vbCrLf & e.Message)
|
||||
mgrCommon.ShowMessage("An error has occured attempting run the query." & vbCrLf & vbCrLf & sSQL & vbCrLf & vbCrLf & e.Message, MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
Finally
|
||||
command.Dispose()
|
||||
@@ -234,7 +234,7 @@ Public Class mgrSQLite
|
||||
adapter = New SQLiteDataAdapter(command)
|
||||
adapter.Fill(oData)
|
||||
Catch e As Exception
|
||||
MsgBox("An error has occured attempting run the query." & vbCrLf & vbCrLf & sSQL & vbCrLf & vbCrLf & e.Message)
|
||||
mgrCommon.ShowMessage("An error has occured attempting run the query." & vbCrLf & vbCrLf & sSQL & vbCrLf & vbCrLf & e.Message, MsgBoxStyle.Exclamation)
|
||||
Finally
|
||||
command.Dispose()
|
||||
Disconnect()
|
||||
@@ -524,7 +524,7 @@ Public Class mgrSQLite
|
||||
Try
|
||||
command.ExecuteNonQuery()
|
||||
Catch e As Exception
|
||||
MsgBox("An error has occured attempting run the query." & vbCrLf & vbCrLf & sSQL & vbCrLf & vbCrLf & e.Message)
|
||||
mgrCommon.ShowMessage("An error has occured attempting run the query." & vbCrLf & vbCrLf & sSQL & vbCrLf & vbCrLf & e.Message, MsgBoxStyle.Exclamation)
|
||||
Finally
|
||||
command.Dispose()
|
||||
Disconnect()
|
||||
|
||||
@@ -60,7 +60,7 @@ Public Class mgrXML
|
||||
oList = oSerializer.Deserialize(oReader)
|
||||
oReader.Close()
|
||||
Catch ex As Exception
|
||||
MsgBox("The XML file cannot be read, it may be an invalid format or corrupted." & vbCrLf & vbCrLf & ex.Message, MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("The XML file cannot be read, it may be an invalid format or corrupted." & vbCrLf & vbCrLf & ex.Message, MsgBoxStyle.Exclamation)
|
||||
End Try
|
||||
|
||||
Return oList
|
||||
@@ -78,7 +78,7 @@ Public Class mgrXML
|
||||
oWriter.Close()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
MsgBox("An error occured exporting the XML data." & vbCrLf & vbCrLf & ex.Message, MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
||||
mgrCommon.ShowMessage("An error occured exporting the XML data." & vbCrLf & vbCrLf & ex.Message, MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("0.95.*")>
|
||||
<Assembly: AssemblyFileVersion("0.95.0.0")>
|
||||
<Assembly: AssemblyVersion("0.96.*")>
|
||||
<Assembly: AssemblyFileVersion("0.96.0.0")>
|
||||
|
||||
Reference in New Issue
Block a user