Merge pull request #28 from MikeMaximus/v96

Merge current v96 changes into v95
This commit is contained in:
Michael J. Seiferling
2015-12-30 21:24:59 -06:00
29 changed files with 6146 additions and 491 deletions
+67 -30
View File
@@ -1,4 +1,5 @@
Imports System.IO
Imports GBM.My.Resources
Imports System.IO
Public Class frmAddWizard
@@ -26,7 +27,44 @@ Public Class frmAddWizard
Private eCurrentStep As eSteps = eSteps.Step1
Private Sub FormInit()
Private Sub SetForm()
'Set Form Name
Me.Text = frmAddWizard_FormName
'Set Form Text
btnCancel.Text = frmAddWizard_btnCancel
btnNext.Text = frmAddWizard_btnNext
btnBack.Text = frmAddWizard_btnBack
lblStep1Title.Text = frmAddWizard_lblStep1Title
lblDrag1.Text = frmAddWizard_lblDrag1
lblStep1Instructions.Text = frmAddWizard_lblStep1Instructions
lblStep1Intro.Text = frmAddWizard_lblStep1Intro
lblStep2Title.Text = frmAddWizard_lblStep2Title
lblStep2Instructions.Text = frmAddWizard_lblStep2Instructions
lblDrag2.Text = frmAddWizard_lblDrag2
btnProcessBrowse.Text = frmAddWizard_btnProcessBrowse
lblStep2Intro.Text = frmAddWizard_lblStep2Intro
lblStep3Title.Text = frmAddWizard_lblStep3Title
lblStep3Instructions.Text = frmAddWizard_lblStep3Instructions
chkTimeStamp.Text = frmAddWizard_chkTimeStamp
chkFolderSave.Text = frmAddWizard_chkFolderSave
btnSaveBrowse.Text = frmAddWizard_btnSaveBrowse
lblStep3Intro.Text = frmAddWizard_lblStep3Intro
lblIncludePathTitle.Text = frmAddWizard_lblIncludePathTitle
lblIncludePath.Text = frmAddWizard_lblIncludePath
lblFileTypes.Text = frmAddWizard_ItemsSelectedNone
btnInclude.Text = frmAddWizard_btnInclude
lblStep3aTitle.Text = frmAddWizard_lblStep3aTitle
lblStep3aInstructions.Text = frmAddWizard_lblStep3aInstructions
lblExcludePathTitle.Text = frmAddWizard_lblExcludePathTitle
lblExcludePath.Text = frmAddWizard_lblExcludePath
lblExclude.Text = frmAddWizard_ItemsSelectedNone
btnExclude.Text = frmAddWizard_btnExclude
lblStep4Title.Text = frmAddWizard_lblStep4Title
lblStep4Instructions.Text = frmAddWizard_lblStep4Instructions
lblStep5Intro.Text = frmAddWizard_lblStep5Intro
lblStep5Title.Text = frmAddWizard_lblStep5Title
chkFolderSave.Checked = True
chkTimeStamp.Checked = False
StepHandler()
@@ -34,7 +72,7 @@ Public Class frmAddWizard
Private Function StringEmptyText(ByVal sString As String) As String
If sString = String.Empty Then
Return "None"
Return frmAddWizard_None
Else
Return sString
End If
@@ -69,7 +107,7 @@ Public Class frmAddWizard
lstSummary.Columns(0).Width = 95
lstSummary.Columns(1).Width = 210
sItems = {"Name", "Process", "Absolute Path", "Save Path", "Folder Backup", "Time Stamp", "Included Items", "Excluded Items"}
sItems = {frmAddWizard_Summary_Name, frmAddWizard_Summary_Process, frmAddWizard_Summary_AbsolutePath, frmAddWizard_Summary_SavePath, frmAddWizard_Summary_FolderSave, frmAddWizard_Summary_Timestamp, frmAddWizard_Summary_Include, frmAddWizard_Summary_Exclude}
sValues = {sName, sProcessSummaryText, mgrCommon.BooleanYesNo(bIsAbsolute), sSavePath, mgrCommon.BooleanYesNo(bFolderBackup), mgrCommon.BooleanYesNo(bTimeStamp), StringEmptyText(sFileType), StringEmptyText(sExcludeList)}
For i = 0 To sItems.Length - 1
@@ -112,11 +150,11 @@ Public Class frmAddWizard
Case eSteps.Step4
btnBack.Enabled = True
btnNext.Enabled = True
btnNext.Text = "&Next"
btnNext.Text = frmAddWizard_btnNext
tabWizard.SelectTab(4)
Case eSteps.Step5
btnBack.Enabled = True
btnNext.Text = "&Finish"
btnNext.Text = frmAddWizard_btnNext_Finish
tabWizard.SelectTab(5)
End Select
End Sub
@@ -126,7 +164,7 @@ Public Class frmAddWizard
txtName.Text = mgrPath.ValidateForFileSystem(txtName.Text)
Return True
Else
sErrorMessage = "You must enter a valid game name."
sErrorMessage = frmAddWizard_ErrorValidName
txtName.Focus()
Return False
End If
@@ -135,25 +173,25 @@ Public Class frmAddWizard
Private Function ValidateProcessPath(ByVal strPath As String, ByRef sErrorMessage As String) As Boolean
If strPath = String.Empty Then
sErrorMessage = "You must select the game's executable file (.exe) to continue."
sErrorMessage = frmAddWizard_ErrorValidProcess
txtProcessPath.Focus()
Return False
End If
If Path.GetExtension(strPath.ToLower) <> ".exe" Then
sErrorMessage = "The file you selected is not an executable file."
sErrorMessage = frmAddWizard_ErrorNotAProcess
txtProcessPath.Focus()
Return False
End If
If Not Path.IsPathRooted(strPath) Then
sErrorMessage = "The path to the executable must be a full path."
sErrorMessage = frmAddWizard_ErrorBadProcessPath
txtProcessPath.Focus()
Return False
End If
If Not File.Exists(strPath) Then
sErrorMessage = "The selected executable file does not exist."
sErrorMessage = frmAddWizard_ErrorProcessNotExist
txtProcessPath.Focus()
Return False
End If
@@ -163,19 +201,19 @@ Public Class frmAddWizard
Private Function ValidateSavePath(ByVal strPath As String, ByRef sErrorMessage As String) As Boolean
If strPath = String.Empty Then
sErrorMessage = "You must select the game's save file path to continue."
sErrorMessage = frmAddWizard_ErrorValidSavePath
txtSavePath.Focus()
Return False
End If
If Not Directory.Exists(strPath) Then
sErrorMessage = "The folder you selected does not exist or is not a valid folder."
sErrorMessage = frmAddWizard_ErrorSavePathNotExist
txtSavePath.Focus()
Return False
End If
If Not Path.IsPathRooted(strPath) Then
sErrorMessage = "The selected path must be a full path."
sErrorMessage = frmAddWizard_ErrorBadSavePath
txtSavePath.Focus()
Return False
End If
@@ -185,7 +223,7 @@ Public Class frmAddWizard
Private Function ValidateSaveType(ByVal strSaveType As String, ByRef sErrorMessage As String)
If strSaveType = String.Empty Then
sErrorMessage = "You must choose items to include in the backup, or choose to save the entire folder."
sErrorMessage = frmAddWizard_ErrorValidSaveType
txtFileTypes.Focus()
Return False
End If
@@ -202,11 +240,10 @@ 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(frmAddWizard_ErrorGameDupe, 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(frmAddWizard_ConfirmSaveTags, New String() {oGameToSave.Name, oGameToSave.Name}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
OpenTags(oGameToSave)
End If
Me.Close()
@@ -286,7 +323,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 +367,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(frmAddWizard_ErrorWithShortcut, 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(frmAddWizard_ErrorWithShortcut, e1.Message, MsgBoxStyle.Critical)
End If
End Try
Else
MsgBox("This file is not a shorcut.")
mgrCommon.ShowMessage(frmAddWizard_ErrorNotAShortcut, MsgBoxStyle.Information)
End If
End Sub
@@ -353,8 +390,8 @@ Public Class frmAddWizard
End If
End If
sNewPath = mgrCommon.OpenFileBrowser("Choose exe file that starts the game", "exe", _
"Executable", sDefaultFolder, False)
sNewPath = mgrCommon.OpenFileBrowser(frmAddWizard_ChooseProcess, "exe",
frmAddWizard_Executable, sDefaultFolder, False)
If sNewPath <> String.Empty Then txtProcessPath.Text = sNewPath
End Sub
@@ -370,7 +407,7 @@ Public Class frmAddWizard
End If
End If
sNewPath = mgrCommon.OpenFolderBrowser("Choose the game save folder:", sDefaultFolder, False)
sNewPath = mgrCommon.OpenFolderBrowser(frmAddWizard_ChooseSavePath, sDefaultFolder, False)
If sNewPath <> String.Empty Then txtSavePath.Text = sNewPath
End Sub
@@ -379,9 +416,9 @@ Public Class frmAddWizard
Dim iCount As Integer = sBuilderString.Split(":").Length
If sBuilderString <> String.Empty And iCount > 0 Then
lbl.Text = iCount & " item(s) selected"
lbl.Text = mgrCommon.FormatString(frmAddWizard_ItemsSelectedMulti, iCount)
Else
lbl.Text = "0 Item(s) selected"
lbl.Text = frmAddWizard_ItemsSelectedNone
End If
End Sub
@@ -419,7 +456,7 @@ Public Class frmAddWizard
End Sub
Private Sub frmAddWizard_Load(sender As Object, e As EventArgs) Handles MyBase.Load
FormInit()
SetForm()
End Sub
Private Sub DropTarget_DragEnter(sender As Object, e As DragEventArgs) Handles lblDrag1.DragEnter, lblDrag2.DragEnter, txtName.DragEnter, txtProcessPath.DragEnter
@@ -456,12 +493,12 @@ Public Class frmAddWizard
End Sub
Private Sub btnInclude_Click(sender As Object, e As EventArgs) Handles btnInclude.Click
OpenBuilder("Include", txtFileTypes)
OpenBuilder(frmAddWizard_Include, txtFileTypes)
UpdateBuilderLabel(txtFileTypes.Text, lblFileTypes)
End Sub
Private Sub btnExclude_Click(sender As Object, e As EventArgs) Handles btnExclude.Click
OpenBuilder("Exclude", txtExcludeList)
OpenBuilder(frmAddWizard_Exclude, txtExcludeList)
UpdateBuilderLabel(txtExcludeList.Text, lblExclude)
End Sub
End Class
+12 -3
View File
@@ -1,4 +1,6 @@
Public Class frmAdvancedImport
Imports GBM.My.Resources
Public Class frmAdvancedImport
Private hshImportData As Hashtable
Private bSelectAll As Boolean = False
@@ -36,8 +38,15 @@
End Sub
Private Sub SetForm()
'Set Form Name
Me.Text = frmAdvancedImport_FormName
'Set Form Text
btnCancel.Text = frmAdvancedImport_btnCancel
btnImport.Text = frmAdvancedImport_btnImport
chkSelectAll.Checked = True
lblGames.Text = ImportData.Count & " new configurations available."
lblGames.Text = mgrCommon.FormatString(frmAdvancedImport_NewConfigs, ImportData.Count)
End Sub
Private Sub BuildList()
@@ -52,7 +61,7 @@
End Sub
Private Sub UpdateSelected()
lblSelected.Text = lstGames.CheckedItems.Count & " Selected"
lblSelected.Text = mgrCommon.FormatString(frmAdvancedImport_Selected, lstGames.CheckedItems.Count)
End Sub
Private Sub frmAdvancedImport_Load(sender As Object, e As EventArgs) Handles MyBase.Load
+19 -1
View File
@@ -1,4 +1,6 @@
Public Class frmChooseGame
Imports GBM.My.Resources
Public Class frmChooseGame
Private oProcess As mgrProcesses
Private oGame As clsGame
@@ -49,9 +51,25 @@
Me.Close()
End Sub
Private Sub SetForm()
'Set Form Name
Me.Text = frmChooseGame_FormName
'Set Form Text
btnCancel.Text = frmChooseGame_btnCancel
btnChoose.Text = frmChooseGame_btnChoose
lblChoose.Text = frmChooseGame_lblChoose
End Sub
Private Sub frmChooseGame_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
SetForm()
FillComboBox()
Me.Focus()
Dim sResource As String = String.Empty
Dim sCode As String = String.Empty
mgrCommon.GetAllStrings(Me, sResource, sCode, "frmChooseGame")
Clipboard.SetText(sResource & vbCrLf & vbCrLf & sCode)
End Sub
Private Sub btnChoose_Click(sender As System.Object, e As System.EventArgs) Handles btnChoose.Click
+12 -4
View File
@@ -1,4 +1,5 @@
Imports System.IO
Imports GBM.My.Resources
Imports System.IO
Public Class frmFileFolderSearch
Private sSearchItem As String
@@ -135,9 +136,7 @@ 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 & _
" drive. Do you wish to search the " & oDrives(iCurrentDrive).RootDirectory.ToString & _
" drive?", MsgBoxStyle.YesNo, "Game Backup Monitor")
oResult = mgrCommon.ShowMessage(frmFileFolderSearch_SwitchDrives, New String() {oSearchDrive.Root.ToString, oDrives(iCurrentDrive).RootDirectory.ToString}, MsgBoxStyle.YesNo)
If oResult = MsgBoxResult.Yes Then
Search(oDrives(iCurrentDrive))
Else
@@ -150,7 +149,16 @@ Public Class frmFileFolderSearch
End If
End Sub
Private Sub SetForm()
'Set Form Name
Me.Text = frmFileFolderSearch_FormName
'Set Form Text
btnCancel.Text = frmFileFolderSearch_btnCancel
End Sub
Private Sub frmFileFolderSearch_Load(sender As Object, e As EventArgs) Handles MyBase.Load
SetForm()
GetDrives()
Search(oDrives(iCurrentDrive))
End Sub
+28 -1
View File
@@ -1,4 +1,6 @@
Public Class frmFilter
Imports GBM.My.Resources
Public Class frmFilter
Public Enum eFilterType As Integer
NoFilter = 1
@@ -115,6 +117,7 @@
Else
eCurrentFilterType = eFilterType.FieldOr
End If
'Set String Filter
If txtName.Text <> String.Empty Then
hshStringFilters.Add("Name", txtName.Text)
@@ -144,7 +147,31 @@
End Sub
Private Sub SetForm()
'Set Form Name
Me.Text = frmFilter_FormName
'Set Form Text
optOr.Text = frmFilter_optOr
optAnd.Text = frmFilter_optAnd
lblCompany.Text = frmFilter_lblCompany
lblProcess.Text = frmFilter_lblProcess
lblName.Text = frmFilter_lblName
grpGameInfoOptions.Text = frmFilter_grpGameInfoOptions
optAll.Text = frmFilter_optAll
optAny.Text = frmFilter_optAny
lblGameTags.Text = frmFilter_lblGameTags
lblTags.Text = frmFilter_lblTags
btnRemove.Text = frmFilter_btnRemove
btnAdd.Text = frmFilter_btnAdd
btnOK.Text = frmFilter_btnOK
grpTagOptions.Text = frmFilter_grpTagOptions
optTag.Text = frmFilter_optTag
optGameInfo.Text = frmFilter_optGameInfo
End Sub
Private Sub frmGameTags_Load(sender As Object, e As EventArgs) Handles MyBase.Load
SetForm()
optGameInfo.Checked = True
LoadData()
End Sub
+10 -10
View File
@@ -53,7 +53,7 @@ Partial Class frmGameManager
Me.txtCompany = New System.Windows.Forms.TextBox()
Me.lblCompany = New System.Windows.Forms.Label()
Me.pbIcon = New System.Windows.Forms.PictureBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.lblIcon = New System.Windows.Forms.Label()
Me.btnAppPathBrowse = New System.Windows.Forms.Button()
Me.lblGamePath = New System.Windows.Forms.Label()
Me.txtAppPath = New System.Windows.Forms.TextBox()
@@ -319,7 +319,7 @@ Partial Class frmGameManager
Me.grpExtra.Controls.Add(Me.txtCompany)
Me.grpExtra.Controls.Add(Me.lblCompany)
Me.grpExtra.Controls.Add(Me.pbIcon)
Me.grpExtra.Controls.Add(Me.Label1)
Me.grpExtra.Controls.Add(Me.lblIcon)
Me.grpExtra.Controls.Add(Me.btnAppPathBrowse)
Me.grpExtra.Controls.Add(Me.lblGamePath)
Me.grpExtra.Controls.Add(Me.txtAppPath)
@@ -401,14 +401,14 @@ Partial Class frmGameManager
Me.pbIcon.TabIndex = 15
Me.pbIcon.TabStop = False
'
'Label1
'lblIcon
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(6, 100)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(31, 13)
Me.Label1.TabIndex = 3
Me.Label1.Text = "Icon:"
Me.lblIcon.AutoSize = True
Me.lblIcon.Location = New System.Drawing.Point(6, 100)
Me.lblIcon.Name = "lblIcon"
Me.lblIcon.Size = New System.Drawing.Size(31, 13)
Me.lblIcon.TabIndex = 3
Me.lblIcon.Text = "Icon:"
'
'btnAppPathBrowse
'
@@ -815,7 +815,7 @@ Partial Class frmGameManager
Friend WithEvents btnAppPathBrowse As System.Windows.Forms.Button
Friend WithEvents lblGamePath As System.Windows.Forms.Label
Friend WithEvents txtAppPath As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents lblIcon As System.Windows.Forms.Label
Friend WithEvents pbIcon As System.Windows.Forms.PictureBox
Friend WithEvents lblVersion As System.Windows.Forms.Label
Friend WithEvents txtVersion As System.Windows.Forms.TextBox
+120 -70
View File
@@ -1,4 +1,5 @@
Imports System.IO
Imports GBM.My.Resources
Imports System.IO
Public Class frmGameManager
@@ -279,8 +280,8 @@ Public Class frmGameManager
End If
End If
sNewPath = mgrCommon.OpenFileBrowser("Choose exe file that starts the application", "exe", _
"Executable", sDefaultFolder, False)
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseExe, "exe", _
frmGameManager_Executable, sDefaultFolder, False)
If sNewPath <> String.Empty Then
txtAppPath.Text = Path.GetDirectoryName(sNewPath)
@@ -300,7 +301,7 @@ Public Class frmGameManager
End If
End If
sNewPath = mgrCommon.OpenFolderBrowser("Choose the location of application's exe file:", sDefaultFolder, False)
sNewPath = mgrCommon.OpenFolderBrowser(frmGameManager_ChooseExePath, sDefaultFolder, False)
If sNewPath <> String.Empty Then txtAppPath.Text = sNewPath
End Sub
@@ -316,7 +317,7 @@ Public Class frmGameManager
End If
End If
sNewPath = mgrCommon.OpenFolderBrowser("Choose the application save folder:", sDefaultFolder, False)
sNewPath = mgrCommon.OpenFolderBrowser(frmGameManager_ChooseSaveFolder, sDefaultFolder, False)
If sNewPath <> String.Empty Then
txtSavePath.Text = sNewPath
@@ -335,8 +336,8 @@ Public Class frmGameManager
End If
End If
sNewPath = mgrCommon.OpenFileBrowser("Choose a custom icon for the application", "ico", _
"Icon", sDefaultFolder, False)
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseCustomIcon, "ico", _
frmGameManager_Icon, sDefaultFolder, False)
If sNewPath <> String.Empty Then
txtIcon.Text = sNewPath
@@ -349,7 +350,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(App_ConfirmDirty, MsgBoxStyle.YesNoCancel)
Select Case oResult
Case MsgBoxResult.Yes
@@ -393,7 +394,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(frmGameManager_ErrorNoBackupExists, MsgBoxStyle.Exclamation)
End If
End Sub
@@ -402,9 +403,9 @@ Public Class frmGameManager
Dim iCount As Integer = sBuilderString.Split(":").Length
If sBuilderString <> String.Empty And iCount > 0 Then
btn.Text = sLabel & " Items... (" & iCount & ")"
btn.Text = sLabel & " " & mgrCommon.FormatString(frmGameManager_ItemsExist, iCount)
Else
btn.Text = sLabel & " Items..."
btn.Text = sLabel & " " & frmGameManager_Items
End If
If bDirty Then
@@ -454,7 +455,7 @@ Public Class frmGameManager
Else
sProcess = CurrentGame.TrueProcess
If mgrCommon.IsProcessNotSearchable(CurrentGame) Then bNoAuto = True
sRestorePath = mgrPath.ProcessPathSearch(CurrentBackupItem.Name, sProcess, CurrentBackupItem.Name & " uses a relative path and the game path has not been set.", bNoAuto)
sRestorePath = mgrPath.ProcessPathSearch(CurrentBackupItem.Name, sProcess, mgrCommon.FormatString(frmGameManager_ErrorPathNotSet, CurrentBackupItem.Name), bNoAuto)
If sRestorePath <> String.Empty Then
CurrentBackupItem.RelativeRestorePath = sRestorePath & "\" & CurrentBackupItem.RestorePath
@@ -482,7 +483,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(frmGameManager_ErrorNoRestorePathExists, MsgBoxStyle.Exclamation)
End If
End Sub
@@ -522,7 +523,7 @@ Public Class frmGameManager
If oRemoteBackupData.Contains(oApp.Name) Then
CurrentBackupItem = DirectCast(oRemoteBackupData(oApp.Name), clsBackup)
txtCurrentBackup.Text = CurrentBackupItem.DateUpdated & " by " & CurrentBackupItem.UpdatedBy
txtCurrentBackup.Text = mgrCommon.FormatString(frmGameManager_BackupTimeAndName, New String() {CurrentBackupItem.DateUpdated, CurrentBackupItem.UpdatedBy})
sFileName = BackupFolder & CurrentBackupItem.FileName
btnOpenBackupFile.Enabled = True
@@ -534,16 +535,16 @@ Public Class frmGameManager
oFileInfo = New FileInfo(sFileName)
dFileSize = oFileInfo.Length
If dFileSize > 1048576 Then
txtFileSize.Text = Math.Round(dFileSize / 1048576, 2) & " MB"
txtFileSize.Text = mgrCommon.FormatString(App_MB, Math.Round(dFileSize / 1048576, 2).ToString)
Else
txtFileSize.Text = Math.Round(dFileSize / 1024, 2) & " KB"
txtFileSize.Text = mgrCommon.FormatString(App_KB, Math.Round(dFileSize / 1024, 2).ToString)
End If
Else
txtFileSize.Text = "Backup file was not found!"
txtFileSize.Text = frmGameManager_ErrorNoBackupExists
End If
txtRestorePath.Text = CurrentBackupItem.RestorePath
Else
txtCurrentBackup.Text = "Never"
txtCurrentBackup.Text = frmGameManager_Never
txtFileSize.Text = String.Empty
txtRestorePath.Text = String.Empty
btnOpenBackupFile.Enabled = False
@@ -554,25 +555,25 @@ Public Class frmGameManager
If oLocalBackupData.Contains(oApp.Name) Then
oBackupInfo = DirectCast(oLocalBackupData(oApp.Name), clsBackup)
txtLocalBackup.Text = oBackupInfo.DateUpdated & " by " & oBackupInfo.UpdatedBy
txtLocalBackup.Text = mgrCommon.FormatString(frmGameManager_BackupTimeAndName, New String() {oBackupInfo.DateUpdated, oBackupInfo.UpdatedBy})
Else
txtLocalBackup.Text = "Never"
txtLocalBackup.Text = frmGameManager_Never
End If
If txtCurrentBackup.Text = "Never" And txtLocalBackup.Text = "Never" Then
If txtCurrentBackup.Text = frmGameManager_Never And txtLocalBackup.Text = frmGameManager_Never Then
lblSync.Visible = False
btnMarkAsRestored.Enabled = False
ElseIf txtCurrentBackup.Text = "Never" And txtLocalBackup.Text <> "Never" Then
ElseIf txtCurrentBackup.Text = frmGameManager_Never And txtLocalBackup.Text <> frmGameManager_Never Then
lblSync.Visible = False
btnMarkAsRestored.Enabled = False
ElseIf txtCurrentBackup.Text <> txtLocalBackup.Text Then
lblSync.ForeColor = Color.Red
lblSync.Text = "Out of Sync!"
lblSync.Text = frmGameManager_OutofSync
lblSync.Visible = True
btnMarkAsRestored.Enabled = True
Else
lblSync.ForeColor = Color.Green
lblSync.Text = "Up to Date!"
lblSync.Text = frmGameManager_UpToDate
lblSync.Visible = True
btnMarkAsRestored.Enabled = False
End If
@@ -583,8 +584,7 @@ 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(frmGameManager_ConfirmBackupDelete, CurrentBackupItem.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
mgrManifest.DoManifestDelete(CurrentBackupItem, mgrSQLite.Database.Local)
mgrManifest.DoManifestDelete(CurrentBackupItem, mgrSQLite.Database.Remote)
@@ -601,9 +601,7 @@ 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 " &
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
If mgrCommon.ShowMessage(frmGameManager_ConfirmBackupFolderDelete, New String() {sSubDir, oDir.GetDirectories.Length, oDir.GetFiles.Length}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If Directory.Exists(sSubDir) Then Directory.Delete(sSubDir, True)
End If
Else
@@ -644,8 +642,8 @@ Public Class frmGameManager
chkMonitorOnly.Checked = oApp.MonitorOnly
'Update Buttons
UpdateBuilderButtonLabel(oApp.FileType, "In&clude", btnInclude, False)
UpdateBuilderButtonLabel(oApp.ExcludeList, "E&xclude", btnExclude, False)
UpdateBuilderButtonLabel(oApp.FileType, frmGameManager_IncludeShortcut, btnInclude, False)
UpdateBuilderButtonLabel(oApp.ExcludeList, frmGameManager_ExcludeShortcut, btnExclude, False)
'Extra
txtAppPath.Text = oApp.ProcessPath
@@ -659,7 +657,7 @@ Public Class frmGameManager
If IO.File.Exists(oApp.Icon) Then
pbIcon.Image = Image.FromFile(oApp.Icon)
Else
pbIcon.Image = My.Resources.Unknown
pbIcon.Image = Icon_Unknown
End If
'Stats
@@ -747,7 +745,7 @@ Public Class frmGameManager
WipeControls(grpConfig.Controls)
WipeControls(grpExtra.Controls)
WipeControls(grpStats.Controls)
pbIcon.Image = My.Resources.Unknown
pbIcon.Image = Icon_Unknown
chkEnabled.Enabled = True
chkMonitorOnly.Enabled = True
btnSave.Enabled = True
@@ -765,8 +763,8 @@ Public Class frmGameManager
chkMonitorOnly.Checked = False
btnTags.Enabled = False
lblTags.Visible = False
btnInclude.Text = "In&clude Items..."
btnExclude.Text = "E&xclude Items..."
btnInclude.Text = frmGameManager_btnInclude
btnExclude.Text = frmGameManager_btnExclude
btnImport.Enabled = False
btnExport.Enabled = False
Case eModes.Edit
@@ -823,8 +821,8 @@ Public Class frmGameManager
btnBackup.Enabled = False
btnTags.Enabled = False
lblTags.Visible = False
btnInclude.Text = "In&clude Items..."
btnExclude.Text = "E&xclude Items..."
btnInclude.Text = frmGameManager_btnInclude
btnExclude.Text = frmGameManager_btnExclude
btnImport.Enabled = True
btnExport.Enabled = True
Case eModes.Disabled
@@ -833,7 +831,7 @@ Public Class frmGameManager
WipeControls(grpConfig.Controls)
WipeControls(grpExtra.Controls)
WipeControls(grpStats.Controls)
pbIcon.Image = My.Resources.Unknown
pbIcon.Image = Icon_Unknown
lblSync.Visible = False
btnSave.Enabled = False
btnCancel.Enabled = False
@@ -849,8 +847,8 @@ Public Class frmGameManager
btnMarkAsRestored.Enabled = False
btnTags.Enabled = False
lblTags.Visible = False
btnInclude.Text = "In&clude Items..."
btnExclude.Text = "E&xclude Items..."
btnInclude.Text = frmGameManager_btnInclude
btnExclude.Text = frmGameManager_btnExclude
btnImport.Enabled = True
btnExport.Enabled = True
Case eModes.MultiSelect
@@ -858,7 +856,7 @@ Public Class frmGameManager
WipeControls(grpConfig.Controls)
WipeControls(grpExtra.Controls)
WipeControls(grpStats.Controls)
pbIcon.Image = My.Resources.Unknown
pbIcon.Image = Icon_Unknown
lblSync.Visible = False
btnSave.Enabled = True
btnCancel.Enabled = False
@@ -976,13 +974,11 @@ Public Class frmGameManager
End If
Case eModes.MultiSelect
Dim sMonitorIDs As New List(Of String)
Dim sChanges As String
For Each oData In lstGames.SelectedItems
sMonitorIDs.Add(AppData(oData.Key))
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(frmGameManager_ConfirmMultiSave, New String() {sMonitorIDs.Count, mgrCommon.BooleanYesNo(oApp.Enabled), mgrCommon.BooleanYesNo(oApp.MonitorOnly)}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
bSuccess = True
mgrMonitorList.DoListUpdateMulti(sMonitorIDs, oApp)
eCurrentMode = eModes.Disabled
@@ -1008,7 +1004,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(frmGameManager_ConfirmGameDelete, oApp.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
mgrMonitorList.DoListDelete(oApp.ID)
LoadData()
eCurrentMode = eModes.Disabled
@@ -1022,7 +1018,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(frmGameManager_ConfirmMultiGameDelete, sMonitorIDs.Count, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
mgrMonitorList.DoListDeleteMulti(sMonitorIDs)
LoadData()
eCurrentMode = eModes.Disabled
@@ -1044,25 +1040,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(frmGameManager_ErrorValidName, 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(frmGameManager_ErrorValidProcess, 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(frmGameManager_ErrorNoItems, 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(frmGameManager_ErrorGameDupe, MsgBoxStyle.Exclamation)
txtName.Focus()
Return False
End If
@@ -1085,7 +1081,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(frmGameManager_ConfirmMark, oMarkList(0).Name, 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 +1090,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(frmGameManager_ConfirmMultiMark, oMarkList.Count, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
bWasUpdated = True
For Each oGameBackup In oMarkList
If mgrManifest.DoManifestCheck(oGameBackup.Name, mgrSQLite.Database.Local) Then
@@ -1105,7 +1101,7 @@ Public Class frmGameManager
Next
End If
Else
MsgBox("The selected game(s) have no backup data.", MsgBoxStyle.Information, "Game Backup Monitor")
mgrCommon.ShowMessage(frmGameManager_ErrorNoBackupData, MsgBoxStyle.Information)
End If
'Don't bother updating unless we actually did something
@@ -1139,12 +1135,12 @@ Public Class frmGameManager
Next
If BackupList.Count = 1 Then
sMsg = "Are you sure you want to run a backup for " & BackupList(0).Name & "? This will close the form."
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmBackup, BackupList(0).Name)
ElseIf BackupList.Count > 1 Then
sMsg = "Are you sure you want to run a backup for " & BackupList.Count & " games? This will close the form."
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmMultiBackup, BackupList.Count)
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
@@ -1171,20 +1167,20 @@ Public Class frmGameManager
If RestoreList.Count = 1 Then
bDoRestore = True
If Not mgrRestore.CheckManifest(RestoreList(0).Name) Then
sMsg = RestoreList(0).Name & " is already up to date." & vbCrLf & vbCrLf & "Would you like to restore this backup anyway?"
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmRestoreAnyway, RestoreList(0).Name)
Else
sMsg = "Are you sure you want to restore the backup for " & RestoreList(0).Name & "? This will close the form."
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmRestore, RestoreList(0).Name)
End If
ElseIf RestoreList.Count > 1 Then
bDoRestore = True
sMsg = "Are you sure you want to restore the backups for " & RestoreList.Count & " games? This will close the form."
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmMultiRestore, RestoreList.Count)
Else
MsgBox("The selected game(s) have no backup data.", MsgBoxStyle.Information, "Game Backup Monitor")
mgrCommon.ShowMessage(frmGameManager_ErrorNoBackupData, 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
@@ -1195,7 +1191,7 @@ Public Class frmGameManager
Private Sub ImportGameListFile()
Dim sLocation As String
sLocation = mgrCommon.OpenFileBrowser("Choose a valid xml file to import", "xml", "XML", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), False)
sLocation = mgrCommon.OpenFileBrowser(frmGameManager_ChooseImportXML, "xml", frmGameManager_XML, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), False)
If sLocation <> String.Empty Then
If mgrMonitorList.DoImport(sLocation) Then
@@ -1208,7 +1204,7 @@ Public Class frmGameManager
Private Sub ExportGameList()
Dim sLocation As String
sLocation = mgrCommon.SaveFileBrowser("Choose a location for the export file", "xml", "XML", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Game Backup Monitor Export " & Date.Now.ToString("dd-MMM-yyyy"))
sLocation = mgrCommon.SaveFileBrowser(frmGameManager_ChooseExportXML, "xml", frmGameManager_XML, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Game Backup Monitor Export " & Date.Now.ToString("dd-MMM-yyyy"))
If sLocation <> String.Empty Then
mgrMonitorList.ExportMonitorList(sLocation)
@@ -1218,15 +1214,69 @@ 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 mgrMonitorList.DoImport(mgrPath.OfficialImportURL) Then
If mgrCommon.ShowMessage(frmGameManager_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrMonitorList.DoImport(App_URLImport) Then
LoadData()
End If
End If
End Sub
Private Sub SetForm()
'Set Form Name
Me.Name = frmGameManager_FormName
'Set Form text
grpFilter.Text = frmGameManager_grpFilter
grpConfig.Text = frmGameManager_grpConfig
grpExtra.Text = frmGameManager_grpExtra
grpStats.Text = frmGameManager_grpStats
btnExport.Text = frmGameManager_btnExport
btnImport.Text = frmGameManager_btnImport
optCustom.Text = frmGameManager_optCustom
optBackupData.Text = frmGameManager_optBackupData
optPendingRestores.Text = frmGameManager_optPendingRestores
optAllGames.Text = frmGameManager_optAllGames
btnTags.Text = frmGameManager_btnTags
chkEnabled.Text = frmGameManager_chkEnabled
btnCancel.Text = frmGameManager_btnCancel
chkMonitorOnly.Text = frmGameManager_chkMonitorOnly
btnMarkAsRestored.Text = frmGameManager_btnMarkAsRestored
btnRestore.Text = frmGameManager_btnRestore
btnSave.Text = frmGameManager_btnSave
lblRestorePath.Text = frmGameManager_lblRestorePath
btnOpenRestorePath.Text = frmGameManager_btnOpenRestorePath
btnOpenBackupFile.Text = frmGameManager_btnOpenBackupFile
btnDeleteBackup.Text = frmGameManager_btnDeleteBackup
lblFileSize.Text = frmGameManager_lblFileSize
lblCurrentBackup.Text = frmGameManager_lblCurrentBackup
lblLastBackup.Text = frmGameManager_lblLastBackup
btnIconBrowse.Text = frmGameManager_btnIconBrowse
lblVersion.Text = frmGameManager_lblVersion
lblCompany.Text = frmGameManager_lblCompany
lblIcon.Text = frmGameManager_lblIcon
btnAppPathBrowse.Text = frmGameManager_btnAppPathBrowse
lblGamePath.Text = frmGameManager_lblGamePath
lblHours.Text = frmGameManager_lblHours
btnExclude.Text = frmGameManager_btnExclude
btnInclude.Text = frmGameManager_btnInclude
btnSavePathBrowse.Text = frmGameManager_btnSavePathBrowse
btnProcessBrowse.Text = frmGameManager_btnProcessBrowse
lblSavePath.Text = frmGameManager_lblSavePath
lblProcess.Text = frmGameManager_lblProcess
lblName.Text = frmGameManager_lblName
chkTimeStamp.Text = frmGameManager_chkTimeStamp
chkFolderSave.Text = frmGameManager_chkFolderSave
btnBackup.Text = frmGameManager_btnBackup
btnClose.Text = frmGameManager_btnClose
btnDelete.Text = frmGameManager_btnDelete
btnAdd.Text = frmGameManager_btnAdd
cmsOfficial.Text = frmGameManager_cmsOfficial
cmsFile.Text = frmGameManager_cmsFile
End Sub
Private Sub frmGameManager_Load(sender As Object, e As EventArgs) Handles MyBase.Load
SetForm()
If DisableExternalFunctions Then
btnBackup.Visible = False
@@ -1342,14 +1392,14 @@ Public Class frmGameManager
Private Sub btnInclude_Click(sender As Object, e As EventArgs) Handles btnInclude.Click
Dim sInclude As String = txtFileType.Text
OpenBuilder("Include", txtFileType)
UpdateBuilderButtonLabel(txtFileType.Text, "In&clude", btnInclude, (sInclude <> txtFileType.Text))
OpenBuilder(frmGameManager_Include, txtFileType)
UpdateBuilderButtonLabel(txtFileType.Text, frmGameManager_IncludeShortcut, btnInclude, (sInclude <> txtFileType.Text))
End Sub
Private Sub btnExclude_Click(sender As Object, e As EventArgs) Handles btnExclude.Click
Dim sExclude As String = txtExclude.Text
OpenBuilder("Exclude", txtExclude)
UpdateBuilderButtonLabel(txtExclude.Text, "E&xclude", btnExclude, (sExclude <> txtExclude.Text))
OpenBuilder(frmGameManager_Exclude, txtExclude)
UpdateBuilderButtonLabel(txtExclude.Text, frmGameManager_ExcludeShortcut, btnExclude, (sExclude <> txtExclude.Text))
End Sub
Private Sub chkFolderSave_CheckedChanged(sender As Object, e As EventArgs) Handles chkFolderSave.CheckedChanged
@@ -1357,7 +1407,7 @@ Public Class frmGameManager
btnInclude.Enabled = False
If txtFileType.Text <> String.Empty Then
txtFileType.Text = String.Empty
UpdateBuilderButtonLabel(txtFileType.Text, "In&clude", btnInclude, False)
UpdateBuilderButtonLabel(txtFileType.Text, frmGameManager_IncludeShortcut, btnInclude, False)
End If
Else
btnInclude.Enabled = True
+15 -3
View File
@@ -1,4 +1,6 @@
Public Class frmGameTags
Imports GBM.My.Resources
Public Class frmGameTags
Dim sMonitorIDs As List(Of String)
Dim sGameName As String = String.Empty
@@ -160,11 +162,21 @@
End Sub
Private Sub SetForm()
'Set Form Name
If IDList.Count > 1 Then
Me.Text = "Edit Tags for Multiple Games"
Me.Text = frmGameTags_FormNameMulti
Else
Me.Text = "Edit Tags for " & GameName
Me.Text = mgrCommon.FormatString(frmGameTags_FormNameSingle, GameName)
End If
'Set Form Text
btnOpenTags.Text = frmGameTags_btnOpenTags
btnClose.Text = frmGameTags_btnClose
lblGameTags.Text = frmGameTags_lblGameTags
lblTags.Text = frmGameTags_lblTags
btnRemove.Text = frmGameTags_btnRemove
btnAdd.Text = frmGameTags_btnAdd
End Sub
Private Sub frmGameTags_Load(sender As Object, e As EventArgs) Handles MyBase.Load
+36 -14
View File
@@ -1,8 +1,9 @@
Imports System.IO
Imports GBM.My.Resources
Imports System.IO
Public Class frmIncludeExclude
Dim sFormName As String = "Builder"
Dim sFormName As String = String.Empty
Dim sRootFolder As String = String.Empty
Dim sBuilderString As String
@@ -72,7 +73,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(frmIncludeExclude_ErrorFileSystemRead, ex.Message, MsgBoxStyle.Critical)
Finally
treFiles.EndUpdate()
Cursor.Current = Cursors.Default
@@ -107,7 +108,7 @@ Public Class frmIncludeExclude
End If
End If
sNewPath = mgrCommon.OpenFolderBrowser("Choose the location of the saved game folder:", sDefaultFolder, False)
sNewPath = mgrCommon.OpenFolderBrowser(frmIncludeExclude_BrowseSaveFolder, sDefaultFolder, False)
If sNewPath <> String.Empty Then txtRootFolder.Text = sNewPath
End Sub
@@ -222,30 +223,51 @@ Public Class frmIncludeExclude
Private Sub OpenRawEdit()
Dim sCurrentString As String = CreateNewBuilderString()
Dim sNewString As String
sNewString = InputBox("Items are semi-colon delimited.", FormName & " Raw Edit", sCurrentString)
sNewString = InputBox(frmIncludeExclude_RawEditInfo, mgrCommon.FormatString(frmIncludeExclude_RawEditTitle, FormName), sCurrentString)
If sNewString <> String.Empty Then
ParseBuilderString(sNewString)
End If
End Sub
Private Sub frmIncludeExclude_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.Text = FormName & " Builder"
Private Sub SetForm()
'Set Form Name
Me.Text = mgrCommon.FormatString(frmIncludeExclude_FormName, FormName)
'Set Form Text
lblSaveFolder.Text = frmIncludeExclude_lblSaveFolder
btnRawEdit.Text = frmIncludeExclude_btnRawEdit
lblItems.Text = mgrCommon.FormatString(frmIncludeExclude_lblItems, FormName)
grpFileOptions.Text = mgrCommon.FormatString(frmIncludeExclude_grpFileOptions, FormName)
optFileTypes.Text = frmIncludeExclude_optFileTypes
optIndividualFiles.Text = frmIncludeExclude_optIndividualFiles
btnRemove.Text = frmIncludeExclude_btnRemove
btnAdd.Text = frmIncludeExclude_btnAdd
btnBrowse.Text = frmIncludeExclude_btnBrowse
btnCancel.Text = frmIncludeExclude_btnCancel
btnSave.Text = frmIncludeExclude_btnSave
cmsAdd.Text = frmIncludeExclude_cmsAdd
cmsEdit.Text = frmIncludeExclude_cmsEdit
cmsRemove.Text = frmIncludeExclude_cmsRemove
'Set Defaults
txtRootFolder.Text = RootFolder
optFileTypes.Checked = True
lblItems.Text = FormName & " Items"
grpFileOptions.Text = FormName & " Options"
If BuilderString <> String.Empty Then ParseBuilderString(BuilderString)
If txtRootFolder.Text <> String.Empty Then BuildTrunk()
End Sub
Private Sub frmIncludeExclude_Load(sender As Object, e As EventArgs) Handles MyBase.Load
SetForm()
End Sub
Private Sub frmIncludeExclude_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
treFiles.Select()
If Not treFiles.SelectedNode Is Nothing Then treFiles.SelectedNode.Expand()
If txtRootFolder.Text = String.Empty Then
ttWarning.ToolTipTitle = "Saved Game Explorer"
ttWarning.SetToolTip(treFiles, "Set the saved game folder using the button above.")
ttWarning.SetToolTip(txtRootFolder, "The saved game folder could not be determined or does not exist.")
ttWarning.SetToolTip(btnBrowse, "Click here to set the saved game folder.")
ttWarning.ToolTipTitle = frmIncludeExclude_ToolTipTitle
ttWarning.SetToolTip(treFiles, frmIncludeExclude_ToolTipFiles)
ttWarning.SetToolTip(txtRootFolder, frmIncludeExclude_ToolTipFolder)
ttWarning.SetToolTip(btnBrowse, frmIncludeExclude_ToolTipBrowse)
End If
End Sub
@@ -305,7 +327,7 @@ Public Class frmIncludeExclude
End Sub
Private Sub cmsAdd_Click(sender As Object, e As EventArgs) Handles cmsAdd.Click
Dim oNewItem As New ListViewItem("Custom Item", 1)
Dim oNewItem As New ListViewItem(frmIncludeExclude_CustomItem, 1)
oNewItem.Selected = True
lstBuilder.Items.Add(oNewItem)
lstBuilder.SelectedItems(0).BeginEdit()
+3 -2
View File
@@ -99,7 +99,7 @@ Partial Class frmMain
'
Me.gMonTrayMenu.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonTrayNotification, Me.gMonTrayShow, Me.gMonTraySep2, Me.gMonTrayMon, Me.gMonTraySettings, Me.gMonTraySetup, Me.gMonTrayTools, Me.gMonTraySep1, Me.gMonTrayExit})
Me.gMonTrayMenu.Name = "gMonTrayMenu"
Me.gMonTrayMenu.Size = New System.Drawing.Size(162, 192)
Me.gMonTrayMenu.Size = New System.Drawing.Size(162, 170)
'
'gMonTrayNotification
'
@@ -200,6 +200,7 @@ Partial Class frmMain
'
Me.txtLog.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtLog.Location = New System.Drawing.Point(12, 184)
Me.txtLog.MaxLength = 16777216
Me.txtLog.Multiline = True
Me.txtLog.Name = "txtLog"
Me.txtLog.ReadOnly = True
@@ -223,7 +224,7 @@ Partial Class frmMain
'
Me.gMonStripAdminButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
Me.gMonStripAdminButton.DropDownButtonWidth = 0
Me.gMonStripAdminButton.Image = Global.GBM.My.Resources.Resources.User
Me.gMonStripAdminButton.Image = Global.GBM.My.Resources.Resources.Icon_User
Me.gMonStripAdminButton.ImageTransparentColor = System.Drawing.Color.Magenta
Me.gMonStripAdminButton.Name = "gMonStripAdminButton"
Me.gMonStripAdminButton.Size = New System.Drawing.Size(21, 20)
+162 -130
View File
@@ -1,4 +1,6 @@
'Name: frmMain
Imports GBM.My.Resources
'Name: frmMain
'Description: Game Backup Monitor Main Screen
'Author: Michael J. Seiferling
Public Class frmMain
@@ -17,12 +19,6 @@ Public Class frmMain
Restore = 3
End Enum
Private iProcessType As System.Reflection.ProcessorArchitecture = System.Reflection.AssemblyName.GetAssemblyName(Application.ExecutablePath()).ProcessorArchitecture
Private sVersion As String = "Version: " & My.Application.Info.Version.Major & "." & _
My.Application.Info.Version.Minor & " Beta (" & [Enum].GetName(GetType(System.Reflection.ProcessorArchitecture), iProcessType) & ")"
Private sRevision As String = "Build: " & My.Application.Info.Version.Build & "." & My.Application.Info.Version.Revision
Const sConstCopyright As String = "2015 Michael J. Seiferling"
Private eCurrentStatus As eStatus = eStatus.Stopped
Private eCurrentOperation As eOperation = eOperation.None
Private bCancelledByUser As Boolean = False
@@ -75,15 +71,15 @@ Public Class frmMain
'Build Info
sStatus1 = IO.Path.GetFileName(oRestoreInfo.FileName)
sStatus2 = "Updated by " & oRestoreInfo.UpdatedBy & " on " & oRestoreInfo.DateUpdated
sStatus2 = mgrCommon.FormatString(frmMain_UpdatedBy, New String() {oRestoreInfo.UpdatedBy, oRestoreInfo.DateUpdated})
If oRestoreInfo.AbsolutePath Then
sStatus3 = oRestoreInfo.RestorePath
Else
sStatus3 = oRestoreInfo.RelativeRestorePath
End If
WorkingGameInfo("Restore in progress...", sStatus1, sStatus2, sStatus3)
UpdateStatus("Restore in progress...")
WorkingGameInfo(frmMain_RestoreInProgress, sStatus1, sStatus2, sStatus3)
UpdateStatus(frmMain_RestoreInProgress)
End Sub
Private Sub SetBackupInfo(ByVal oGame As clsGame) Handles oBackup.UpdateBackupInfo
@@ -100,8 +96,8 @@ Public Class frmMain
End If
sStatus3 = String.Empty
WorkingGameInfo("Backup in Progress...", sStatus1, sStatus2, sStatus3)
UpdateStatus("Backup in progress...")
WorkingGameInfo(frmMain_BackupInProgress, sStatus1, sStatus2, sStatus3)
UpdateStatus(frmMain_BackupInProgress)
End Sub
Private Sub OperationStarted(Optional ByVal bPause As Boolean = True)
@@ -175,7 +171,7 @@ Public Class frmMain
If mgrRestore.CheckPath(oRestoreInfo, oGame, bTriggerReload) Then
oReadyList.Add(oRestoreInfo)
Else
UpdateLog(oRestoreInfo.Name & " restore was cancelled due to a restore path issue.", False, ToolTipIcon.Error, True)
UpdateLog(mgrCommon.FormatString(frmMain_ErrorRestorePath, oRestoreInfo.Name), False, ToolTipIcon.Error, True)
End If
Next
@@ -206,18 +202,18 @@ Public Class frmMain
bNoAuto = False
gMonStripStatusButton.Enabled = False
UpdateLog("A manaul backup of " & oGame.Name & " was triggered.", False)
UpdateLog(mgrCommon.FormatString(frmMain_ManualBackup, oGame.Name), False)
If oGame.AbsolutePath = False Then
If oGame.ProcessPath = String.Empty Then
If mgrCommon.IsProcessNotSearchable(oGame) Then bNoAuto = True
oGame.ProcessPath = mgrPath.ProcessPathSearch(oGame.Name, oGame.TrueProcess, oGame.Name & " uses a relative path and has never been detected on this computer.", bNoAuto)
oGame.ProcessPath = mgrPath.ProcessPathSearch(oGame.Name, oGame.TrueProcess, mgrCommon.FormatString(frmMain_ErrorRelativePath, oGame.Name), bNoAuto)
End If
If oGame.ProcessPath <> String.Empty Then
oReadyList.Add(oGame)
Else
UpdateLog(oGame.Name & " backup was cancelled due to unknown path.", True, ToolTipIcon.Error, True)
UpdateLog(mgrCommon.FormatString(frmMain_ErrorBackupUnknownPath, oGame.Name), True, ToolTipIcon.Error, True)
End If
Else
oReadyList.Add(oGame)
@@ -273,27 +269,27 @@ Public Class frmMain
If SupressBackup() Then
bDoBackup = False
UpdateLog(oProcess.GameInfo.Name & " backup was cancelled due to session length.", False)
SetLastAction(oProcess.GameInfo.CroppedName & " backup was cancelled due to session length")
UpdateLog(mgrCommon.FormatString(frmMain_ErrorBackupSessionLength, oProcess.GameInfo.Name), False)
SetLastAction(mgrCommon.FormatString(frmMain_ErrorBackupSessionLength, oProcess.GameInfo.CroppedName))
OperationEnded()
Else
If oProcess.GameInfo.MonitorOnly = False Then
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(frmMain_ConfirmBackup, oProcess.GameInfo.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
bDoBackup = True
Else
bDoBackup = False
UpdateLog(oProcess.GameInfo.Name & " backup was cancelled.", False)
SetLastAction(oProcess.GameInfo.CroppedName & " backup was cancelled")
UpdateLog(mgrCommon.FormatString(frmMain_ErrorBackupCancel, oProcess.GameInfo.Name), False)
SetLastAction(mgrCommon.FormatString(frmMain_ErrorBackupCancel, oProcess.GameInfo.CroppedName))
OperationEnded()
End If
End If
Else
bDoBackup = False
UpdateLog(oProcess.GameInfo.Name & " is set to monitor only.", False)
SetLastAction(oProcess.GameInfo.CroppedName & " monitoring ended")
UpdateLog(mgrCommon.FormatString(frmMain_MonitorEnded, oProcess.GameInfo.Name), False)
SetLastAction(mgrCommon.FormatString(frmMain_MonitorEnded, oProcess.GameInfo.CroppedName))
OperationEnded()
End If
End If
@@ -313,12 +309,12 @@ Public Class frmMain
If slRestoreData.Count > 0 Then
If slRestoreData.Count > 1 Then
sNotification = slRestoreData.Count & " New Saves Pending"
sNotification = mgrCommon.FormatString(frmMain_NewSaveNotificationMulti, slRestoreData.Count)
Else
sNotification = slRestoreData.Count & " New Save Pending"
sNotification = mgrCommon.FormatString(frmMain_NewSaveNotificationSingle, slRestoreData.Count)
End If
gMonNotification.Image = My.Resources.Inbox
gMonTrayNotification.Image = My.Resources.Inbox
gMonNotification.Image = Icon_Inbox
gMonTrayNotification.Image = Icon_Inbox
gMonNotification.Text = sNotification
gMonTrayNotification.Text = sNotification
gMonNotification.Visible = True
@@ -331,9 +327,9 @@ Public Class frmMain
Dim sIcon As String
Dim fbBrowser As New OpenFileDialog
fbBrowser.Title = "Choose icon for " & oProcess.GameInfo.Name
fbBrowser.Title = mgrCommon.FormatString(frmMain_ChooseIcon, oProcess.GameInfo.CroppedName)
fbBrowser.DefaultExt = "ico"
fbBrowser.Filter = "Icon files (*.ico)|*.ico"
fbBrowser.Filter = frmMain_IconFilter
Try
fbBrowser.InitialDirectory = IO.Path.GetDirectoryName(oProcess.FoundProcess.MainModule.FileName)
Catch ex As Exception
@@ -353,7 +349,7 @@ Public Class frmMain
Private Sub ResetGameInfo(Optional ByVal bKeepInfo As Boolean = False)
If bKeepInfo And Not oProcess.GameInfo Is Nothing Then
lblGameTitle.Text = "Last Game: " & oProcess.GameInfo.CroppedName
lblGameTitle.Text = mgrCommon.FormatString(frmMain_LastGame, oProcess.GameInfo.CroppedName)
pbIcon.Image = oPriorImage
lblStatus1.Text = sPriorPath
lblStatus2.Text = sPriorCompany
@@ -363,8 +359,8 @@ Public Class frmMain
lblTimeSpent.Visible = True
End If
Else
pbIcon.Image = My.Resources.Searching
lblGameTitle.Text = "No Game Detected"
pbIcon.Image = Icon_Searching
lblGameTitle.Text = frmMain_NoGameDetected
lblStatus1.Text = String.Empty
lblStatus2.Text = String.Empty
lblStatus3.Text = String.Empty
@@ -373,9 +369,9 @@ Public Class frmMain
End If
If eCurrentStatus = eStatus.Stopped Then
UpdateStatus("Not Scanning")
UpdateStatus(frmMain_NotScanning)
Else
UpdateStatus("No Game Detected")
UpdateStatus(frmMain_NoGameDetected)
End If
End Sub
@@ -388,7 +384,7 @@ Public Class frmMain
Else
pbTime.Visible = False
lblTimeSpent.Visible = False
pbIcon.Image = My.Resources.Working
pbIcon.Image = Icon_Working
lblGameTitle.Text = sTitle
lblStatus1.Text = sStatus1
lblStatus2.Text = sStatus2
@@ -410,11 +406,11 @@ Public Class frmMain
If bMulti Then
bAllowIcon = False
bAllowDetails = False
lblGameTitle.Text = "Multiple Games"
lblGameTitle.Text = frmMain_MultipleGames
pbTime.Visible = False
lblTimeSpent.Visible = False
pbIcon.Image = My.Resources.Unknown
lblStatus1.Text = "Game details are unavailable."
pbIcon.Image = Icon_Unknown
lblStatus1.Text = frmMain_NoDetails
Else
bAllowIcon = True
bAllowDetails = True
@@ -430,7 +426,7 @@ Public Class frmMain
sCompanyName = oProcess.FoundProcess.MainModule.FileVersionInfo.CompanyName
Catch ex As Exception
pbIcon.Image = My.Resources.Unknown
pbIcon.Image = Icon_Unknown
End Try
'Check for a custom icon & details
@@ -439,7 +435,7 @@ Public Class frmMain
End If
If sFileName = String.Empty Then
If oProcess.GameInfo.ProcessPath <> String.Empty Then
sFileName = oProcess.GameInfo.ProcessPath & " (Executable Path)"
sFileName = mgrCommon.FormatString(frmMain_ExePath, oProcess.GameInfo.ProcessPath)
End If
End If
If oProcess.GameInfo.Version <> String.Empty Then
@@ -459,19 +455,19 @@ Public Class frmMain
'Set Details
If sFileName = String.Empty Then
lblStatus1.Text = "N/A"
lblStatus1.Text = frmMain_NotAvailable
Else
lblStatus1.Text = sFileName
End If
If sCompanyName = String.Empty Then
lblStatus2.Text = "N/A"
lblStatus2.Text = frmMain_NotAvailable
Else
lblStatus2.Text = sCompanyName
End If
If sFileVersion = String.Empty Then
lblStatus3.Text = "N/A"
lblStatus3.Text = frmMain_NotAvailable
Else
lblStatus3.Text = sFileVersion
End If
@@ -490,15 +486,15 @@ Public Class frmMain
Dim sSessionTime As String
If dTotalTime < 1 Then
sTotalTime = Math.Round((dTotalTime * 100) * 0.6) & " minutes"
sTotalTime = mgrCommon.FormatString(frmMain_SessionMinutes, Math.Round((dTotalTime * 100) * 0.6).ToString)
Else
sTotalTime = Math.Round(dTotalTime, 1) & " hours"
sTotalTime = mgrCommon.FormatString(frmMain_SessionHours, Math.Round(dTotalTime, 1).ToString)
End If
If dSessionTime < 1 Then
sSessionTime = Math.Round((dSessionTime * 100) * 0.6) & " minutes"
sSessionTime = mgrCommon.FormatString(frmMain_SessionMinutes, Math.Round((dSessionTime * 100) * 0.6).ToString)
Else
sSessionTime = Math.Round(dSessionTime, 1) & " hours"
sSessionTime = mgrCommon.FormatString(frmMain_SessionHours, Math.Round(dSessionTime, 1).ToString)
End If
If dSessionTime > 0 Then
@@ -550,10 +546,13 @@ 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 &
"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")
Dim iProcessType As System.Reflection.ProcessorArchitecture = System.Reflection.AssemblyName.GetAssemblyName(Application.ExecutablePath()).ProcessorArchitecture
Dim sVersion As String = My.Application.Info.Version.Major & "." & My.Application.Info.Version.Minor
Dim sProcessType = [Enum].GetName(GetType(System.Reflection.ProcessorArchitecture), iProcessType)
Dim sRevision As String = My.Application.Info.Version.Build & "." & My.Application.Info.Version.Revision
Dim sConstCopyright As String = Chr(169) & App_Copyright
mgrCommon.ShowMessage(frmMain_About, New String() {sVersion, sProcessType, sRevision, sConstCopyright}, MsgBoxStyle.Information)
End Sub
Private Sub OpenTags()
@@ -629,15 +628,15 @@ Public Class frmMain
End Sub
Private Sub OpenWebSite()
Process.Start(mgrPath.OfficialWebURL)
Process.Start(App_URLWebsite)
End Sub
Private Sub OpenOnlineManual()
Process.Start(mgrPath.OfficialManualURL)
Process.Start(App_URLManual)
End Sub
Private Sub OpenCheckforUpdates()
Process.Start(mgrPath.OfficialUpdatesURL)
Process.Start(App_URLUpdates)
End Sub
Private Sub CheckForNewBackups()
@@ -651,7 +650,7 @@ Public Class frmMain
'Load Monitor List
hshScanList = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.ScanList)
UpdateLog("Game List (" & hshScanList.Keys.Count & ") Loaded.", False)
UpdateLog(mgrCommon.FormatString(frmMain_GameListLoaded, hshScanList.Keys.Count), False)
End Sub
Private Sub StartSyncWatcher()
@@ -676,7 +675,7 @@ Public Class frmMain
Private Sub HandleSyncWatcher() Handles oFileWatcher.Changed
If oSettings.Sync Then
UpdateLog("The master game list has been changed by a program other than GBM.", False, ToolTipIcon.Info, True)
UpdateLog(frmMain_MasterListChanged, False, ToolTipIcon.Info, True)
SyncGameSettings()
LoadGameSettings()
CheckForNewBackups()
@@ -702,7 +701,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(frmMain_Error7zip, MsgBoxStyle.Critical)
bShutdown = True
Me.Close()
End If
@@ -738,7 +737,7 @@ Public Class frmMain
'Verify the "Start with Windows" setting
If oSettings.StartWithWindows Then
If Not VerifyStartWithWindows() Then
UpdateLog("GBM is running from a new location, the Windows startup entry has been updated.", False, ToolTipIcon.Info)
UpdateLog(frmMain_ErrorAppLocationChanged, False, ToolTipIcon.Info)
End If
End If
@@ -750,14 +749,14 @@ Public Class frmMain
txtLog.Visible = True
Me.Size = New System.Drawing.Size(540, 425)
bLogToggle = True
btnLogToggle.Text = "Hide &Log"
btnLogToggle.Text = frmMain_btnToggleLog_Hide
txtLog.Select(txtLog.TextLength, 0)
txtLog.ScrollToCaret()
Else
txtLog.Visible = False
Me.Size = New System.Drawing.Size(540, 245)
bLogToggle = False
btnLogToggle.Text = "Show &Log"
btnLogToggle.Text = frmMain_btnToggleLog_Show
End If
End Sub
@@ -780,23 +779,21 @@ Public Class frmMain
Case eStatus.Running
HandleScan()
Case eStatus.Paused
Dim sGame As String = oProcess.GameInfo.Name
Dim sGame As String = oProcess.GameInfo.CroppedName
If bProcessIsAdmin Then
MsgBox(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")
mgrCommon.ShowMessage(frmMain_ErrorAdminDetect, sGame, MsgBoxStyle.Exclamation)
RestartAsAdmin()
Exit Sub
End If
If oProcess.Duplicate Then
sGame = "the unknown game"
sGame = frmMain_UnknownGame
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
UpdateLog("Monitoring of " & sGame & " was cancelled.", False)
SetLastAction("Monitoring of " & oProcess.GameInfo.CroppedName & " was cancelled")
If mgrCommon.ShowMessage(frmMain_ConfirmMonitorCancel, sGame, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
UpdateLog(mgrCommon.FormatString(frmMain_MonitorCancel, sGame), False)
SetLastAction(mgrCommon.FormatString(frmMain_MonitorCancel, sGame))
bwMonitor.CancelAsync()
StopScan()
@@ -816,7 +813,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(frmMain_Exit, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
bClose = True
End If
Else
@@ -895,14 +892,14 @@ Public Class frmMain
Private Sub ToggleMenuText()
Select Case eCurrentStatus
Case eStatus.Running
gMonFileMonitor.Text = "Stop &Monitoring"
gMonTrayMon.Text = "Stop &Monitoring"
gMonFileMonitor.Text = frmMain_gMonFileMonitor_Stop
gMonTrayMon.Text = frmMain_gMonFileMonitor_Stop
Case eStatus.Stopped
gMonFileMonitor.Text = "Start &Monitoring"
gMonTrayMon.Text = "Start &Monitoring"
gMonFileMonitor.Text = frmMain_gMonFileMonitor_Start
gMonTrayMon.Text = frmMain_gMonFileMonitor_Start
Case eStatus.Paused
gMonFileMonitor.Text = "Cancel &Monitoring"
gMonTrayMon.Text = "Cancel &Monitoring"
gMonFileMonitor.Text = frmMain_gMonFileMonitor_Cancel
gMonTrayMon.Text = frmMain_gMonFileMonitor_Cancel
End Select
End Sub
@@ -924,7 +921,7 @@ Public Class frmMain
Me.Invoke(d, New Object() {sLogUpdate, bTrayUpdate, objIcon, bTimeStamp})
Else
'Clear the log if we are approaching the limit
If txtLog.TextLength > 32000 Then
If txtLog.TextLength > 16770000 Then
txtLog.Text = String.Empty
End If
@@ -953,20 +950,62 @@ Public Class frmMain
End Sub
Private Sub SetForm()
'Set Form Name
Me.Name = App_NameLong
'Set Menu Text
gMonFile.Text = frmMain_gMonFile
gMonFileMonitor.Text = frmMain_gMonFileMonitor_Start
gMonFileSettings.Text = frmMain_gMonFileSettings
gMonFileExit.Text = frmMain_gMonFileExit
gMonSetup.Text = frmMain_gMonSetup
gMonSetupGameManager.Text = frmMain_gMonSetupGameManager
gMonSetupAddWizard.Text = frmMain_gMonSetupAddWizard
gMonSetupCustomVariables.Text = frmMain_gMonSetupCustomVariables
gMonSetupTags.Text = frmMain_gMonSetupTags
gMonTools.Text = frmMain_gMonTools
gMonToolsCleanMan.Text = frmMain_gMonToolsCleanMan
gMonToolsCompact.Text = frmMain_gMonToolsCompact
gMonHelp.Text = frmMain_gMonHelp
gMonHelpWebSite.Text = frmMain_gMonHelpWebSite
gMonHelpManual.Text = frmMain_gMonHelpManual
gMonHelpCheckforUpdates.Text = frmMain_gMonHelpCheckForUpdates
gMonHelpAbout.Text = frmMain_gMonHelpAbout
'Set Tray Menu Text
gMonTrayShow.Text = frmMain_gMonTrayShow
gMonTrayMon.Text = frmMain_gMonFileMonitor_Start
gMonTraySettings.Text = frmMain_gMonFileSettings
gMonTraySetup.Text = frmMain_gMonSetup
gMonTraySetupGameManager.Text = frmMain_gMonSetupGameManager
gMonTraySetupAddWizard.Text = frmMain_gMonSetupAddWizard
gMonTraySetupCustomVariables.Text = frmMain_gMonSetupCustomVariables
gMonTraySetupTags.Text = frmMain_gMonSetupTags
gMonTrayTools.Text = frmMain_gMonTools
gMonTrayToolsCleanMan.Text = frmMain_gMonToolsCleanMan
gMonTrayToolsCompact.Text = frmMain_gMonToolsCompact
gMonTrayExit.Text = frmMain_gMonFileExit
'Set Form Text
lblLastActionTitle.Text = frmMain_lblLastActionTitle
btnCancelOperation.Text = frmMain_btnCancelOperation
gMonStripStatusButton.Text = frmMain_gMonStripStatusButton
gMonStripStatusButton.ToolTipText = frmMain_gMonStripStatusButtonToolTip
If mgrCommon.IsElevated Then
gMonStripAdminButton.Image = My.Resources.Admin
gMonStripAdminButton.ToolTipText = "GBM is running with Administrator privileges."
gMonStripAdminButton.Image = Icon_Admin
gMonStripAdminButton.ToolTipText = frmMain_RunningAsAdmin
Else
gMonStripAdminButton.Image = My.Resources.User
gMonStripAdminButton.ToolTipText = "GBM is running with normal privileges. Click to restart as Administrator."
gMonStripAdminButton.Image = Icon_User
gMonStripAdminButton.ToolTipText = frmMain_RunningAsNormal
End If
btnCancelOperation.Visible = False
txtLog.Visible = False
lblLastActionTitle.Visible = False
lblLastAction.Text = String.Empty
pbTime.SizeMode = PictureBoxSizeMode.AutoSize
pbTime.Image = My.Resources.Clock
pbTime.Image = Icon_Clock
Me.Size = New System.Drawing.Size(540, 245)
AddHandler mgrMonitorList.UpdateLog, AddressOf UpdateLog
ResetGameInfo()
@@ -983,16 +1022,16 @@ Public Class frmMain
StopSyncWatcher()
tmScanTimer.Stop()
eCurrentStatus = eStatus.Stopped
UpdateStatus("Not Scanning")
gMonStripStatusButton.Image = My.Resources.Stopped
gMonTray.Icon = My.Resources.GBM_Tray_Stopped
UpdateStatus(frmMain_NotScanning)
gMonStripStatusButton.Image = Icon_Stopped
gMonTray.Icon = GBM_Tray_Stopped
Else
StartScan()
StartSyncWatcher()
eCurrentStatus = eStatus.Running
UpdateStatus("No Game Detected")
gMonStripStatusButton.Image = My.Resources.Ready
gMonTray.Icon = My.Resources.GBM_Tray_Ready
UpdateStatus(frmMain_NoGameDetected)
gMonStripStatusButton.Image = Icon_Ready
gMonTray.Icon = GBM_Tray_Ready
End If
ToggleMenuText()
End Sub
@@ -1002,9 +1041,9 @@ Public Class frmMain
StopSyncWatcher()
tmScanTimer.Stop()
eCurrentStatus = eStatus.Paused
UpdateStatus("Not Scanning")
gMonStripStatusButton.Image = My.Resources.Detected
gMonTray.Icon = My.Resources.GBM_Tray_Detected
UpdateStatus(frmMain_NotScanning)
gMonStripStatusButton.Image = Icon_Detected
gMonTray.Icon = GBM_Tray_Detected
End If
ToggleMenuText()
ToggleMenuEnable()
@@ -1015,9 +1054,9 @@ Public Class frmMain
StartScan()
StartSyncWatcher()
eCurrentStatus = eStatus.Running
gMonStripStatusButton.Image = My.Resources.Ready
gMonTray.Icon = My.Resources.GBM_Tray_Ready
UpdateStatus("No Game Detected")
gMonStripStatusButton.Image = Icon_Ready
gMonTray.Icon = GBM_Tray_Ready
UpdateStatus(frmMain_NoGameDetected)
End If
ToggleMenuText()
ToggleMenuEnable()
@@ -1027,9 +1066,9 @@ Public Class frmMain
StopSyncWatcher()
tmScanTimer.Stop()
eCurrentStatus = eStatus.Stopped
UpdateStatus("Not Scanning")
gMonStripStatusButton.Image = My.Resources.Stopped
gMonTray.Icon = My.Resources.GBM_Tray_Stopped
UpdateStatus(frmMain_NotScanning)
gMonStripStatusButton.Image = Icon_Stopped
gMonTray.Icon = GBM_Tray_Stopped
ToggleMenuText()
ToggleMenuEnable()
End Sub
@@ -1038,7 +1077,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(frmMain_ErrorCustomVariable, sGames, MsgBoxStyle.Exclamation)
End If
End Sub
@@ -1066,7 +1105,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(frmMain_ErrorSettingsFolder, ex.Message, MsgBoxStyle.Critical)
bShutdown = True
Me.Close()
End Try
@@ -1082,9 +1121,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(frmMain_ErrorDBVerLocal, New String() {iDBVer, mgrCommon.AppVersion}, 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(frmMain_ErrorDBVerRemote, New String() {iDBVer, mgrCommon.AppVersion}, MsgBoxStyle.Critical)
End Select
bShutdown = True
@@ -1133,9 +1172,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(frmMain_ErrorAlreadyAdmin, 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(frmMain_ConfirmRunAsAdmin, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
mgrCommon.RestartAsAdmin()
bShutdown = True
ShutdownApp(False)
@@ -1148,20 +1187,17 @@ 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 &
"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
If mgrCommon.ShowMessage(frmMain_ConfirmManifestClean, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
slItems = mgrRestore.SyncLocalManifest()
If slItems.Count > 0 Then
For Each oItem As clsBackup In slItems.Values
UpdateLog(oItem.Name & " entry was removed from local manfiest.", False)
UpdateLog(mgrCommon.FormatString(frmMain_ManifestRemovedEntry, oItem.Name), False)
Next
MsgBox(slItems.Count & " entries were removed from the local manifest.")
mgrCommon.ShowMessage(frmMain_ManifestTotalRemoved, slItems.Count, MsgBoxStyle.Information)
Else
MsgBox("The local manifest is clean.")
mgrCommon.ShowMessage(frmMain_ManifestAreadyClean, MsgBoxStyle.Information)
End If
End If
@@ -1175,20 +1211,18 @@ Public Class frmMain
PauseScan()
If MsgBox("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
If mgrCommon.ShowMessage(frmMain_ConfirmRebuild, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
oLocalDatabase = New mgrSQLite(mgrSQLite.Database.Local)
oRemoteDatabase = New mgrSQLite(mgrSQLite.Database.Remote)
UpdateLog("Local Database Vacuum Initialized: " & oLocalDatabase.GetDBSize & " KB", False)
UpdateLog(mgrCommon.FormatString(frmMain_LocalCompactInit, oLocalDatabase.GetDBSize), False)
oLocalDatabase.CompactDatabase()
UpdateLog("Local Database Vacuum Completed: " & oLocalDatabase.GetDBSize & " KB", False)
UpdateLog(mgrCommon.FormatString(frmMain_LocalCompactComplete, oLocalDatabase.GetDBSize), False)
UpdateLog("Remote Database Vacuum Initialized: " & oRemoteDatabase.GetDBSize & " KB", False)
UpdateLog(mgrCommon.FormatString(frmMain_RemoteCompactInit, oRemoteDatabase.GetDBSize), False)
oRemoteDatabase.CompactDatabase()
UpdateLog("Remote Database Vacuum Completed: " & oRemoteDatabase.GetDBSize & " KB", False)
UpdateLog(mgrCommon.FormatString(frmMain_RemoteCompactComplete, oRemoteDatabase.GetDBSize), False)
End If
ResumeScan()
@@ -1324,13 +1358,12 @@ Public Class frmMain
bContinue = False
If iErrorCode = 5 Then
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")
sErrorMessage = mgrCommon.FormatString(frmMain_ErrorMultiAdmin)
mgrCommon.ShowMessage(sErrorMessage, MsgBoxStyle.Exclamation)
bAskForRestart = True
Else
If Not CheckForSavedPath() Then
sErrorMessage = oProcess.GameInfo.Name & " is running as Administrator and GBM is not, GBM cannot detect the required information to save your backup."
sErrorMessage = mgrCommon.FormatString(frmMain_ErrorAdminBackup, oProcess.GameInfo.Name)
oProcess.GameInfo.ProcessPath = mgrPath.ProcessPathSearch(oProcess.GameInfo.Name, oProcess.GameInfo.ProcessName, sErrorMessage)
If oProcess.GameInfo.ProcessPath <> String.Empty Then
'Update and reload
@@ -1344,12 +1377,11 @@ Public Class frmMain
End If
ElseIf iErrorCode = 299 Then
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")
sErrorMessage = mgrCommon.FormatString(frmMain_ErrorMulti64)
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."
sErrorMessage = mgrCommon.FormatString(frmMain_Error64Backup, oProcess.GameInfo.Name)
oProcess.GameInfo.ProcessPath = mgrPath.ProcessPathSearch(oProcess.GameInfo.Name, oProcess.GameInfo.ProcessName, sErrorMessage)
If oProcess.GameInfo.ProcessPath <> String.Empty Then
'Update and reload
@@ -1367,12 +1399,12 @@ Public Class frmMain
If bContinue = True Then
CheckForSavedDuplicate()
If oProcess.Duplicate Then
UpdateLog("Multiple Games Detected", oSettings.ShowDetectionToolTips)
UpdateStatus("Multiple Games Detected")
UpdateLog(frmMain_MultipleGamesDetected, oSettings.ShowDetectionToolTips)
UpdateStatus(frmMain_MultipleGamesDetected)
SetGameInfo(True)
Else
UpdateLog(oProcess.GameInfo.Name & " Detected", oSettings.ShowDetectionToolTips)
UpdateStatus(oProcess.GameInfo.CroppedName & " Detected")
UpdateLog(mgrCommon.FormatString(frmMain_GameDetected, oProcess.GameInfo.Name), oSettings.ShowDetectionToolTips)
UpdateStatus(mgrCommon.FormatString(frmMain_GameDetected, oProcess.GameInfo.CroppedName))
SetGameInfo()
End If
oProcess.StartTime = Now
@@ -1406,11 +1438,11 @@ Public Class frmMain
If Not bCancelledByUser Then
If DoMultiGameCheck() Then
UpdateLog(oProcess.GameInfo.Name & " has ended.", False)
UpdateLog(mgrCommon.FormatString(frmMain_GameEnded, oProcess.GameInfo.Name), False)
If oSettings.TimeTracking Then HandleTimeSpent()
RunBackup()
Else
UpdateLog("The unidentified game has ended.", False)
UpdateLog(frmMain_UnknownGameEnded, False)
ResetGameInfo()
ResumeScan()
End If
-2
View File
@@ -34,7 +34,6 @@ Partial Class frmSettings
Me.btnBackupFolder = New System.Windows.Forms.Button()
Me.lblBackupFolder = New System.Windows.Forms.Label()
Me.txtBackupFolder = New System.Windows.Forms.TextBox()
Me.fbBrowser = New System.Windows.Forms.FolderBrowserDialog()
Me.btnSave = New System.Windows.Forms.Button()
Me.btnCancel = New System.Windows.Forms.Button()
Me.grpBackup = New System.Windows.Forms.GroupBox()
@@ -310,7 +309,6 @@ Partial Class frmSettings
Friend WithEvents grpGeneral As System.Windows.Forms.GroupBox
Friend WithEvents grpPaths As System.Windows.Forms.GroupBox
Friend WithEvents txtBackupFolder As System.Windows.Forms.TextBox
Friend WithEvents fbBrowser As System.Windows.Forms.FolderBrowserDialog
Friend WithEvents btnSave As System.Windows.Forms.Button
Friend WithEvents btnCancel As System.Windows.Forms.Button
Friend WithEvents lblBackupFolder As System.Windows.Forms.Label
-3
View File
@@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="fbBrowser.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>32</value>
</metadata>
+35 -7
View File
@@ -1,4 +1,6 @@
Public Class frmSettings
Imports GBM.My.Resources
Public Class frmSettings
Dim bShutdown As Boolean = False
Dim bBackupLocationChanged As Boolean = False
Dim bCheckSumDisabled As Boolean = False
@@ -75,7 +77,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(frmSettings_ErrorBackupFolder, MsgBoxStyle.Exclamation)
Return False
End If
@@ -108,7 +110,6 @@
chkTimeTracking.Checked = oSettings.TimeTracking
chkSupressBackup.Checked = oSettings.SupressBackup
nudSupressBackupThreshold.Value = oSettings.SupressBackupThreshold
nudSupressBackupThreshold.Enabled = chkSupressBackup.Checked
End Sub
@@ -130,15 +131,42 @@
End If
End Sub
Private Sub SetForm()
'Set Form Name
Me.Text = frmSettings_FormName
'Set Form Text
grpBackup.Text = frmSettings_grpBackup
lblMinutes.Text = frmSettings_lblMinutes
chkSupressBackup.Text = frmSettings_chkSupressBackup
chkCheckSum.Text = frmSettings_chkCheckSum
chkRestoreOnLaunch.Text = frmSettings_chkRestoreOnLaunch
chkOverwriteWarning.Text = frmSettings_chkOverwriteWarning
chkCreateFolder.Text = frmSettings_chkCreateFolder
chkBackupConfirm.Text = frmSettings_chkBackupConfirm
btnCancel.Text = frmSettings_btnCancel
btnSave.Text = frmSettings_btnSave
grpPaths.Text = frmSettings_grpPaths
btnBackupFolder.Text = frmSettings_btnBackupFolder
lblBackupFolder.Text = frmSettings_lblBackupFolder
grpGeneral.Text = frmSettings_grpGeneral
chkTimeTracking.Text = frmSettings_chkTimeTracking
chkStartWindows.Text = frmSettings_chkStartWindows
chkSync.Text = frmSettings_chkSync
chkShowDetectionTips.Text = frmSettings_chkShowDetectionTips
chkStartToTray.Text = frmSettings_chkStartToTray
chkMonitorOnStartup.Text = frmSettings_chkMonitorOnStartup
End Sub
Private Sub frmSettings_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
SetForm()
LoadSettings()
End Sub
Private Sub btnBackupFolder_Click(sender As System.Object, e As System.EventArgs) Handles btnBackupFolder.Click
fbBrowser.SelectedPath = oSettings.BackupFolder
If fbBrowser.ShowDialog() = Windows.Forms.DialogResult.OK Then
txtBackupFolder.Text = fbBrowser.SelectedPath
End If
Dim sNewFolder As String
sNewFolder = mgrCommon.OpenFolderBrowser(frmSettings_BrowseFolder, oSettings.BackupFolder, True)
If sNewFolder <> String.Empty Then txtBackupFolder.Text = sNewFolder
End Sub
Private Sub chkSupressBackup_CheckedChanged(sender As Object, e As EventArgs) Handles chkSupressBackup.CheckedChanged
+41 -14
View File
@@ -1,4 +1,5 @@
Imports System.IO
Imports GBM.My.Resources
Imports System.IO
Public Class frmStartUpWizard
@@ -26,8 +27,34 @@ Public Class frmStartUpWizard
Private eCurrentStep As eSteps = eSteps.Step1
Private Sub FormInit()
llbManual.Links.Add(0, 26, "http://mikemaximus.github.io/gbm-web/manual.html")
Private Sub SetForm()
'Set Form Name
Me.Text = frmStartUpWizard_FormName
'Set Form Text
btnNext.Text = frmStartUpWizard_btnNext
btnBack.Text = frmStartUpWizard_btnBack
lblStep1Instructions2.Text = frmStartUpWizard_lblStep1Instructions2
llbManual.Text = frmStartUpWizard_llbManual
lblStep1Title.Text = frmStartUpWizard_lblStep1Title
lblStep1Instructions.Text = frmStartUpWizard_lblStep1Instructions
chkSync.Text = frmStartUpWizard_chkSync
chkCreateFolder.Text = frmStartUpWizard_chkCreateFolder
lblStep2Title.Text = frmStartUpWizard_lblStep2Title
lblStep2Instructions.Text = frmStartUpWizard_lblStep2Instructions
btnFolderBrowse.Text = frmStartUpWizard_btnFolderBrowse
lblStep2Intro.Text = frmStartUpWizard_lblStep2Intro
btnOpenWizard.Text = frmStartUpWizard_btnOpenWizard
btnOpenMonitorList.Text = frmStartUpWizard_btnOpenMonitorList
btnDownloadList.Text = frmStartUpWizard_btnDownloadList
lblStep3Title.Text = frmStartUpWizard_lblStep3Title
lblStep3Intro.Text = frmStartUpWizard_lblStep3Intro
lblStep4Instructions3.Text = frmStartUpWizard_lblStep4Instructions3
lblStep4Instructions2.Text = frmStartUpWizard_lblStep4Instructions2
lblStep4Title.Text = frmStartUpWizard_lblStep4Title
lblStep4Instructions.Text = frmStartUpWizard_lblStep4Instructions
llbManual.Links.Add(0, 26, App_URLManual)
LoadGameSettings()
StepHandler()
End Sub
@@ -40,7 +67,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(frmStartUpWizard_ExistingData, MsgBoxStyle.Information)
End If
End Sub
@@ -60,19 +87,19 @@ Public Class frmStartUpWizard
Case eSteps.Step3
btnBack.Enabled = False
btnNext.Enabled = True
btnNext.Text = "&Next"
btnNext.Text = frmStartUpWizard_btnNext
tabWizard.SelectTab(2)
Case eSteps.Step4
btnBack.Enabled = True
btnNext.Enabled = True
btnNext.Text = "&Finish"
btnNext.Text = frmStartUpWizard_btnNext_Finish
tabWizard.SelectTab(3)
End Select
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 mgrMonitorList.DoImport(mgrPath.OfficialImportURL) Then
If mgrCommon.ShowMessage(frmStartUpWizard_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrMonitorList.DoImport(App_URLImport) Then
oGameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList)
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists()
End If
@@ -103,19 +130,19 @@ Public Class frmStartUpWizard
Private Function ValidateBackupPath(ByVal strPath As String, ByRef sErrorMessage As String) As Boolean
If strPath = String.Empty Then
sErrorMessage = "You must select a backup path to continue."
sErrorMessage = frmStartUpWizard_ErrorNoFolder
txtBackupPath.Focus()
Return False
End If
If Not Directory.Exists(strPath) Then
sErrorMessage = "The folder you selected does not exist or is not a valid folder."
sErrorMessage = frmStartUpWizard_ErrorNoFolderExists
txtBackupPath.Focus()
Return False
End If
If Not Path.IsPathRooted(strPath) Then
sErrorMessage = "The selected path must be a full path."
sErrorMessage = frmStartUpWizard_ErrorBadFolder
txtBackupPath.Focus()
Return False
End If
@@ -165,7 +192,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
@@ -180,7 +207,7 @@ Public Class frmStartUpWizard
End If
End If
sNewPath = mgrCommon.OpenFolderBrowser("Choose GBM backup folder:", sDefaultFolder, False)
sNewPath = mgrCommon.OpenFolderBrowser(frmStartUpWizard_BrowseFolder, sDefaultFolder, True)
If sNewPath <> String.Empty Then txtBackupPath.Text = sNewPath
End Sub
@@ -194,7 +221,7 @@ Public Class frmStartUpWizard
End Sub
Private Sub frmStartUpWizard_Load(sender As Object, e As EventArgs) Handles MyBase.Load
FormInit()
SetForm()
End Sub
Private Sub btnFolderBrowse_Click(sender As Object, e As EventArgs) Handles btnFolderBrowse.Click
+22 -5
View File
@@ -1,4 +1,6 @@
Public Class frmTags
Imports GBM.My.Resources
Public Class frmTags
Dim hshTagData As Hashtable
Private bIsDirty As Boolean = False
@@ -50,7 +52,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(App_ConfirmDirty, MsgBoxStyle.YesNoCancel)
Select Case oResult
Case MsgBoxResult.Yes
@@ -229,7 +231,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(frmTags_ConfirmDelete, oTag.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
mgrTags.DoTagDelete(oTag.ID)
LoadData()
eCurrentMode = eModes.Disabled
@@ -248,13 +250,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(frmTags_ErrorValidName, 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(frmTags_ErrorTagDupe, MsgBoxStyle.Exclamation)
txtName.Focus()
Return False
End If
@@ -262,7 +264,22 @@
Return True
End Function
Private Sub SetForm()
'Set Form Name
Me.Text = frmTags_FormName
'Set Form Text
grpTag.Text = frmTags_grpTag
lblName.Text = frmTags_lblName
btnClose.Text = frmTags_btnClose
btnDelete.Text = frmTags_btnDelete
btnAdd.Text = frmTags_btnAdd
btnCancel.Text = frmTags_btnCancel
btnSave.Text = frmTags_btnSave
End Sub
Private Sub frmTags_Load(sender As Object, e As EventArgs) Handles MyBase.Load
SetForm()
LoadData()
ModeChange()
AssignDirtyHandlers(grpTag.Controls)
+25 -7
View File
@@ -1,4 +1,5 @@
Imports System.IO
Imports GBM.My.Resources
Imports System.IO
Public Class frmVariableManager
Dim hshVariableData As Hashtable
@@ -53,7 +54,7 @@ Public Class frmVariableManager
End If
End If
sNewPath = mgrCommon.OpenFolderBrowser("Choose the path the variable represents:", sDefaultFolder, False)
sNewPath = mgrCommon.OpenFolderBrowser(frmVariableManager_PathBrowse, sDefaultFolder, False)
If sNewPath <> String.Empty Then txtPath.Text = sNewPath
End Sub
@@ -67,7 +68,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(App_ConfirmDirty, MsgBoxStyle.YesNoCancel)
Select Case oResult
Case MsgBoxResult.Yes
@@ -251,7 +252,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(frmVariableManager_ConfirmDelete, oCustomVariable.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
mgrVariables.DoVariableDelete(oCustomVariable.ID)
mgrVariables.DoPathUpdate(oCurrentVariable.FormattedName, oCurrentVariable.Path)
LoadData()
@@ -271,19 +272,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(frmVariableManager_ErrorValidName, 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(frmVariableManager_ErrorValidPath, 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(frmVariableManager_ErrorVariableDupe, MsgBoxStyle.Exclamation)
txtName.Focus()
Return False
End If
@@ -291,7 +292,24 @@ Public Class frmVariableManager
Return True
End Function
Private Sub SetForm()
'Set Form Name
Me.Text = frmVariableManager_FormName
'Set Form Text
btnCancel.Text = frmVariableManager_btnCancel
btnSave.Text = frmVariableManager_btnSave
grpVariable.Text = frmVariableManager_grpVariable
btnPathBrowse.Text = frmVariableManager_btnPathBrowse
lblPath.Text = frmVariableManager_lblPath
lblName.Text = frmVariableManager_lblName
btnClose.Text = frmVariableManager_btnClose
btnDelete.Text = frmVariableManager_btnDelete
btnAdd.Text = frmVariableManager_btnAdd
End Sub
Private Sub frmVariableManager_Load(sender As Object, e As EventArgs) Handles MyBase.Load
SetForm()
LoadData()
ModeChange()
AssignDirtyHandlers(grpVariable.Controls)
+18 -17
View File
@@ -1,4 +1,5 @@
Imports System.IO
Imports GBM.My.Resources
Imports System.IO
Public Class mgrBackup
@@ -80,7 +81,7 @@ Public Class mgrBackup
oStream.Flush()
End Using
Catch ex As Exception
RaiseEvent UpdateLog("An error occured creating a file list: " & ex.Message, False, ToolTipIcon.Error, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorFileList, ex.Message), False, ToolTipIcon.Error, True)
End Try
End Sub
@@ -109,8 +110,8 @@ 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
RaiseEvent UpdateLog("Backup aborted by user due to manifest conflict.", False, ToolTipIcon.Error, True)
If mgrCommon.ShowMessage(mgrBackup_ConfirmManifestConflict, oGame.Name, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
RaiseEvent UpdateLog(mgrBackup_ErrorManifestConflict, False, ToolTipIcon.Error, True)
bDoBackup = False
End If
End If
@@ -122,7 +123,7 @@ Public Class mgrBackup
Directory.CreateDirectory(sBackupFile)
End If
Catch ex As Exception
RaiseEvent UpdateLog("Backup Aborted. A failure occured while creating backup sub-folder for " & oGame.Name & vbCrLf & ex.Message, False, ToolTipIcon.Error, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorSubFolderCreate, New String() {oGame.Name, ex.Message}), False, ToolTipIcon.Error, True)
bDoBackup = False
End Try
End If
@@ -134,8 +135,8 @@ 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
RaiseEvent UpdateLog(oGame.Name & " backup aborted by user due to overwrite.", False, ToolTipIcon.Error, True)
If mgrCommon.ShowMessage(mgrBackup_ConfirmOverwrite, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorOverwriteAbort, oGame.Name), False, ToolTipIcon.Error, True)
bDoBackup = False
End If
End If
@@ -173,11 +174,11 @@ Public Class mgrBackup
prs7z.StartInfo.RedirectStandardOutput = True
prs7z.StartInfo.CreateNoWindow = True
prs7z.Start()
RaiseEvent UpdateLog("Backup of " & sSavePath & " in progress...", False, ToolTipIcon.Info, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupInProgress, sSavePath), False, ToolTipIcon.Info, True)
While Not prs7z.StandardOutput.EndOfStream
If CancelOperation Then
prs7z.Kill()
RaiseEvent UpdateLog("Backup Aborted. The backup file for " & oGame.Name & " will be unusable.", True, ToolTipIcon.Error, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorFullAbort, oGame.Name), True, ToolTipIcon.Error, True)
Exit While
End If
RaiseEvent UpdateLog(prs7z.StandardOutput.ReadLine, False, ToolTipIcon.Info, False)
@@ -185,28 +186,28 @@ Public Class mgrBackup
prs7z.WaitForExit()
If Not CancelOperation Then
If prs7z.ExitCode = 0 Then
RaiseEvent UpdateLog(oGame.Name & " backup completed.", False, ToolTipIcon.Info, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupComplete, oGame.Name), False, ToolTipIcon.Info, True)
bBackupCompleted = True
Else
RaiseEvent UpdateLog(oGame.Name & " backup finished with warnings or errors.", True, ToolTipIcon.Warning, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupWarnings, oGame.Name), True, ToolTipIcon.Warning, True)
bBackupCompleted = False
End If
End If
prs7z.Dispose()
Else
RaiseEvent UpdateLog("Backup Aborted. The saved game path for " & oGame.Name & " does not exist.", True, ToolTipIcon.Error, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorNoSavePath, oGame.Name), True, ToolTipIcon.Error, True)
bBackupCompleted = False
End If
'Write Main Manifest
If bBackupCompleted Then
If oSettings.CheckSum Then
RaiseEvent UpdateLog("Generating SHA-256 hash for " & oGame.Name & " backup file.", False, ToolTipIcon.Info, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_GenerateHash, oGame.Name), False, ToolTipIcon.Info, True)
sHash = mgrHash.Generate_SHA256_Hash(sBackupFile)
End If
If Not DoManifestUpdate(oGame, sBackupFile, dTimeStamp, sHash) Then
RaiseEvent UpdateLog("The manifest update for " & oGame.Name & " failed.", True, ToolTipIcon.Error, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorManifestFailure, oGame.Name), True, ToolTipIcon.Error, True)
End If
'Write the process path if we have it
@@ -215,14 +216,14 @@ Public Class mgrBackup
End If
End If
Catch ex As Exception
RaiseEvent UpdateLog("An unexpected error occured during the backup of " & oGame.Name & vbCrLf & ex.Message, False, ToolTipIcon.Error, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorOtherFailure, New String() {oGame.Name, ex.Message}), False, ToolTipIcon.Error, True)
End Try
End If
If bBackupCompleted Then
RaiseEvent SetLastAction(oGame.CroppedName & " backup completed")
RaiseEvent SetLastAction(mgrCommon.FormatString(mgrBackup_ActionComplete, oGame.CroppedName))
Else
RaiseEvent SetLastAction(oGame.CroppedName & " backup failed")
RaiseEvent SetLastAction(mgrCommon.FormatString(mgrBackup_ActionFailed, oGame.CroppedName))
End If
Next
End Sub
+85 -5
View File
@@ -1,4 +1,5 @@
Imports System.Net
Imports GBM.My.Resources
Imports System.Net
Public Class mgrCommon
@@ -34,9 +35,9 @@ Public Class mgrCommon
Public Shared Function BooleanYesNo(ByVal bBool As Boolean) As String
If bBool Then
Return "Yes"
Return mgrCommon_Yes
Else
Return "No"
Return mgrCommon_No
End If
End Function
@@ -44,7 +45,7 @@ Public Class mgrCommon
Dim fbBrowser As New SaveFileDialog
fbBrowser.Title = sTitle
fbBrowser.DefaultExt = sExtension
fbBrowser.Filter = sFileType & " files (*." & sExtension & ")|*." & sExtension
fbBrowser.Filter = FormatString(mgrCommon_FilesFilter, New String() {sFileType, sExtension, sExtension})
fbBrowser.InitialDirectory = sDefaultFolder
fbBrowser.FileName = sDefaultFile
@@ -59,7 +60,7 @@ Public Class mgrCommon
Dim fbBrowser As New OpenFileDialog
fbBrowser.Title = sTitle
fbBrowser.DefaultExt = sExtension
fbBrowser.Filter = sFileType & " files (*." & sExtension & ")|*." & sExtension
fbBrowser.Filter = FormatString(mgrCommon_FilesFilter, New String() {sFileType, sExtension, sExtension})
fbBrowser.InitialDirectory = sDefaultFolder
fbBrowser.Multiselect = bMulti
@@ -125,4 +126,83 @@ Public Class mgrCommon
oProcess.Start()
End Sub
'Handles no extra parameters
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal oType As MsgBoxStyle) As MsgBoxResult
Dim oResult As MsgBoxResult
oResult = MsgBox(FormatString(sMsg), oType, My.Resources.App_NameLong)
Return oResult
End Function
'Handles single parameter stings
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal sParam As String, ByVal oType As MsgBoxStyle) As MsgBoxResult
Dim oResult As MsgBoxResult
oResult = MsgBox(FormatString(sMsg, sParam), oType, My.Resources.App_NameLong)
Return oResult
End Function
'Handles multi-parameter strings
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal sParams As String(), ByVal oType As MsgBoxStyle) As MsgBoxResult
Dim oResult As MsgBoxResult
oResult = MsgBox(FormatString(sMsg, sParams), oType, My.Resources.App_NameLong)
Return oResult
End Function
'Handles no extra parameters
Public Shared Function FormatString(ByVal sString As String) As String
sString = sString.Replace("[BR]", vbCrLf)
Return sString
End Function
'Handles single parameter stings
Public Shared Function FormatString(ByVal sString As String, ByVal sParam As String) As String
sString = sString.Replace("[BR]", vbCrLf)
sString = sString.Replace("[PARAM]", sParam)
Return sString
End Function
'Handles multi-parameter strings
Public Shared Function FormatString(ByVal sString As String, ByVal sParams As String()) As String
Dim iParam As Integer
sString = sString.Replace("[BR]", vbCrLf)
For Each s As String In sParams
iParam = sString.IndexOf("[PARAM]")
sString = sString.Remove(iParam, 7)
sString = sString.Insert(iParam, s)
Next
Return sString
End Function
'Maintenance Only - Function for string management
Public Shared Sub GetAllStrings(ByVal ctlParent As Control, ByRef sResource As String, ByRef sCode As String, ByVal sFormName As String)
For Each ctl As Control In ctlParent.Controls
If TypeOf ctl Is GroupBox Then
sResource &= sFormName & "_" & ctl.Name & vbTab & ctl.Text & vbCrLf
sCode &= ctl.Name & ".Text = " & sFormName & "_" & ctl.Name & vbCrLf
GetAllStrings(ctl, sResource, sCode, sFormName)
ElseIf TypeOf ctl Is TabControl Then
For Each tb As TabPage In ctl.Controls
GetAllStrings(tb, sResource, sCode, sFormName)
Next
ElseIf TypeOf ctl Is Label Then
sResource &= sFormName & "_" & ctl.Name & vbTab & ctl.Text & vbCrLf
sCode &= ctl.Name & ".Text = " & sFormName & "_" & ctl.Name & vbCrLf
ElseIf TypeOf ctl Is Button Then
sResource &= sFormName & "_" & ctl.Name & vbTab & ctl.Text & vbCrLf
sCode &= ctl.Name & ".Text = " & sFormName & "_" & ctl.Name & vbCrLf
ElseIf TypeOf ctl Is RadioButton Then
sResource &= sFormName & "_" & ctl.Name & vbTab & ctl.Text & vbCrLf
sCode &= ctl.Name & ".Text = " & sFormName & "_" & ctl.Name & vbCrLf
ElseIf TypeOf ctl Is CheckBox Then
sResource &= sFormName & "_" & ctl.Name & vbTab & ctl.Text & vbCrLf
sCode &= ctl.Name & ".Text = " & sFormName & "_" & ctl.Name & vbCrLf
End If
Next
End Sub
End Class
-1
View File
@@ -1,5 +1,4 @@
Imports System.IO
Imports System.Security
Imports System.Security.Cryptography
Public Class mgrHash
+1 -3
View File
@@ -1,6 +1,4 @@
Imports System.IO
Public Class mgrManifest
Public Class mgrManifest
Public Shared Function ReadManifest(ByVal iSelectDB As mgrSQLite.Database) As SortedList
Dim oDatabase As New mgrSQLite(iSelectDB)
+12 -13
View File
@@ -1,4 +1,5 @@
Imports System.IO
Imports GBM.My.Resources
Imports System.IO
Public Class mgrMonitorList
@@ -23,9 +24,7 @@ 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 & _
"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
If mgrCommon.ShowMessage(mgrMonitorList_ConfirmExistingData, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
mgrMonitorList.SyncMonitorLists()
Else
mgrMonitorList.SyncMonitorLists(False)
@@ -45,7 +44,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(mgrMonitorList_ConfirmApplyFilter, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
Dim frm As New frmFilter
frm.ShowDialog()
oTagFilters = frm.TagFilters
@@ -58,7 +57,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(mgrMonitorList_ExportComplete, oList.Count, MsgBoxStyle.Information)
End If
End Sub
@@ -130,9 +129,9 @@ Public Class mgrMonitorList
Cursor.Current = Cursors.WaitCursor
If bToRemote Then
RaiseEvent UpdateLog("A sync to the master game list has been triggered.", False, ToolTipIcon.Info, True)
RaiseEvent UpdateLog(mgrMonitorList_SyncToMaster, False, ToolTipIcon.Info, True)
Else
RaiseEvent UpdateLog("A sync from the master game list has been triggered.", False, ToolTipIcon.Info, True)
RaiseEvent UpdateLog(mgrMonitorList_SyncFromMaster, False, ToolTipIcon.Info, True)
End If
'Add / Update Sync
@@ -192,7 +191,7 @@ Public Class mgrMonitorList
DoListDeleteSync(hshDeleteItems, mgrSQLite.Database.Local)
End If
RaiseEvent UpdateLog(hshDeleteItems.Count + hshSyncItems.Count + iChanges & " change(s) synced.", False, ToolTipIcon.Info, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrMonitorList_SyncChanges, (hshDeleteItems.Count + hshSyncItems.Count + iChanges).ToString), False, ToolTipIcon.Info, True)
Cursor.Current = Cursors.Default
Application.DoEvents()
End Sub
@@ -233,10 +232,10 @@ Public Class mgrMonitorList
mgrTags.DoTagAddImport(frm.ImportData)
Cursor.Current = Cursors.Default
MsgBox("Import Complete.", MsgBoxStyle.Information, "Game Backup Monitor")
mgrCommon.ShowMessage(mgrMonitorList_ImportComplete, MsgBoxStyle.Information)
End If
Else
MsgBox("This list does not contain any new games to import.", MsgBoxStyle.Information, "Game Backup Monitor")
mgrCommon.ShowMessage(mgrMonitorList_ImportNothing, MsgBoxStyle.Information)
End If
Application.DoEvents()
@@ -249,7 +248,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(mgrMonitorList_WebNoReponse, sPath, MsgBoxStyle.Exclamation)
Return False
End If
Else
@@ -257,7 +256,7 @@ Public Class mgrMonitorList
ImportMonitorList(sPath)
Return True
Else
MsgBox("The file:" & vbCrLf & sPath & vbCrLf & "cannot be found.")
mgrCommon.ShowMessage(mgrMonitorList_FileNotFound, sPath, MsgBoxStyle.Exclamation)
Return False
End If
End If
+14 -45
View File
@@ -1,4 +1,5 @@
Imports System.IO
Imports GBM.My.Resources
Imports System.IO
Imports System.Text.RegularExpressions
Imports System.Reflection
@@ -8,10 +9,6 @@ Public Class mgrPath
Private Shared sDBLocation As String = sSettingsRoot & "\gbm.s3db"
Private Shared sIncludeFile As String = sSettingsRoot & "\gbm_include.txt"
Private Shared sExcludeFile As String = sSettingsRoot & "\gbm_exclude.txt"
Private Shared sOfficialWebURL As String = "http://mikemaximus.github.io/gbm-web/"
Private Shared sOfficialImportURL As String = "http://mikemaximus.github.io/gbm-web/GBM_Official.xml"
Private Shared sOfficialManualURL As String = "http://mikemaximus.github.io/gbm-web/manual.html"
Private Shared sOfficialUpdatesURL As String = "https://github.com/MikeMaximus/gbm/releases"
Private Shared sRemoteDatabaseLocation As String
Private Shared hshCustomVariables As Hashtable
Private Shared oReleaseType As ProcessorArchitecture = AssemblyName.GetAssemblyName(Application.ExecutablePath()).ProcessorArchitecture
@@ -76,30 +73,6 @@ Public Class mgrPath
End Get
End Property
Shared ReadOnly Property OfficialWebURL As String
Get
Return sOfficialWebURL
End Get
End Property
Shared ReadOnly Property OfficialManualURL As String
Get
Return sOfficialManualURL
End Get
End Property
Shared ReadOnly Property OfficialUpdatesURL As String
Get
Return sOfficialUpdatesURL
End Get
End Property
Shared ReadOnly Property OfficialImportURL As String
Get
Return sOfficialImportURL
End Get
End Property
Shared ReadOnly Property SettingsRoot As String
Get
Return sSettingsRoot
@@ -325,11 +298,11 @@ Public Class mgrPath
hshCustomVariables = mgrVariables.ReadVariables
End Sub
Public Shared Function SetManualgamePath() As String
Public Shared Function SetManualGamePath() As String
Dim sDefaultFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
Dim sNewPath As String
sNewPath = mgrCommon.OpenFolderBrowser("Choose the game folder containing the executable.", sDefaultFolder, False)
sNewPath = mgrCommon.OpenFolderBrowser(mgrPath_ChoosePath, sDefaultFolder, False)
Return sNewPath
End Function
@@ -345,25 +318,24 @@ Public Class mgrPath
'We can't automatically search for certain game types
If bNoAuto Then
sMessage = sSearchReason & vbCrLf & vbCrLf & "Do you wish to manually set the game path? (Path will be saved)"
sMessage = mgrCommon.FormatString(mgrPath_ConfirmManualPath, sSearchReason)
If MsgBox(sMessage, MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
sFolder = SetManualgamePath()
End If
Return sFolder
End If
sMessage = sSearchReason & vbCrLf & vbCrLf & "Do you wish to automatically search for the game path? (Path will be saved)"
sMessage = mgrCommon.FormatString(mgrPath_ConfirmAutoPath, sSearchReason)
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
sMessage = mgrCommon.FormatString(mgrPath_ConfirmPathCorrect, New String() {sGameName, sFolder})
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
Return sFolder
Else
sFolder = String.Empty
@@ -373,13 +345,12 @@ Public Class mgrPath
End If
If bSearchFailed Then
sMessage = "The search failed to locate the path for " & sGameName & "." & vbCrLf & vbCrLf & _
"Do you wish to manually set the game path? (Path will be saved)"
sMessage = mgrCommon.FormatString(mgrPath_ConfirmAutoFailure, sGameName)
Else
sMessage = "Do you wish to manually set the game path? (Path will be saved)"
sMessage = mgPath_ConfirmManualPathNoParam
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 +362,7 @@ Public Class mgrPath
Dim dBrowser As FolderBrowserDialog
If Not Directory.Exists(sBackupPath) Then
If MsgBox("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
If mgrCommon.ShowMessage(mgrPath_ConfirmBackupLocation, sBackupPath, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
dBrowser = New FolderBrowserDialog
dBrowser.SelectedPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
If dBrowser.ShowDialog = DialogResult.OK Then
+20 -22
View File
@@ -1,4 +1,5 @@
Imports System.IO
Imports GBM.My.Resources
Imports System.IO
Public Class mgrRestore
@@ -31,8 +32,7 @@ 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(mgrRestore_ConfirmPathMismatch, oCheckBackup.CroppedName, MsgBoxStyle.YesNoCancel)
If oResult = MsgBoxResult.Yes Then
If Path.IsPathRooted(oCheckGame.Path) Then
oCheckBackup.AbsolutePath = True
@@ -64,7 +64,7 @@ Public Class mgrRestore
Else
sProcess = oGame.TrueProcess
If mgrCommon.IsProcessNotSearchable(oGame) Then bNoAuto = True
sRestorePath = mgrPath.ProcessPathSearch(oRestoreInfo.Name, sProcess, oRestoreInfo.Name & " uses a relative path and has never been detected on this computer.", bNoAuto)
sRestorePath = mgrPath.ProcessPathSearch(oRestoreInfo.Name, sProcess, mgrCommon.FormatString(mgrRestore_RelativeNeedPath, oRestoreInfo.Name), bNoAuto)
If sRestorePath <> String.Empty Then
'Update the process path in game object, save it, and make sure a monitor list reload is triggered
@@ -198,16 +198,15 @@ 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(mgrRestore_ConfirmCreatePath, sExtractPath, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
Try
Directory.CreateDirectory(sExtractPath)
Catch ex As Exception
RaiseEvent UpdateLog("The restore path could not be created due to an unexpected error." & vbCrLf & ex.Message, False, ToolTipIcon.Error, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorCreatePath, ex.Message), False, ToolTipIcon.Error, True)
bDoRestore = False
End Try
Else
RaiseEvent UpdateLog("Restored Aborted. The path " & sExtractPath & " does not exist.", False, ToolTipIcon.Error, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorNoPath, sExtractPath), False, ToolTipIcon.Error, True)
bDoRestore = False
End If
End If
@@ -217,17 +216,16 @@ Public Class mgrRestore
If oBackupInfo.CheckSum <> String.Empty Then
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
RaiseEvent UpdateLog("Restored Aborted by user due to a failed file integrity check.", False, ToolTipIcon.Info, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorFailedCheck, oBackupInfo.Name), False, ToolTipIcon.Info, True)
If mgrCommon.ShowMessage(mgrRestore_ConfirmFailedCheck, oBackupInfo.Name, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
RaiseEvent UpdateLog(mgrRestore_ErrorCheckAbort, False, ToolTipIcon.Info, True)
bDoRestore = False
End If
Else
RaiseEvent UpdateLog(oBackupInfo.Name & " backup has been verified.", False, ToolTipIcon.Info, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_Verified, oBackupInfo.Name), False, ToolTipIcon.Info, True)
End If
Else
RaiseEvent UpdateLog(oBackupInfo.Name & " has no stored checksum, verification has been skipped.", False, ToolTipIcon.Info, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_NoVerify, oBackupInfo.Name), False, ToolTipIcon.Info, True)
End If
End If
@@ -240,11 +238,11 @@ Public Class mgrRestore
prs7z.StartInfo.RedirectStandardOutput = True
prs7z.StartInfo.CreateNoWindow = True
prs7z.Start()
RaiseEvent UpdateLog("Restore to " & sExtractPath & " in progress...", False, ToolTipIcon.Info, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreInProgress, sExtractPath), False, ToolTipIcon.Info, True)
While Not prs7z.StandardOutput.EndOfStream
If CancelOperation Then
prs7z.Kill()
RaiseEvent UpdateLog("Restored Aborted. The saved games for " & oBackupInfo.Name & " may now be invalid.", True, ToolTipIcon.Error, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorFullAbort, oBackupInfo.Name), True, ToolTipIcon.Error, True)
Exit While
End If
RaiseEvent UpdateLog(prs7z.StandardOutput.ReadLine, False, ToolTipIcon.Info, False)
@@ -252,16 +250,16 @@ Public Class mgrRestore
prs7z.WaitForExit()
If Not CancelOperation Then
If prs7z.ExitCode = 0 Then
RaiseEvent UpdateLog(oBackupInfo.Name & " backup restored.", False, ToolTipIcon.Info, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreComplete, oBackupInfo.Name), False, ToolTipIcon.Info, True)
bRestoreCompleted = True
Else
RaiseEvent UpdateLog(oBackupInfo.Name & " restore finished with warnings or errors.", True, ToolTipIcon.Warning, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreWarnings, oBackupInfo.Name), True, ToolTipIcon.Warning, True)
bRestoreCompleted = False
End If
End If
prs7z.Dispose()
Else
RaiseEvent UpdateLog("Restore Aborted. The backup file could not be found.", True, ToolTipIcon.Error, True)
RaiseEvent UpdateLog(mgrRestore_ErrorNoBackup, True, ToolTipIcon.Error, True)
End If
If bRestoreCompleted Then
@@ -273,13 +271,13 @@ Public Class mgrRestore
End If
End If
Catch ex As Exception
RaiseEvent UpdateLog("An unexpected error occured during the restore process." & vbCrLf & ex.Message, False, ToolTipIcon.Error, True)
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorOtherFailure, ex.Message), False, ToolTipIcon.Error, True)
End Try
If bRestoreCompleted Then
RaiseEvent SetLastAction(oBackupInfo.CroppedName & " backup restored")
RaiseEvent SetLastAction(mgrCommon.FormatString(mgrRestore_ActionComplete, oBackupInfo.CroppedName))
Else
RaiseEvent SetLastAction(oBackupInfo.CroppedName & " restore failed")
RaiseEvent SetLastAction(mgrCommon.FormatString(mgrRestore_ActionFailed, oBackupInfo.CroppedName))
End If
End If
Next
+23 -22
View File
@@ -1,4 +1,5 @@
Imports System.IO
Imports GBM.My.Resources
Imports System.IO
Imports System.Data.SQLite
Public Class mgrSQLite
@@ -39,7 +40,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(mgrSQLite_ErrorBackupFailure, New String() {sNewFile, ex.Message}, MsgBoxStyle.Exclamation)
End Try
End Sub
@@ -75,9 +76,9 @@ Public Class mgrSQLite
"SupressBackup BOOLEAN NOT NULL, SupressBackupThreshold INTEGER NOT NULL);"
'Add Tables (Monitor List)
sSql &= "CREATE TABLE monitorlist (MonitorID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, " & _
"AbsolutePath BOOLEAN NOT NULL, FolderSave BOOLEAN NOT NULL, FileType TEXT, TimeStamp BOOLEAN NOT NULL, ExcludeList TEXT NOT NULL, " & _
"ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN NOT NULL, MonitorOnly BOOLEAN NOT NULL, " & _
sSql &= "CREATE TABLE monitorlist (MonitorID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, " &
"AbsolutePath BOOLEAN NOT NULL, FolderSave BOOLEAN NOT NULL, FileType TEXT, TimeStamp BOOLEAN NOT NULL, ExcludeList TEXT NOT NULL, " &
"ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN NOT NULL, MonitorOnly BOOLEAN NOT NULL, " &
"PRIMARY KEY(Name, Process));"
'Add Tables (Tags)
@@ -90,7 +91,7 @@ Public Class mgrSQLite
sSql &= "CREATE TABLE variables (VariableID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY, Path TEXT NOT NULL);"
'Add Tables (Local Manifest)
sSql &= "CREATE TABLE manifest (ManifestID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY, FileName TEXT NOT NULL, RestorePath TEXT NOT NULL, " & _
sSql &= "CREATE TABLE manifest (ManifestID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY, FileName TEXT NOT NULL, RestorePath TEXT NOT NULL, " &
"AbsolutePath BOOLEAN NOT NULL, DateUpdated TEXT NOT NULL, UpdatedBy TEXT NOT NULL, CheckSum TEXT);"
'Set Version
@@ -98,8 +99,8 @@ 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)
Catch ex As Exception
mgrCommon.ShowMessage(mgrSQLite_ErrorCreatingLocalDB, ex.Message, MsgBoxStyle.Critical)
Return False
End Try
End Function
@@ -112,13 +113,13 @@ Public Class mgrSQLite
SQLiteConnection.CreateFile(sDatabaseLocation)
'Add Tables (Remote Monitor List)
sSql = "CREATE TABLE monitorlist (MonitorID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, " & _
"AbsolutePath BOOLEAN NOT NULL, FolderSave BOOLEAN NOT NULL, FileType TEXT, TimeStamp BOOLEAN NOT NULL, ExcludeList TEXT NOT NULL, " & _
"ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN NOT NULL, MonitorOnly BOOLEAN NOT NULL, " & _
sSql = "CREATE TABLE monitorlist (MonitorID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, " &
"AbsolutePath BOOLEAN NOT NULL, FolderSave BOOLEAN NOT NULL, FileType TEXT, TimeStamp BOOLEAN NOT NULL, ExcludeList TEXT NOT NULL, " &
"ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN NOT NULL, MonitorOnly BOOLEAN NOT NULL, " &
"PRIMARY KEY(Name, Process));"
'Add Tables (Remote Manifest)
sSql &= "CREATE TABLE manifest (ManifestID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY, FileName TEXT NOT NULL, RestorePath TEXT NOT NULL, " & _
sSql &= "CREATE TABLE manifest (ManifestID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY, FileName TEXT NOT NULL, RestorePath TEXT NOT NULL, " &
"AbsolutePath BOOLEAN NOT NULL, DateUpdated TEXT NOT NULL, UpdatedBy TEXT NOT NULL, CheckSum TEXT);"
'Add Tables (Remote Tags)
@@ -132,8 +133,8 @@ 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)
Catch ex As Exception
mgrCommon.ShowMessage(mgrSQLite_ErrorCreatingRemoteDB, ex.Message, MsgBoxStyle.Critical)
Return False
End Try
End Function
@@ -183,9 +184,9 @@ Public Class mgrSQLite
Try
command.ExecuteNonQuery()
trans.Commit()
Catch e As Exception
Catch ex As Exception
trans.Rollback()
MsgBox("An error has occured attempting run the query." & vbCrLf & vbCrLf & sSQL & vbCrLf & vbCrLf & e.Message)
mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation)
Return False
Finally
command.Dispose()
@@ -209,9 +210,9 @@ Public Class mgrSQLite
command.ExecuteNonQuery()
Next
trans.Commit()
Catch e As Exception
Catch ex As Exception
trans.Rollback()
MsgBox("An error has occured attempting run the query." & vbCrLf & vbCrLf & sSQL & vbCrLf & vbCrLf & e.Message)
mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation)
Return False
Finally
command.Dispose()
@@ -233,8 +234,8 @@ Public Class mgrSQLite
Try
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)
Catch ex As Exception
mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation)
Finally
command.Dispose()
Disconnect()
@@ -523,8 +524,8 @@ 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)
Catch ex As Exception
mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation)
Finally
command.Dispose()
Disconnect()
+4 -3
View File
@@ -1,4 +1,5 @@
Imports System.Xml.Serialization
Imports GBM.My.Resources
Imports System.Xml.Serialization
Imports System.IO
Imports System.Net
@@ -60,7 +61,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(mgrXML_ErrorImportFailure, ex.Message, MsgBoxStyle.Exclamation)
End Try
Return oList
@@ -78,7 +79,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(mgrXML_ErrorExportFailure, ex.Message, MsgBoxStyle.Exclamation)
Return False
End Try
End Function
+4
View File
@@ -1,3 +1,5 @@
Imports System.Resources
Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
@@ -33,3 +35,5 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyVersion("0.95.*")>
<Assembly: AssemblyFileVersion("0.95.0.0")>
<Assembly: NeutralResourcesLanguageAttribute("en")>
+4004 -26
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff