Added common message box function
This commit is contained in:
@@ -202,15 +202,15 @@ 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()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ValidateBack()
|
||||
@@ -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
|
||||
|
||||
@@ -48,7 +48,7 @@ Public Class frmStartUpWizard
|
||||
Select Case eCurrentStep
|
||||
Case eSteps.Step1
|
||||
btnBack.Enabled = False
|
||||
btnNext.Enabled = True
|
||||
btnNext.Enabled = True
|
||||
tabWizard.SelectTab(0)
|
||||
Case eSteps.Step2
|
||||
txtBackupPath.Text = oSettings.BackupFolder
|
||||
@@ -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
|
||||
@@ -204,7 +204,7 @@
|
||||
Case eModes.Add
|
||||
If CoreValidatation(oTag) Then
|
||||
bSuccess = True
|
||||
mgrTags.DoTagAdd(oTag)
|
||||
mgrTags.DoTagAdd(oTag)
|
||||
eCurrentMode = eModes.View
|
||||
End If
|
||||
Case eModes.Edit
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user