Reduced resource code usage
This commit is contained in:
+106
-103
@@ -1,4 +1,5 @@
|
|||||||
Imports System.IO
|
Imports GBM.My.Resources
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
Public Class frmGameManager
|
Public Class frmGameManager
|
||||||
|
|
||||||
@@ -279,8 +280,8 @@ Public Class frmGameManager
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFileBrowser(My.Resources.frmGameManager_ChooseExe, "exe", _
|
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseExe, "exe", _
|
||||||
My.Resources.frmGameManager_Executable, sDefaultFolder, False)
|
frmGameManager_Executable, sDefaultFolder, False)
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then
|
If sNewPath <> String.Empty Then
|
||||||
txtAppPath.Text = Path.GetDirectoryName(sNewPath)
|
txtAppPath.Text = Path.GetDirectoryName(sNewPath)
|
||||||
@@ -300,7 +301,7 @@ Public Class frmGameManager
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFolderBrowser(My.Resources.frmGameManager_ChooseExePath, sDefaultFolder, False)
|
sNewPath = mgrCommon.OpenFolderBrowser(frmGameManager_ChooseExePath, sDefaultFolder, False)
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then txtAppPath.Text = sNewPath
|
If sNewPath <> String.Empty Then txtAppPath.Text = sNewPath
|
||||||
End Sub
|
End Sub
|
||||||
@@ -316,7 +317,7 @@ Public Class frmGameManager
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFolderBrowser(My.Resources.frmGameManager_ChooseSaveFolder, sDefaultFolder, False)
|
sNewPath = mgrCommon.OpenFolderBrowser(frmGameManager_ChooseSaveFolder, sDefaultFolder, False)
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then
|
If sNewPath <> String.Empty Then
|
||||||
txtSavePath.Text = sNewPath
|
txtSavePath.Text = sNewPath
|
||||||
@@ -335,8 +336,8 @@ Public Class frmGameManager
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFileBrowser(My.Resources.frmGameManager_ChooseCustomIcon, "ico", _
|
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseCustomIcon, "ico", _
|
||||||
My.Resources.frmGameManager_Icon, sDefaultFolder, False)
|
frmGameManager_Icon, sDefaultFolder, False)
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then
|
If sNewPath <> String.Empty Then
|
||||||
txtIcon.Text = sNewPath
|
txtIcon.Text = sNewPath
|
||||||
@@ -349,7 +350,7 @@ Public Class frmGameManager
|
|||||||
Private Function HandleDirty() As MsgBoxResult
|
Private Function HandleDirty() As MsgBoxResult
|
||||||
Dim oResult As MsgBoxResult
|
Dim oResult As MsgBoxResult
|
||||||
|
|
||||||
oResult = mgrCommon.ShowMessage(My.Resources.App_ConfirmDirty, MsgBoxStyle.YesNoCancel)
|
oResult = mgrCommon.ShowMessage(App_ConfirmDirty, MsgBoxStyle.YesNoCancel)
|
||||||
|
|
||||||
Select Case oResult
|
Select Case oResult
|
||||||
Case MsgBoxResult.Yes
|
Case MsgBoxResult.Yes
|
||||||
@@ -393,7 +394,7 @@ Public Class frmGameManager
|
|||||||
If File.Exists(sFileName) Then
|
If File.Exists(sFileName) Then
|
||||||
Process.Start("explorer.exe", "/select," & sFileName)
|
Process.Start("explorer.exe", "/select," & sFileName)
|
||||||
Else
|
Else
|
||||||
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorNoBackupExists, MsgBoxStyle.Exclamation)
|
mgrCommon.ShowMessage(frmGameManager_ErrorNoBackupExists, MsgBoxStyle.Exclamation)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -402,9 +403,9 @@ Public Class frmGameManager
|
|||||||
Dim iCount As Integer = sBuilderString.Split(":").Length
|
Dim iCount As Integer = sBuilderString.Split(":").Length
|
||||||
|
|
||||||
If sBuilderString <> String.Empty And iCount > 0 Then
|
If sBuilderString <> String.Empty And iCount > 0 Then
|
||||||
btn.Text = sLabel & " " & mgrCommon.FormatString(My.Resources.frmGameManager_ItemsExist, iCount)
|
btn.Text = sLabel & " " & mgrCommon.FormatString(frmGameManager_ItemsExist, iCount)
|
||||||
Else
|
Else
|
||||||
btn.Text = sLabel & " " & My.Resources.frmGameManager_Items
|
btn.Text = sLabel & " " & frmGameManager_Items
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If bDirty Then
|
If bDirty Then
|
||||||
@@ -454,7 +455,7 @@ Public Class frmGameManager
|
|||||||
Else
|
Else
|
||||||
sProcess = CurrentGame.TrueProcess
|
sProcess = CurrentGame.TrueProcess
|
||||||
If mgrCommon.IsProcessNotSearchable(CurrentGame) Then bNoAuto = True
|
If mgrCommon.IsProcessNotSearchable(CurrentGame) Then bNoAuto = True
|
||||||
sRestorePath = mgrPath.ProcessPathSearch(CurrentBackupItem.Name, sProcess, mgrCommon.FormatString(My.Resources.frmGameManager_ErrorPathNotSet, CurrentBackupItem.Name), bNoAuto)
|
sRestorePath = mgrPath.ProcessPathSearch(CurrentBackupItem.Name, sProcess, mgrCommon.FormatString(frmGameManager_ErrorPathNotSet, CurrentBackupItem.Name), bNoAuto)
|
||||||
|
|
||||||
If sRestorePath <> String.Empty Then
|
If sRestorePath <> String.Empty Then
|
||||||
CurrentBackupItem.RelativeRestorePath = sRestorePath & "\" & CurrentBackupItem.RestorePath
|
CurrentBackupItem.RelativeRestorePath = sRestorePath & "\" & CurrentBackupItem.RestorePath
|
||||||
@@ -482,7 +483,7 @@ Public Class frmGameManager
|
|||||||
If Directory.Exists(sPath) Then
|
If Directory.Exists(sPath) Then
|
||||||
Process.Start("explorer.exe", sPath)
|
Process.Start("explorer.exe", sPath)
|
||||||
Else
|
Else
|
||||||
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorNoRestorePathExists, MsgBoxStyle.Exclamation)
|
mgrCommon.ShowMessage(frmGameManager_ErrorNoRestorePathExists, MsgBoxStyle.Exclamation)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -522,7 +523,7 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
If oRemoteBackupData.Contains(oApp.Name) Then
|
If oRemoteBackupData.Contains(oApp.Name) Then
|
||||||
CurrentBackupItem = DirectCast(oRemoteBackupData(oApp.Name), clsBackup)
|
CurrentBackupItem = DirectCast(oRemoteBackupData(oApp.Name), clsBackup)
|
||||||
txtCurrentBackup.Text = mgrCommon.FormatString(My.Resources.frmGameManager_BackupTimeAndName, New String() {CurrentBackupItem.DateUpdated, CurrentBackupItem.UpdatedBy})
|
txtCurrentBackup.Text = mgrCommon.FormatString(frmGameManager_BackupTimeAndName, New String() {CurrentBackupItem.DateUpdated, CurrentBackupItem.UpdatedBy})
|
||||||
sFileName = BackupFolder & CurrentBackupItem.FileName
|
sFileName = BackupFolder & CurrentBackupItem.FileName
|
||||||
|
|
||||||
btnOpenBackupFile.Enabled = True
|
btnOpenBackupFile.Enabled = True
|
||||||
@@ -534,16 +535,16 @@ Public Class frmGameManager
|
|||||||
oFileInfo = New FileInfo(sFileName)
|
oFileInfo = New FileInfo(sFileName)
|
||||||
dFileSize = oFileInfo.Length
|
dFileSize = oFileInfo.Length
|
||||||
If dFileSize > 1048576 Then
|
If dFileSize > 1048576 Then
|
||||||
txtFileSize.Text = mgrCommon.FormatString(My.Resources.App_MB, Math.Round(dFileSize / 1048576, 2).ToString)
|
txtFileSize.Text = mgrCommon.FormatString(App_MB, Math.Round(dFileSize / 1048576, 2).ToString)
|
||||||
Else
|
Else
|
||||||
txtFileSize.Text = mgrCommon.FormatString(My.Resources.App_KB, Math.Round(dFileSize / 1024, 2).ToString)
|
txtFileSize.Text = mgrCommon.FormatString(App_KB, Math.Round(dFileSize / 1024, 2).ToString)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
txtFileSize.Text = My.Resources.frmGameManager_ErrorNoBackupExists
|
txtFileSize.Text = frmGameManager_ErrorNoBackupExists
|
||||||
End If
|
End If
|
||||||
txtRestorePath.Text = CurrentBackupItem.RestorePath
|
txtRestorePath.Text = CurrentBackupItem.RestorePath
|
||||||
Else
|
Else
|
||||||
txtCurrentBackup.Text = My.Resources.frmGameManager_Never
|
txtCurrentBackup.Text = frmGameManager_Never
|
||||||
txtFileSize.Text = String.Empty
|
txtFileSize.Text = String.Empty
|
||||||
txtRestorePath.Text = String.Empty
|
txtRestorePath.Text = String.Empty
|
||||||
btnOpenBackupFile.Enabled = False
|
btnOpenBackupFile.Enabled = False
|
||||||
@@ -554,25 +555,25 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
If oLocalBackupData.Contains(oApp.Name) Then
|
If oLocalBackupData.Contains(oApp.Name) Then
|
||||||
oBackupInfo = DirectCast(oLocalBackupData(oApp.Name), clsBackup)
|
oBackupInfo = DirectCast(oLocalBackupData(oApp.Name), clsBackup)
|
||||||
txtLocalBackup.Text = mgrCommon.FormatString(My.Resources.frmGameManager_BackupTimeAndName, New String() {oBackupInfo.DateUpdated, oBackupInfo.UpdatedBy})
|
txtLocalBackup.Text = mgrCommon.FormatString(frmGameManager_BackupTimeAndName, New String() {oBackupInfo.DateUpdated, oBackupInfo.UpdatedBy})
|
||||||
Else
|
Else
|
||||||
txtLocalBackup.Text = My.Resources.frmGameManager_Never
|
txtLocalBackup.Text = frmGameManager_Never
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If txtCurrentBackup.Text = My.Resources.frmGameManager_Never And txtLocalBackup.Text = My.Resources.frmGameManager_Never Then
|
If txtCurrentBackup.Text = frmGameManager_Never And txtLocalBackup.Text = frmGameManager_Never Then
|
||||||
lblSync.Visible = False
|
lblSync.Visible = False
|
||||||
btnMarkAsRestored.Enabled = False
|
btnMarkAsRestored.Enabled = False
|
||||||
ElseIf txtCurrentBackup.Text = My.Resources.frmGameManager_Never And txtLocalBackup.Text <> My.Resources.frmGameManager_Never Then
|
ElseIf txtCurrentBackup.Text = frmGameManager_Never And txtLocalBackup.Text <> frmGameManager_Never Then
|
||||||
lblSync.Visible = False
|
lblSync.Visible = False
|
||||||
btnMarkAsRestored.Enabled = False
|
btnMarkAsRestored.Enabled = False
|
||||||
ElseIf txtCurrentBackup.Text <> txtLocalBackup.Text Then
|
ElseIf txtCurrentBackup.Text <> txtLocalBackup.Text Then
|
||||||
lblSync.ForeColor = Color.Red
|
lblSync.ForeColor = Color.Red
|
||||||
lblSync.Text = My.Resources.frmGameManager_OutofSync
|
lblSync.Text = frmGameManager_OutofSync
|
||||||
lblSync.Visible = True
|
lblSync.Visible = True
|
||||||
btnMarkAsRestored.Enabled = True
|
btnMarkAsRestored.Enabled = True
|
||||||
Else
|
Else
|
||||||
lblSync.ForeColor = Color.Green
|
lblSync.ForeColor = Color.Green
|
||||||
lblSync.Text = My.Resources.frmGameManager_UpToDate
|
lblSync.Text = frmGameManager_UpToDate
|
||||||
lblSync.Visible = True
|
lblSync.Visible = True
|
||||||
btnMarkAsRestored.Enabled = False
|
btnMarkAsRestored.Enabled = False
|
||||||
End If
|
End If
|
||||||
@@ -583,7 +584,7 @@ Public Class frmGameManager
|
|||||||
Dim oDir As DirectoryInfo
|
Dim oDir As DirectoryInfo
|
||||||
Dim sSubDir As String
|
Dim sSubDir As String
|
||||||
|
|
||||||
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmBackupDelete, CurrentBackupItem.Name), MsgBoxStyle.YesNo) = 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.Local)
|
||||||
mgrManifest.DoManifestDelete(CurrentBackupItem, mgrSQLite.Database.Remote)
|
mgrManifest.DoManifestDelete(CurrentBackupItem, mgrSQLite.Database.Remote)
|
||||||
|
|
||||||
@@ -600,7 +601,7 @@ Public Class frmGameManager
|
|||||||
oDir = New DirectoryInfo(sSubDir)
|
oDir = New DirectoryInfo(sSubDir)
|
||||||
If oDir.GetDirectories.Length > 0 Or oDir.GetFiles.Length > 0 Then
|
If oDir.GetDirectories.Length > 0 Or oDir.GetFiles.Length > 0 Then
|
||||||
'Confirm
|
'Confirm
|
||||||
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmBackupFolderDelete, New String() {sSubDir, oDir.GetDirectories.Length, oDir.GetFiles.Length}), MsgBoxStyle.YesNo) = 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)
|
If Directory.Exists(sSubDir) Then Directory.Delete(sSubDir, True)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -641,8 +642,8 @@ Public Class frmGameManager
|
|||||||
chkMonitorOnly.Checked = oApp.MonitorOnly
|
chkMonitorOnly.Checked = oApp.MonitorOnly
|
||||||
|
|
||||||
'Update Buttons
|
'Update Buttons
|
||||||
UpdateBuilderButtonLabel(oApp.FileType, My.Resources.frmGameManager_IncludeShortcut, btnInclude, False)
|
UpdateBuilderButtonLabel(oApp.FileType, frmGameManager_IncludeShortcut, btnInclude, False)
|
||||||
UpdateBuilderButtonLabel(oApp.ExcludeList, My.Resources.frmGameManager_ExcludeShortcut, btnExclude, False)
|
UpdateBuilderButtonLabel(oApp.ExcludeList, frmGameManager_ExcludeShortcut, btnExclude, False)
|
||||||
|
|
||||||
'Extra
|
'Extra
|
||||||
txtAppPath.Text = oApp.ProcessPath
|
txtAppPath.Text = oApp.ProcessPath
|
||||||
@@ -656,7 +657,7 @@ Public Class frmGameManager
|
|||||||
If IO.File.Exists(oApp.Icon) Then
|
If IO.File.Exists(oApp.Icon) Then
|
||||||
pbIcon.Image = Image.FromFile(oApp.Icon)
|
pbIcon.Image = Image.FromFile(oApp.Icon)
|
||||||
Else
|
Else
|
||||||
pbIcon.Image = My.Resources.Unknown
|
pbIcon.Image = Unknown
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Stats
|
'Stats
|
||||||
@@ -744,7 +745,7 @@ Public Class frmGameManager
|
|||||||
WipeControls(grpConfig.Controls)
|
WipeControls(grpConfig.Controls)
|
||||||
WipeControls(grpExtra.Controls)
|
WipeControls(grpExtra.Controls)
|
||||||
WipeControls(grpStats.Controls)
|
WipeControls(grpStats.Controls)
|
||||||
pbIcon.Image = My.Resources.Unknown
|
pbIcon.Image = Unknown
|
||||||
chkEnabled.Enabled = True
|
chkEnabled.Enabled = True
|
||||||
chkMonitorOnly.Enabled = True
|
chkMonitorOnly.Enabled = True
|
||||||
btnSave.Enabled = True
|
btnSave.Enabled = True
|
||||||
@@ -762,8 +763,8 @@ Public Class frmGameManager
|
|||||||
chkMonitorOnly.Checked = False
|
chkMonitorOnly.Checked = False
|
||||||
btnTags.Enabled = False
|
btnTags.Enabled = False
|
||||||
lblTags.Visible = False
|
lblTags.Visible = False
|
||||||
btnInclude.Text = My.Resources.frmGameManager_btnInclude
|
btnInclude.Text = frmGameManager_btnInclude
|
||||||
btnExclude.Text = My.Resources.frmGameManager_btnExclude
|
btnExclude.Text = frmGameManager_btnExclude
|
||||||
btnImport.Enabled = False
|
btnImport.Enabled = False
|
||||||
btnExport.Enabled = False
|
btnExport.Enabled = False
|
||||||
Case eModes.Edit
|
Case eModes.Edit
|
||||||
@@ -820,8 +821,8 @@ Public Class frmGameManager
|
|||||||
btnBackup.Enabled = False
|
btnBackup.Enabled = False
|
||||||
btnTags.Enabled = False
|
btnTags.Enabled = False
|
||||||
lblTags.Visible = False
|
lblTags.Visible = False
|
||||||
btnInclude.Text = My.Resources.frmGameManager_btnInclude
|
btnInclude.Text = frmGameManager_btnInclude
|
||||||
btnExclude.Text = My.Resources.frmGameManager_btnExclude
|
btnExclude.Text = frmGameManager_btnExclude
|
||||||
btnImport.Enabled = True
|
btnImport.Enabled = True
|
||||||
btnExport.Enabled = True
|
btnExport.Enabled = True
|
||||||
Case eModes.Disabled
|
Case eModes.Disabled
|
||||||
@@ -830,7 +831,7 @@ Public Class frmGameManager
|
|||||||
WipeControls(grpConfig.Controls)
|
WipeControls(grpConfig.Controls)
|
||||||
WipeControls(grpExtra.Controls)
|
WipeControls(grpExtra.Controls)
|
||||||
WipeControls(grpStats.Controls)
|
WipeControls(grpStats.Controls)
|
||||||
pbIcon.Image = My.Resources.Unknown
|
pbIcon.Image = Unknown
|
||||||
lblSync.Visible = False
|
lblSync.Visible = False
|
||||||
btnSave.Enabled = False
|
btnSave.Enabled = False
|
||||||
btnCancel.Enabled = False
|
btnCancel.Enabled = False
|
||||||
@@ -846,8 +847,8 @@ Public Class frmGameManager
|
|||||||
btnMarkAsRestored.Enabled = False
|
btnMarkAsRestored.Enabled = False
|
||||||
btnTags.Enabled = False
|
btnTags.Enabled = False
|
||||||
lblTags.Visible = False
|
lblTags.Visible = False
|
||||||
btnInclude.Text = My.Resources.frmGameManager_btnInclude
|
btnInclude.Text = frmGameManager_btnInclude
|
||||||
btnExclude.Text = My.Resources.frmGameManager_btnExclude
|
btnExclude.Text = frmGameManager_btnExclude
|
||||||
btnImport.Enabled = True
|
btnImport.Enabled = True
|
||||||
btnExport.Enabled = True
|
btnExport.Enabled = True
|
||||||
Case eModes.MultiSelect
|
Case eModes.MultiSelect
|
||||||
@@ -855,7 +856,7 @@ Public Class frmGameManager
|
|||||||
WipeControls(grpConfig.Controls)
|
WipeControls(grpConfig.Controls)
|
||||||
WipeControls(grpExtra.Controls)
|
WipeControls(grpExtra.Controls)
|
||||||
WipeControls(grpStats.Controls)
|
WipeControls(grpStats.Controls)
|
||||||
pbIcon.Image = My.Resources.Unknown
|
pbIcon.Image = Unknown
|
||||||
lblSync.Visible = False
|
lblSync.Visible = False
|
||||||
btnSave.Enabled = True
|
btnSave.Enabled = True
|
||||||
btnCancel.Enabled = False
|
btnCancel.Enabled = False
|
||||||
@@ -977,7 +978,7 @@ Public Class frmGameManager
|
|||||||
sMonitorIDs.Add(AppData(oData.Key))
|
sMonitorIDs.Add(AppData(oData.Key))
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmMultiSave, New String() {sMonitorIDs.Count, mgrCommon.BooleanYesNo(oApp.Enabled), mgrCommon.BooleanYesNo(oApp.MonitorOnly)}), MsgBoxStyle.YesNo) = 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
|
bSuccess = True
|
||||||
mgrMonitorList.DoListUpdateMulti(sMonitorIDs, oApp)
|
mgrMonitorList.DoListUpdateMulti(sMonitorIDs, oApp)
|
||||||
eCurrentMode = eModes.Disabled
|
eCurrentMode = eModes.Disabled
|
||||||
@@ -1003,7 +1004,7 @@ Public Class frmGameManager
|
|||||||
oData = lstGames.SelectedItems(0)
|
oData = lstGames.SelectedItems(0)
|
||||||
oApp = DirectCast(AppData(oData.Key), clsGame)
|
oApp = DirectCast(AppData(oData.Key), clsGame)
|
||||||
|
|
||||||
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmGameDelete, oApp.Name), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(frmGameManager_ConfirmGameDelete, oApp.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
mgrMonitorList.DoListDelete(oApp.ID)
|
mgrMonitorList.DoListDelete(oApp.ID)
|
||||||
LoadData()
|
LoadData()
|
||||||
eCurrentMode = eModes.Disabled
|
eCurrentMode = eModes.Disabled
|
||||||
@@ -1017,7 +1018,7 @@ Public Class frmGameManager
|
|||||||
sMonitorIDs.Add(oApp.ID)
|
sMonitorIDs.Add(oApp.ID)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmMultiGameDelete, sMonitorIDs.Count), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(frmGameManager_ConfirmMultiGameDelete, sMonitorIDs.Count, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
mgrMonitorList.DoListDeleteMulti(sMonitorIDs)
|
mgrMonitorList.DoListDeleteMulti(sMonitorIDs)
|
||||||
LoadData()
|
LoadData()
|
||||||
eCurrentMode = eModes.Disabled
|
eCurrentMode = eModes.Disabled
|
||||||
@@ -1039,25 +1040,25 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
Private Function CoreValidatation(ByVal oApp As clsGame) As Boolean
|
Private Function CoreValidatation(ByVal oApp As clsGame) As Boolean
|
||||||
If txtName.Text = String.Empty Then
|
If txtName.Text = String.Empty Then
|
||||||
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorValidName, MsgBoxStyle.Exclamation)
|
mgrCommon.ShowMessage(frmGameManager_ErrorValidName, MsgBoxStyle.Exclamation)
|
||||||
txtName.Focus()
|
txtName.Focus()
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If txtProcess.Text = String.Empty Then
|
If txtProcess.Text = String.Empty Then
|
||||||
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorValidProcess, MsgBoxStyle.Exclamation)
|
mgrCommon.ShowMessage(frmGameManager_ErrorValidProcess, MsgBoxStyle.Exclamation)
|
||||||
txtProcess.Focus()
|
txtProcess.Focus()
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If chkFolderSave.Checked = False And txtFileType.Text = String.Empty Then
|
If chkFolderSave.Checked = False And txtFileType.Text = String.Empty Then
|
||||||
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorNoItems, MsgBoxStyle.Exclamation)
|
mgrCommon.ShowMessage(frmGameManager_ErrorNoItems, MsgBoxStyle.Exclamation)
|
||||||
btnInclude.Focus()
|
btnInclude.Focus()
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If mgrMonitorList.DoDuplicateListCheck(oApp.Name, oApp.ProcessName, , oApp.ID) Then
|
If mgrMonitorList.DoDuplicateListCheck(oApp.Name, oApp.ProcessName, , oApp.ID) Then
|
||||||
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorGameDupe, MsgBoxStyle.Exclamation)
|
mgrCommon.ShowMessage(frmGameManager_ErrorGameDupe, MsgBoxStyle.Exclamation)
|
||||||
txtName.Focus()
|
txtName.Focus()
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
@@ -1080,7 +1081,7 @@ Public Class frmGameManager
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
If oMarkList.Count = 1 Then
|
If oMarkList.Count = 1 Then
|
||||||
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmMark, oMarkList(0).Name), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(frmGameManager_ConfirmMark, oMarkList(0).Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
bWasUpdated = True
|
bWasUpdated = True
|
||||||
If mgrManifest.DoManifestCheck(oMarkList(0).Name, mgrSQLite.Database.Local) Then
|
If mgrManifest.DoManifestCheck(oMarkList(0).Name, mgrSQLite.Database.Local) Then
|
||||||
mgrManifest.DoManifestUpdate(oMarkList(0), mgrSQLite.Database.Local)
|
mgrManifest.DoManifestUpdate(oMarkList(0), mgrSQLite.Database.Local)
|
||||||
@@ -1089,7 +1090,7 @@ Public Class frmGameManager
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ElseIf oMarkList.Count > 1 Then
|
ElseIf oMarkList.Count > 1 Then
|
||||||
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmMultiMark, oMarkList.Count), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(frmGameManager_ConfirmMultiMark, oMarkList.Count, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
bWasUpdated = True
|
bWasUpdated = True
|
||||||
For Each oGameBackup In oMarkList
|
For Each oGameBackup In oMarkList
|
||||||
If mgrManifest.DoManifestCheck(oGameBackup.Name, mgrSQLite.Database.Local) Then
|
If mgrManifest.DoManifestCheck(oGameBackup.Name, mgrSQLite.Database.Local) Then
|
||||||
@@ -1100,7 +1101,7 @@ Public Class frmGameManager
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorNoBackupData, MsgBoxStyle.Information)
|
mgrCommon.ShowMessage(frmGameManager_ErrorNoBackupData, MsgBoxStyle.Information)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Don't bother updating unless we actually did something
|
'Don't bother updating unless we actually did something
|
||||||
@@ -1134,9 +1135,9 @@ Public Class frmGameManager
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
If BackupList.Count = 1 Then
|
If BackupList.Count = 1 Then
|
||||||
sMsg = mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmBackup, BackupList(0).Name)
|
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmBackup, BackupList(0).Name)
|
||||||
ElseIf BackupList.Count > 1 Then
|
ElseIf BackupList.Count > 1 Then
|
||||||
sMsg = mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmMultiBackup, BackupList.Count)
|
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmMultiBackup, BackupList.Count)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If mgrCommon.ShowMessage(sMsg, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(sMsg, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
@@ -1166,15 +1167,15 @@ Public Class frmGameManager
|
|||||||
If RestoreList.Count = 1 Then
|
If RestoreList.Count = 1 Then
|
||||||
bDoRestore = True
|
bDoRestore = True
|
||||||
If Not mgrRestore.CheckManifest(RestoreList(0).Name) Then
|
If Not mgrRestore.CheckManifest(RestoreList(0).Name) Then
|
||||||
sMsg = mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmRestoreAnyway, RestoreList(0).Name)
|
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmRestoreAnyway, RestoreList(0).Name)
|
||||||
Else
|
Else
|
||||||
sMsg = mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmRestore, RestoreList(0).Name)
|
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmRestore, RestoreList(0).Name)
|
||||||
End If
|
End If
|
||||||
ElseIf RestoreList.Count > 1 Then
|
ElseIf RestoreList.Count > 1 Then
|
||||||
bDoRestore = True
|
bDoRestore = True
|
||||||
sMsg = mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmMultiRestore, RestoreList.Count)
|
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmMultiRestore, RestoreList.Count)
|
||||||
Else
|
Else
|
||||||
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorNoBackupData, MsgBoxStyle.Information)
|
mgrCommon.ShowMessage(frmGameManager_ErrorNoBackupData, MsgBoxStyle.Information)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'We need this check in case a bunch of games with no backups are multi-selected
|
'We need this check in case a bunch of games with no backups are multi-selected
|
||||||
@@ -1190,7 +1191,7 @@ Public Class frmGameManager
|
|||||||
Private Sub ImportGameListFile()
|
Private Sub ImportGameListFile()
|
||||||
Dim sLocation As String
|
Dim sLocation As String
|
||||||
|
|
||||||
sLocation = mgrCommon.OpenFileBrowser(My.Resources.frmGameManager_ChooseImportXML, "xml", My.Resources.frmGameManager_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 sLocation <> String.Empty Then
|
||||||
If mgrMonitorList.DoImport(sLocation) Then
|
If mgrMonitorList.DoImport(sLocation) Then
|
||||||
@@ -1203,7 +1204,7 @@ Public Class frmGameManager
|
|||||||
Private Sub ExportGameList()
|
Private Sub ExportGameList()
|
||||||
Dim sLocation As String
|
Dim sLocation As String
|
||||||
|
|
||||||
sLocation = mgrCommon.SaveFileBrowser(My.Resources.frmGameManager_ChooseExportXML, "xml", My.Resources.frmGameManager_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
|
If sLocation <> String.Empty Then
|
||||||
mgrMonitorList.ExportMonitorList(sLocation)
|
mgrMonitorList.ExportMonitorList(sLocation)
|
||||||
@@ -1213,7 +1214,7 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
Private Sub ImportOfficialGameList()
|
Private Sub ImportOfficialGameList()
|
||||||
|
|
||||||
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmOfficialImport), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(frmGameManager_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
If mgrMonitorList.DoImport(mgrPath.OfficialImportURL) Then
|
If mgrMonitorList.DoImport(mgrPath.OfficialImportURL) Then
|
||||||
LoadData()
|
LoadData()
|
||||||
End If
|
End If
|
||||||
@@ -1223,49 +1224,51 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
Private Sub SetForm()
|
Private Sub SetForm()
|
||||||
'Set Form Name
|
'Set Form Name
|
||||||
Me.Name = My.Resources.frmGameManager_FormName
|
Me.Name = frmGameManager_FormName
|
||||||
|
|
||||||
'Set Form text
|
'Set Form text
|
||||||
btnExport.Text = My.Resources.frmGameManager_btnExport
|
btnExport.Text = frmGameManager_btnExport
|
||||||
btnImport.Text = My.Resources.frmGameManager_btnImport
|
btnImport.Text = frmGameManager_btnImport
|
||||||
optCustom.Text = My.Resources.frmGameManager_optCustom
|
optCustom.Text = frmGameManager_optCustom
|
||||||
optBackupData.Text = My.Resources.frmGameManager_optBackupData
|
optBackupData.Text = frmGameManager_optBackupData
|
||||||
optPendingRestores.Text = My.Resources.frmGameManager_optPendingRestores
|
optPendingRestores.Text = frmGameManager_optPendingRestores
|
||||||
optAllGames.Text = My.Resources.frmGameManager_optAllGames
|
optAllGames.Text = frmGameManager_optAllGames
|
||||||
btnTags.Text = My.Resources.frmGameManager_btnTags
|
btnTags.Text = frmGameManager_btnTags
|
||||||
chkEnabled.Text = My.Resources.frmGameManager_chkEnabled
|
chkEnabled.Text = frmGameManager_chkEnabled
|
||||||
btnCancel.Text = My.Resources.frmGameManager_btnCancel
|
btnCancel.Text = frmGameManager_btnCancel
|
||||||
chkMonitorOnly.Text = My.Resources.frmGameManager_chkMonitorOnly
|
chkMonitorOnly.Text = frmGameManager_chkMonitorOnly
|
||||||
btnMarkAsRestored.Text = My.Resources.frmGameManager_btnMarkAsRestored
|
btnMarkAsRestored.Text = frmGameManager_btnMarkAsRestored
|
||||||
btnRestore.Text = My.Resources.frmGameManager_btnRestore
|
btnRestore.Text = frmGameManager_btnRestore
|
||||||
btnSave.Text = My.Resources.frmGameManager_btnSave
|
btnSave.Text = frmGameManager_btnSave
|
||||||
lblRestorePath.Text = My.Resources.frmGameManager_lblRestorePath
|
lblRestorePath.Text = frmGameManager_lblRestorePath
|
||||||
btnOpenRestorePath.Text = My.Resources.frmGameManager_btnOpenRestorePath
|
btnOpenRestorePath.Text = frmGameManager_btnOpenRestorePath
|
||||||
btnOpenBackupFile.Text = My.Resources.frmGameManager_btnOpenBackupFile
|
btnOpenBackupFile.Text = frmGameManager_btnOpenBackupFile
|
||||||
btnDeleteBackup.Text = My.Resources.frmGameManager_btnDeleteBackup
|
btnDeleteBackup.Text = frmGameManager_btnDeleteBackup
|
||||||
lblFileSize.Text = My.Resources.frmGameManager_lblFileSize
|
lblFileSize.Text = frmGameManager_lblFileSize
|
||||||
lblCurrentBackup.Text = My.Resources.frmGameManager_lblCurrentBackup
|
lblCurrentBackup.Text = frmGameManager_lblCurrentBackup
|
||||||
lblLastBackup.Text = My.Resources.frmGameManager_lblLastBackup
|
lblLastBackup.Text = frmGameManager_lblLastBackup
|
||||||
btnIconBrowse.Text = My.Resources.frmGameManager_btnIconBrowse
|
btnIconBrowse.Text = frmGameManager_btnIconBrowse
|
||||||
lblVersion.Text = My.Resources.frmGameManager_lblVersion
|
lblVersion.Text = frmGameManager_lblVersion
|
||||||
lblCompany.Text = My.Resources.frmGameManager_lblCompany
|
lblCompany.Text = frmGameManager_lblCompany
|
||||||
lblIcon.Text = My.Resources.frmGameManager_lblIcon
|
lblIcon.Text = frmGameManager_lblIcon
|
||||||
btnAppPathBrowse.Text = My.Resources.frmGameManager_btnAppPathBrowse
|
btnAppPathBrowse.Text = frmGameManager_btnAppPathBrowse
|
||||||
lblGamePath.Text = My.Resources.frmGameManager_lblGamePath
|
lblGamePath.Text = frmGameManager_lblGamePath
|
||||||
lblHours.Text = My.Resources.frmGameManager_lblHours
|
lblHours.Text = frmGameManager_lblHours
|
||||||
btnExclude.Text = My.Resources.frmGameManager_btnExclude
|
btnExclude.Text = frmGameManager_btnExclude
|
||||||
btnInclude.Text = My.Resources.frmGameManager_btnInclude
|
btnInclude.Text = frmGameManager_btnInclude
|
||||||
btnSavePathBrowse.Text = My.Resources.frmGameManager_btnSavePathBrowse
|
btnSavePathBrowse.Text = frmGameManager_btnSavePathBrowse
|
||||||
btnProcessBrowse.Text = My.Resources.frmGameManager_btnProcessBrowse
|
btnProcessBrowse.Text = frmGameManager_btnProcessBrowse
|
||||||
lblSavePath.Text = My.Resources.frmGameManager_lblSavePath
|
lblSavePath.Text = frmGameManager_lblSavePath
|
||||||
lblProcess.Text = My.Resources.frmGameManager_lblProcess
|
lblProcess.Text = frmGameManager_lblProcess
|
||||||
lblName.Text = My.Resources.frmGameManager_lblName
|
lblName.Text = frmGameManager_lblName
|
||||||
chkTimeStamp.Text = My.Resources.frmGameManager_chkTimeStamp
|
chkTimeStamp.Text = frmGameManager_chkTimeStamp
|
||||||
chkFolderSave.Text = My.Resources.frmGameManager_chkFolderSave
|
chkFolderSave.Text = frmGameManager_chkFolderSave
|
||||||
btnBackup.Text = My.Resources.frmGameManager_btnBackup
|
btnBackup.Text = frmGameManager_btnBackup
|
||||||
btnClose.Text = My.Resources.frmGameManager_btnClose
|
btnClose.Text = frmGameManager_btnClose
|
||||||
btnDelete.Text = My.Resources.frmGameManager_btnDelete
|
btnDelete.Text = frmGameManager_btnDelete
|
||||||
btnAdd.Text = My.Resources.frmGameManager_btnAdd
|
btnAdd.Text = frmGameManager_btnAdd
|
||||||
|
cmsOfficial.Text = frmGameManager_cmsOfficial
|
||||||
|
cmsFile.Text = frmGameManager_cmsFile
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmGameManager_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub frmGameManager_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
@@ -1385,14 +1388,14 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
Private Sub btnInclude_Click(sender As Object, e As EventArgs) Handles btnInclude.Click
|
Private Sub btnInclude_Click(sender As Object, e As EventArgs) Handles btnInclude.Click
|
||||||
Dim sInclude As String = txtFileType.Text
|
Dim sInclude As String = txtFileType.Text
|
||||||
OpenBuilder(My.Resources.frmGameManager_Include, txtFileType)
|
OpenBuilder(frmGameManager_Include, txtFileType)
|
||||||
UpdateBuilderButtonLabel(txtFileType.Text, My.Resources.frmGameManager_IncludeShortcut, btnInclude, (sInclude <> txtFileType.Text))
|
UpdateBuilderButtonLabel(txtFileType.Text, frmGameManager_IncludeShortcut, btnInclude, (sInclude <> txtFileType.Text))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnExclude_Click(sender As Object, e As EventArgs) Handles btnExclude.Click
|
Private Sub btnExclude_Click(sender As Object, e As EventArgs) Handles btnExclude.Click
|
||||||
Dim sExclude As String = txtExclude.Text
|
Dim sExclude As String = txtExclude.Text
|
||||||
OpenBuilder(My.Resources.frmGameManager_Exclude, txtExclude)
|
OpenBuilder(frmGameManager_Exclude, txtExclude)
|
||||||
UpdateBuilderButtonLabel(txtExclude.Text, My.Resources.frmGameManager_ExcludeShortcut, btnExclude, (sExclude <> txtExclude.Text))
|
UpdateBuilderButtonLabel(txtExclude.Text, frmGameManager_ExcludeShortcut, btnExclude, (sExclude <> txtExclude.Text))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub chkFolderSave_CheckedChanged(sender As Object, e As EventArgs) Handles chkFolderSave.CheckedChanged
|
Private Sub chkFolderSave_CheckedChanged(sender As Object, e As EventArgs) Handles chkFolderSave.CheckedChanged
|
||||||
@@ -1400,7 +1403,7 @@ Public Class frmGameManager
|
|||||||
btnInclude.Enabled = False
|
btnInclude.Enabled = False
|
||||||
If txtFileType.Text <> String.Empty Then
|
If txtFileType.Text <> String.Empty Then
|
||||||
txtFileType.Text = String.Empty
|
txtFileType.Text = String.Empty
|
||||||
UpdateBuilderButtonLabel(txtFileType.Text, My.Resources.frmGameManager_IncludeShortcut, btnInclude, False)
|
UpdateBuilderButtonLabel(txtFileType.Text, frmGameManager_IncludeShortcut, btnInclude, False)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
btnInclude.Enabled = True
|
btnInclude.Enabled = True
|
||||||
|
|||||||
+145
-143
@@ -1,4 +1,6 @@
|
|||||||
'Name: frmMain
|
Imports GBM.My.Resources
|
||||||
|
|
||||||
|
'Name: frmMain
|
||||||
'Description: Game Backup Monitor Main Screen
|
'Description: Game Backup Monitor Main Screen
|
||||||
'Author: Michael J. Seiferling
|
'Author: Michael J. Seiferling
|
||||||
Public Class frmMain
|
Public Class frmMain
|
||||||
@@ -69,15 +71,15 @@ Public Class frmMain
|
|||||||
|
|
||||||
'Build Info
|
'Build Info
|
||||||
sStatus1 = IO.Path.GetFileName(oRestoreInfo.FileName)
|
sStatus1 = IO.Path.GetFileName(oRestoreInfo.FileName)
|
||||||
sStatus2 = mgrCommon.FormatString(My.Resources.frmMain_UpdatedBy, New String() {oRestoreInfo.UpdatedBy, oRestoreInfo.DateUpdated})
|
sStatus2 = mgrCommon.FormatString(frmMain_UpdatedBy, New String() {oRestoreInfo.UpdatedBy, oRestoreInfo.DateUpdated})
|
||||||
If oRestoreInfo.AbsolutePath Then
|
If oRestoreInfo.AbsolutePath Then
|
||||||
sStatus3 = oRestoreInfo.RestorePath
|
sStatus3 = oRestoreInfo.RestorePath
|
||||||
Else
|
Else
|
||||||
sStatus3 = oRestoreInfo.RelativeRestorePath
|
sStatus3 = oRestoreInfo.RelativeRestorePath
|
||||||
End If
|
End If
|
||||||
|
|
||||||
WorkingGameInfo(My.Resources.frmMain_RestoreInProgress, sStatus1, sStatus2, sStatus3)
|
WorkingGameInfo(frmMain_RestoreInProgress, sStatus1, sStatus2, sStatus3)
|
||||||
UpdateStatus(My.Resources.frmMain_RestoreInProgress)
|
UpdateStatus(frmMain_RestoreInProgress)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SetBackupInfo(ByVal oGame As clsGame) Handles oBackup.UpdateBackupInfo
|
Private Sub SetBackupInfo(ByVal oGame As clsGame) Handles oBackup.UpdateBackupInfo
|
||||||
@@ -94,8 +96,8 @@ Public Class frmMain
|
|||||||
End If
|
End If
|
||||||
sStatus3 = String.Empty
|
sStatus3 = String.Empty
|
||||||
|
|
||||||
WorkingGameInfo(My.Resources.frmMain_BackupInProgress, sStatus1, sStatus2, sStatus3)
|
WorkingGameInfo(frmMain_BackupInProgress, sStatus1, sStatus2, sStatus3)
|
||||||
UpdateStatus(My.Resources.frmMain_BackupInProgress)
|
UpdateStatus(frmMain_BackupInProgress)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OperationStarted(Optional ByVal bPause As Boolean = True)
|
Private Sub OperationStarted(Optional ByVal bPause As Boolean = True)
|
||||||
@@ -104,7 +106,7 @@ Public Class frmMain
|
|||||||
Dim d As New OperationEndedCallBack(AddressOf OperationEnded)
|
Dim d As New OperationEndedCallBack(AddressOf OperationEnded)
|
||||||
Me.Invoke(d, New Object() {})
|
Me.Invoke(d, New Object() {})
|
||||||
Else
|
Else
|
||||||
btnCancelOperation.Visible = True
|
btnCancelOperation.Visible = True
|
||||||
LockDownMenuEnable()
|
LockDownMenuEnable()
|
||||||
If bPause Then PauseScan()
|
If bPause Then PauseScan()
|
||||||
End If
|
End If
|
||||||
@@ -141,7 +143,7 @@ Public Class frmMain
|
|||||||
Private Sub ExecuteBackup(ByVal oBackupList As List(Of clsGame))
|
Private Sub ExecuteBackup(ByVal oBackupList As List(Of clsGame))
|
||||||
'Init Backup Settings
|
'Init Backup Settings
|
||||||
oBackup.Settings = oSettings
|
oBackup.Settings = oSettings
|
||||||
oBackup.DoBackup(oBackupList)
|
oBackup.DoBackup(oBackupList)
|
||||||
OperationEnded()
|
OperationEnded()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -166,10 +168,10 @@ Public Class frmMain
|
|||||||
For Each oGame In oRestoreList
|
For Each oGame In oRestoreList
|
||||||
oRestoreInfo = oBackupData(oGame.Name)
|
oRestoreInfo = oBackupData(oGame.Name)
|
||||||
|
|
||||||
If mgrRestore.CheckPath(oRestoreInfo, oGame, bTriggerReload) Then
|
If mgrRestore.CheckPath(oRestoreInfo, oGame, bTriggerReload) Then
|
||||||
oReadyList.Add(oRestoreInfo)
|
oReadyList.Add(oRestoreInfo)
|
||||||
Else
|
Else
|
||||||
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_ErrorRestorePath, oRestoreInfo.Name), False, ToolTipIcon.Error, True)
|
UpdateLog(mgrCommon.FormatString(frmMain_ErrorRestorePath, oRestoreInfo.Name), False, ToolTipIcon.Error, True)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -200,18 +202,18 @@ Public Class frmMain
|
|||||||
bNoAuto = False
|
bNoAuto = False
|
||||||
gMonStripStatusButton.Enabled = False
|
gMonStripStatusButton.Enabled = False
|
||||||
|
|
||||||
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_ManualBackup, oGame.Name), False)
|
UpdateLog(mgrCommon.FormatString(frmMain_ManualBackup, oGame.Name), False)
|
||||||
|
|
||||||
If oGame.AbsolutePath = False Then
|
If oGame.AbsolutePath = False Then
|
||||||
If oGame.ProcessPath = String.Empty Then
|
If oGame.ProcessPath = String.Empty Then
|
||||||
If mgrCommon.IsProcessNotSearchable(oGame) Then bNoAuto = True
|
If mgrCommon.IsProcessNotSearchable(oGame) Then bNoAuto = True
|
||||||
oGame.ProcessPath = mgrPath.ProcessPathSearch(oGame.Name, oGame.TrueProcess, mgrCommon.FormatString(My.Resources.frmMain_ErrorRelativePath, oGame.Name), bNoAuto)
|
oGame.ProcessPath = mgrPath.ProcessPathSearch(oGame.Name, oGame.TrueProcess, mgrCommon.FormatString(frmMain_ErrorRelativePath, oGame.Name), bNoAuto)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If oGame.ProcessPath <> String.Empty Then
|
If oGame.ProcessPath <> String.Empty Then
|
||||||
oReadyList.Add(oGame)
|
oReadyList.Add(oGame)
|
||||||
Else
|
Else
|
||||||
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_ErrorBackupUnknownPath, oGame.Name), True, ToolTipIcon.Error, True)
|
UpdateLog(mgrCommon.FormatString(frmMain_ErrorBackupUnknownPath, oGame.Name), True, ToolTipIcon.Error, True)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
oReadyList.Add(oGame)
|
oReadyList.Add(oGame)
|
||||||
@@ -267,27 +269,27 @@ Public Class frmMain
|
|||||||
|
|
||||||
If SupressBackup() Then
|
If SupressBackup() Then
|
||||||
bDoBackup = False
|
bDoBackup = False
|
||||||
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_ErrorBackupSessionLength, oProcess.GameInfo.Name), False)
|
UpdateLog(mgrCommon.FormatString(frmMain_ErrorBackupSessionLength, oProcess.GameInfo.Name), False)
|
||||||
SetLastAction(mgrCommon.FormatString(My.Resources.frmMain_ErrorBackupSessionLength, oProcess.GameInfo.CroppedName))
|
SetLastAction(mgrCommon.FormatString(frmMain_ErrorBackupSessionLength, oProcess.GameInfo.CroppedName))
|
||||||
OperationEnded()
|
OperationEnded()
|
||||||
Else
|
Else
|
||||||
If oProcess.GameInfo.MonitorOnly = False Then
|
If oProcess.GameInfo.MonitorOnly = False Then
|
||||||
If oSettings.DisableConfirmation Then
|
If oSettings.DisableConfirmation Then
|
||||||
bDoBackup = True
|
bDoBackup = True
|
||||||
Else
|
Else
|
||||||
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmMain_ConfirmBackup, oProcess.GameInfo.Name), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(frmMain_ConfirmBackup, oProcess.GameInfo.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
bDoBackup = True
|
bDoBackup = True
|
||||||
Else
|
Else
|
||||||
bDoBackup = False
|
bDoBackup = False
|
||||||
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_ErrorBackupCancel, oProcess.GameInfo.Name), False)
|
UpdateLog(mgrCommon.FormatString(frmMain_ErrorBackupCancel, oProcess.GameInfo.Name), False)
|
||||||
SetLastAction(mgrCommon.FormatString(My.Resources.frmMain_ErrorBackupCancel, oProcess.GameInfo.CroppedName))
|
SetLastAction(mgrCommon.FormatString(frmMain_ErrorBackupCancel, oProcess.GameInfo.CroppedName))
|
||||||
OperationEnded()
|
OperationEnded()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
bDoBackup = False
|
bDoBackup = False
|
||||||
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_MonitorEnded, oProcess.GameInfo.Name), False)
|
UpdateLog(mgrCommon.FormatString(frmMain_MonitorEnded, oProcess.GameInfo.Name), False)
|
||||||
SetLastAction(mgrCommon.FormatString(My.Resources.frmMain_MonitorEnded, oProcess.GameInfo.CroppedName))
|
SetLastAction(mgrCommon.FormatString(frmMain_MonitorEnded, oProcess.GameInfo.CroppedName))
|
||||||
OperationEnded()
|
OperationEnded()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -307,12 +309,12 @@ Public Class frmMain
|
|||||||
|
|
||||||
If slRestoreData.Count > 0 Then
|
If slRestoreData.Count > 0 Then
|
||||||
If slRestoreData.Count > 1 Then
|
If slRestoreData.Count > 1 Then
|
||||||
sNotification = mgrCommon.FormatString(My.Resources.frmMain_NewSaveNotificationMulti, slRestoreData.Count)
|
sNotification = mgrCommon.FormatString(frmMain_NewSaveNotificationMulti, slRestoreData.Count)
|
||||||
Else
|
Else
|
||||||
sNotification = mgrCommon.FormatString(My.Resources.frmMain_NewSaveNotificationSingle, slRestoreData.Count)
|
sNotification = mgrCommon.FormatString(frmMain_NewSaveNotificationSingle, slRestoreData.Count)
|
||||||
End If
|
End If
|
||||||
gMonNotification.Image = My.Resources.Inbox
|
gMonNotification.Image = Inbox
|
||||||
gMonTrayNotification.Image = My.Resources.Inbox
|
gMonTrayNotification.Image = Inbox
|
||||||
gMonNotification.Text = sNotification
|
gMonNotification.Text = sNotification
|
||||||
gMonTrayNotification.Text = sNotification
|
gMonTrayNotification.Text = sNotification
|
||||||
gMonNotification.Visible = True
|
gMonNotification.Visible = True
|
||||||
@@ -325,9 +327,9 @@ Public Class frmMain
|
|||||||
Dim sIcon As String
|
Dim sIcon As String
|
||||||
Dim fbBrowser As New OpenFileDialog
|
Dim fbBrowser As New OpenFileDialog
|
||||||
|
|
||||||
fbBrowser.Title = mgrCommon.FormatString(My.Resources.frmMain_ChooseIcon, oProcess.GameInfo.CroppedName)
|
fbBrowser.Title = mgrCommon.FormatString(frmMain_ChooseIcon, oProcess.GameInfo.CroppedName)
|
||||||
fbBrowser.DefaultExt = "ico"
|
fbBrowser.DefaultExt = "ico"
|
||||||
fbBrowser.Filter = My.Resources.frmMain_IconFilter
|
fbBrowser.Filter = frmMain_IconFilter
|
||||||
Try
|
Try
|
||||||
fbBrowser.InitialDirectory = IO.Path.GetDirectoryName(oProcess.FoundProcess.MainModule.FileName)
|
fbBrowser.InitialDirectory = IO.Path.GetDirectoryName(oProcess.FoundProcess.MainModule.FileName)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@@ -347,7 +349,7 @@ Public Class frmMain
|
|||||||
|
|
||||||
Private Sub ResetGameInfo(Optional ByVal bKeepInfo As Boolean = False)
|
Private Sub ResetGameInfo(Optional ByVal bKeepInfo As Boolean = False)
|
||||||
If bKeepInfo And Not oProcess.GameInfo Is Nothing Then
|
If bKeepInfo And Not oProcess.GameInfo Is Nothing Then
|
||||||
lblGameTitle.Text = mgrCommon.FormatString(My.Resources.frmMain_LastGame, oProcess.GameInfo.CroppedName)
|
lblGameTitle.Text = mgrCommon.FormatString(frmMain_LastGame, oProcess.GameInfo.CroppedName)
|
||||||
pbIcon.Image = oPriorImage
|
pbIcon.Image = oPriorImage
|
||||||
lblStatus1.Text = sPriorPath
|
lblStatus1.Text = sPriorPath
|
||||||
lblStatus2.Text = sPriorCompany
|
lblStatus2.Text = sPriorCompany
|
||||||
@@ -357,8 +359,8 @@ Public Class frmMain
|
|||||||
lblTimeSpent.Visible = True
|
lblTimeSpent.Visible = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
pbIcon.Image = My.Resources.Searching
|
pbIcon.Image = Searching
|
||||||
lblGameTitle.Text = My.Resources.frmMain_NoGameDetected
|
lblGameTitle.Text = frmMain_NoGameDetected
|
||||||
lblStatus1.Text = String.Empty
|
lblStatus1.Text = String.Empty
|
||||||
lblStatus2.Text = String.Empty
|
lblStatus2.Text = String.Empty
|
||||||
lblStatus3.Text = String.Empty
|
lblStatus3.Text = String.Empty
|
||||||
@@ -367,9 +369,9 @@ Public Class frmMain
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If eCurrentStatus = eStatus.Stopped Then
|
If eCurrentStatus = eStatus.Stopped Then
|
||||||
UpdateStatus(My.Resources.frmMain_NotScanning)
|
UpdateStatus(frmMain_NotScanning)
|
||||||
Else
|
Else
|
||||||
UpdateStatus(My.Resources.frmMain_NoGameDetected)
|
UpdateStatus(frmMain_NoGameDetected)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -382,7 +384,7 @@ Public Class frmMain
|
|||||||
Else
|
Else
|
||||||
pbTime.Visible = False
|
pbTime.Visible = False
|
||||||
lblTimeSpent.Visible = False
|
lblTimeSpent.Visible = False
|
||||||
pbIcon.Image = My.Resources.Working
|
pbIcon.Image = Working
|
||||||
lblGameTitle.Text = sTitle
|
lblGameTitle.Text = sTitle
|
||||||
lblStatus1.Text = sStatus1
|
lblStatus1.Text = sStatus1
|
||||||
lblStatus2.Text = sStatus2
|
lblStatus2.Text = sStatus2
|
||||||
@@ -404,11 +406,11 @@ Public Class frmMain
|
|||||||
If bMulti Then
|
If bMulti Then
|
||||||
bAllowIcon = False
|
bAllowIcon = False
|
||||||
bAllowDetails = False
|
bAllowDetails = False
|
||||||
lblGameTitle.Text = My.Resources.frmMain_MultipleGames
|
lblGameTitle.Text = frmMain_MultipleGames
|
||||||
pbTime.Visible = False
|
pbTime.Visible = False
|
||||||
lblTimeSpent.Visible = False
|
lblTimeSpent.Visible = False
|
||||||
pbIcon.Image = My.Resources.Unknown
|
pbIcon.Image = Unknown
|
||||||
lblStatus1.Text = My.Resources.frmMain_NoDetails
|
lblStatus1.Text = frmMain_NoDetails
|
||||||
Else
|
Else
|
||||||
bAllowIcon = True
|
bAllowIcon = True
|
||||||
bAllowDetails = True
|
bAllowDetails = True
|
||||||
@@ -424,7 +426,7 @@ Public Class frmMain
|
|||||||
sCompanyName = oProcess.FoundProcess.MainModule.FileVersionInfo.CompanyName
|
sCompanyName = oProcess.FoundProcess.MainModule.FileVersionInfo.CompanyName
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
pbIcon.Image = My.Resources.Unknown
|
pbIcon.Image = Unknown
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
'Check for a custom icon & details
|
'Check for a custom icon & details
|
||||||
@@ -433,7 +435,7 @@ Public Class frmMain
|
|||||||
End If
|
End If
|
||||||
If sFileName = String.Empty Then
|
If sFileName = String.Empty Then
|
||||||
If oProcess.GameInfo.ProcessPath <> String.Empty Then
|
If oProcess.GameInfo.ProcessPath <> String.Empty Then
|
||||||
sFileName = mgrCommon.FormatString(My.Resources.frmMain_ExePath, oProcess.GameInfo.ProcessPath)
|
sFileName = mgrCommon.FormatString(frmMain_ExePath, oProcess.GameInfo.ProcessPath)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If oProcess.GameInfo.Version <> String.Empty Then
|
If oProcess.GameInfo.Version <> String.Empty Then
|
||||||
@@ -453,19 +455,19 @@ Public Class frmMain
|
|||||||
|
|
||||||
'Set Details
|
'Set Details
|
||||||
If sFileName = String.Empty Then
|
If sFileName = String.Empty Then
|
||||||
lblStatus1.Text = My.Resources.frmMain_NotAvailable
|
lblStatus1.Text = frmMain_NotAvailable
|
||||||
Else
|
Else
|
||||||
lblStatus1.Text = sFileName
|
lblStatus1.Text = sFileName
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If sCompanyName = String.Empty Then
|
If sCompanyName = String.Empty Then
|
||||||
lblStatus2.Text = My.Resources.frmMain_NotAvailable
|
lblStatus2.Text = frmMain_NotAvailable
|
||||||
Else
|
Else
|
||||||
lblStatus2.Text = sCompanyName
|
lblStatus2.Text = sCompanyName
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If sFileVersion = String.Empty Then
|
If sFileVersion = String.Empty Then
|
||||||
lblStatus3.Text = My.Resources.frmMain_NotAvailable
|
lblStatus3.Text = frmMain_NotAvailable
|
||||||
Else
|
Else
|
||||||
lblStatus3.Text = sFileVersion
|
lblStatus3.Text = sFileVersion
|
||||||
End If
|
End If
|
||||||
@@ -484,15 +486,15 @@ Public Class frmMain
|
|||||||
Dim sSessionTime As String
|
Dim sSessionTime As String
|
||||||
|
|
||||||
If dTotalTime < 1 Then
|
If dTotalTime < 1 Then
|
||||||
sTotalTime = mgrCommon.FormatString(My.Resources.frmMain_SessionMinutes, Math.Round((dTotalTime * 100) * 0.6).ToString)
|
sTotalTime = mgrCommon.FormatString(frmMain_SessionMinutes, Math.Round((dTotalTime * 100) * 0.6).ToString)
|
||||||
Else
|
Else
|
||||||
sTotalTime = mgrCommon.FormatString(My.Resources.frmMain_SessionHours, Math.Round(dTotalTime, 1).ToString)
|
sTotalTime = mgrCommon.FormatString(frmMain_SessionHours, Math.Round(dTotalTime, 1).ToString)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If dSessionTime < 1 Then
|
If dSessionTime < 1 Then
|
||||||
sSessionTime = mgrCommon.FormatString(My.Resources.frmMain_SessionMinutes, Math.Round((dSessionTime * 100) * 0.6).ToString)
|
sSessionTime = mgrCommon.FormatString(frmMain_SessionMinutes, Math.Round((dSessionTime * 100) * 0.6).ToString)
|
||||||
Else
|
Else
|
||||||
sSessionTime = mgrCommon.FormatString(My.Resources.frmMain_SessionHours, Math.Round(dSessionTime, 1).ToString)
|
sSessionTime = mgrCommon.FormatString(frmMain_SessionHours, Math.Round(dSessionTime, 1).ToString)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If dSessionTime > 0 Then
|
If dSessionTime > 0 Then
|
||||||
@@ -548,9 +550,9 @@ Public Class frmMain
|
|||||||
Dim sVersion As String = My.Application.Info.Version.Major & "." & My.Application.Info.Version.Minor
|
Dim sVersion As String = My.Application.Info.Version.Major & "." & My.Application.Info.Version.Minor
|
||||||
Dim sProcessType = [Enum].GetName(GetType(System.Reflection.ProcessorArchitecture), iProcessType)
|
Dim sProcessType = [Enum].GetName(GetType(System.Reflection.ProcessorArchitecture), iProcessType)
|
||||||
Dim sRevision As String = My.Application.Info.Version.Build & "." & My.Application.Info.Version.Revision
|
Dim sRevision As String = My.Application.Info.Version.Build & "." & My.Application.Info.Version.Revision
|
||||||
Dim sConstCopyright As String = Chr(169) & My.Resources.App_Copyright
|
Dim sConstCopyright As String = Chr(169) & App_Copyright
|
||||||
|
|
||||||
mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmMain_About, New String() {sVersion, sProcessType, sRevision, sConstCopyright}), MsgBoxStyle.Information)
|
mgrCommon.ShowMessage(frmMain_About, New String() {sVersion, sProcessType, sRevision, sConstCopyright}, MsgBoxStyle.Information)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OpenTags()
|
Private Sub OpenTags()
|
||||||
@@ -648,7 +650,7 @@ Public Class frmMain
|
|||||||
'Load Monitor List
|
'Load Monitor List
|
||||||
hshScanList = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.ScanList)
|
hshScanList = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.ScanList)
|
||||||
|
|
||||||
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_GameListLoaded, hshScanList.Keys.Count), False)
|
UpdateLog(mgrCommon.FormatString(frmMain_GameListLoaded, hshScanList.Keys.Count), False)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub StartSyncWatcher()
|
Private Sub StartSyncWatcher()
|
||||||
@@ -673,7 +675,7 @@ Public Class frmMain
|
|||||||
|
|
||||||
Private Sub HandleSyncWatcher() Handles oFileWatcher.Changed
|
Private Sub HandleSyncWatcher() Handles oFileWatcher.Changed
|
||||||
If oSettings.Sync Then
|
If oSettings.Sync Then
|
||||||
UpdateLog(My.Resources.frmMain_MasterListChanged, False, ToolTipIcon.Info, True)
|
UpdateLog(frmMain_MasterListChanged, False, ToolTipIcon.Info, True)
|
||||||
SyncGameSettings()
|
SyncGameSettings()
|
||||||
LoadGameSettings()
|
LoadGameSettings()
|
||||||
CheckForNewBackups()
|
CheckForNewBackups()
|
||||||
@@ -699,7 +701,7 @@ Public Class frmMain
|
|||||||
|
|
||||||
'The application cannot continue if this fails
|
'The application cannot continue if this fails
|
||||||
If Not oBackup.CheckForUtilities(mgrPath.Utility7zLocation) Then
|
If Not oBackup.CheckForUtilities(mgrPath.Utility7zLocation) Then
|
||||||
mgrCommon.ShowMessage(My.Resources.frmMain_Error7zip, MsgBoxStyle.Critical)
|
mgrCommon.ShowMessage(frmMain_Error7zip, MsgBoxStyle.Critical)
|
||||||
bShutdown = True
|
bShutdown = True
|
||||||
Me.Close()
|
Me.Close()
|
||||||
End If
|
End If
|
||||||
@@ -735,7 +737,7 @@ Public Class frmMain
|
|||||||
'Verify the "Start with Windows" setting
|
'Verify the "Start with Windows" setting
|
||||||
If oSettings.StartWithWindows Then
|
If oSettings.StartWithWindows Then
|
||||||
If Not VerifyStartWithWindows() Then
|
If Not VerifyStartWithWindows() Then
|
||||||
UpdateLog(My.Resources.frmMain_ErrorAppLocationChanged, False, ToolTipIcon.Info)
|
UpdateLog(frmMain_ErrorAppLocationChanged, False, ToolTipIcon.Info)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -747,14 +749,14 @@ Public Class frmMain
|
|||||||
txtLog.Visible = True
|
txtLog.Visible = True
|
||||||
Me.Size = New System.Drawing.Size(540, 425)
|
Me.Size = New System.Drawing.Size(540, 425)
|
||||||
bLogToggle = True
|
bLogToggle = True
|
||||||
btnLogToggle.Text = My.Resources.frmMain_btnToggleLog_Hide
|
btnLogToggle.Text = frmMain_btnToggleLog_Hide
|
||||||
txtLog.Select(txtLog.TextLength, 0)
|
txtLog.Select(txtLog.TextLength, 0)
|
||||||
txtLog.ScrollToCaret()
|
txtLog.ScrollToCaret()
|
||||||
Else
|
Else
|
||||||
txtLog.Visible = False
|
txtLog.Visible = False
|
||||||
Me.Size = New System.Drawing.Size(540, 245)
|
Me.Size = New System.Drawing.Size(540, 245)
|
||||||
bLogToggle = False
|
bLogToggle = False
|
||||||
btnLogToggle.Text = My.Resources.frmMain_btnToggleLog_Show
|
btnLogToggle.Text = frmMain_btnToggleLog_Show
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -780,18 +782,18 @@ Public Class frmMain
|
|||||||
Dim sGame As String = oProcess.GameInfo.CroppedName
|
Dim sGame As String = oProcess.GameInfo.CroppedName
|
||||||
|
|
||||||
If bProcessIsAdmin Then
|
If bProcessIsAdmin Then
|
||||||
mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmMain_ErrorAdminDetect, sGame), MsgBoxStyle.Exclamation)
|
mgrCommon.ShowMessage(frmMain_ErrorAdminDetect, sGame, MsgBoxStyle.Exclamation)
|
||||||
RestartAsAdmin()
|
RestartAsAdmin()
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If oProcess.Duplicate Then
|
If oProcess.Duplicate Then
|
||||||
sGame = My.Resources.frmMain_UnknownGame
|
sGame = frmMain_UnknownGame
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmMain_ConfirmMonitorCancel, sGame), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(frmMain_ConfirmMonitorCancel, sGame, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_MonitorCancel, sGame), False)
|
UpdateLog(mgrCommon.FormatString(frmMain_MonitorCancel, sGame), False)
|
||||||
SetLastAction(mgrCommon.FormatString(My.Resources.frmMain_MonitorCancel, sGame))
|
SetLastAction(mgrCommon.FormatString(frmMain_MonitorCancel, sGame))
|
||||||
|
|
||||||
bwMonitor.CancelAsync()
|
bwMonitor.CancelAsync()
|
||||||
StopScan()
|
StopScan()
|
||||||
@@ -811,7 +813,7 @@ Public Class frmMain
|
|||||||
Dim bClose As Boolean = False
|
Dim bClose As Boolean = False
|
||||||
|
|
||||||
If bPrompt Then
|
If bPrompt Then
|
||||||
If mgrCommon.ShowMessage(My.Resources.frmMain_Exit, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(frmMain_Exit, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
bClose = True
|
bClose = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -890,14 +892,14 @@ Public Class frmMain
|
|||||||
Private Sub ToggleMenuText()
|
Private Sub ToggleMenuText()
|
||||||
Select Case eCurrentStatus
|
Select Case eCurrentStatus
|
||||||
Case eStatus.Running
|
Case eStatus.Running
|
||||||
gMonFileMonitor.Text = My.Resources.frmMain_gMonFileMonitor_Stop
|
gMonFileMonitor.Text = frmMain_gMonFileMonitor_Stop
|
||||||
gMonTrayMon.Text = My.Resources.frmMain_gMonFileMonitor_Stop
|
gMonTrayMon.Text = frmMain_gMonFileMonitor_Stop
|
||||||
Case eStatus.Stopped
|
Case eStatus.Stopped
|
||||||
gMonFileMonitor.Text = My.Resources.frmMain_gMonFileMonitor_Start
|
gMonFileMonitor.Text = frmMain_gMonFileMonitor_Start
|
||||||
gMonTrayMon.Text = My.Resources.frmMain_gMonFileMonitor_Start
|
gMonTrayMon.Text = frmMain_gMonFileMonitor_Start
|
||||||
Case eStatus.Paused
|
Case eStatus.Paused
|
||||||
gMonFileMonitor.Text = My.Resources.frmMain_gMonFileMonitor_Cancel
|
gMonFileMonitor.Text = frmMain_gMonFileMonitor_Cancel
|
||||||
gMonTrayMon.Text = My.Resources.frmMain_gMonFileMonitor_Cancel
|
gMonTrayMon.Text = frmMain_gMonFileMonitor_Cancel
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -949,61 +951,61 @@ Public Class frmMain
|
|||||||
|
|
||||||
Private Sub SetForm()
|
Private Sub SetForm()
|
||||||
'Set Form Name
|
'Set Form Name
|
||||||
Me.Name = My.Resources.App_NameLong
|
Me.Name = App_NameLong
|
||||||
|
|
||||||
'Set Menu Text
|
'Set Menu Text
|
||||||
gMonFile.Text = My.Resources.frmMain_gMonFile
|
gMonFile.Text = frmMain_gMonFile
|
||||||
gMonFileMonitor.Text = My.Resources.frmMain_gMonFileMonitor_Start
|
gMonFileMonitor.Text = frmMain_gMonFileMonitor_Start
|
||||||
gMonFileSettings.Text = My.Resources.frmMain_gMonFileSettings
|
gMonFileSettings.Text = frmMain_gMonFileSettings
|
||||||
gMonFileExit.Text = My.Resources.frmMain_gMonFileExit
|
gMonFileExit.Text = frmMain_gMonFileExit
|
||||||
gMonSetup.Text = My.Resources.frmMain_gMonSetup
|
gMonSetup.Text = frmMain_gMonSetup
|
||||||
gMonSetupGameManager.Text = My.Resources.frmMain_gMonSetupGameManager
|
gMonSetupGameManager.Text = frmMain_gMonSetupGameManager
|
||||||
gMonSetupAddWizard.Text = My.Resources.frmMain_gMonSetupAddWizard
|
gMonSetupAddWizard.Text = frmMain_gMonSetupAddWizard
|
||||||
gMonSetupCustomVariables.Text = My.Resources.frmMain_gMonSetupCustomVariables
|
gMonSetupCustomVariables.Text = frmMain_gMonSetupCustomVariables
|
||||||
gMonSetupTags.Text = My.Resources.frmMain_gMonSetupTags
|
gMonSetupTags.Text = frmMain_gMonSetupTags
|
||||||
gMonTools.Text = My.Resources.frmMain_gMonTools
|
gMonTools.Text = frmMain_gMonTools
|
||||||
gMonToolsCleanMan.Text = My.Resources.frmMain_gMonToolsCleanMan
|
gMonToolsCleanMan.Text = frmMain_gMonToolsCleanMan
|
||||||
gMonToolsCompact.Text = My.Resources.frmMain_gMonToolsCompact
|
gMonToolsCompact.Text = frmMain_gMonToolsCompact
|
||||||
gMonHelp.Text = My.Resources.frmMain_gMonHelp
|
gMonHelp.Text = frmMain_gMonHelp
|
||||||
gMonHelpWebSite.Text = My.Resources.frmMain_gMonHelpWebSite
|
gMonHelpWebSite.Text = frmMain_gMonHelpWebSite
|
||||||
gMonHelpManual.Text = My.Resources.frmMain_gMonHelpManual
|
gMonHelpManual.Text = frmMain_gMonHelpManual
|
||||||
gMonHelpCheckforUpdates.Text = My.Resources.frmMain_gMonHelpCheckForUpdates
|
gMonHelpCheckforUpdates.Text = frmMain_gMonHelpCheckForUpdates
|
||||||
gMonHelpAbout.Text = My.Resources.frmMain_gMonHelpAbout
|
gMonHelpAbout.Text = frmMain_gMonHelpAbout
|
||||||
|
|
||||||
'Set Tray Menu Text
|
'Set Tray Menu Text
|
||||||
gMonTrayShow.Text = My.Resources.frmMain_gMonTrayShow
|
gMonTrayShow.Text = frmMain_gMonTrayShow
|
||||||
gMonTrayMon.Text = My.Resources.frmMain_gMonFileMonitor_Start
|
gMonTrayMon.Text = frmMain_gMonFileMonitor_Start
|
||||||
gMonTraySettings.Text = My.Resources.frmMain_gMonFileSettings
|
gMonTraySettings.Text = frmMain_gMonFileSettings
|
||||||
gMonTraySetup.Text = My.Resources.frmMain_gMonSetup
|
gMonTraySetup.Text = frmMain_gMonSetup
|
||||||
gMonTraySetupGameManager.Text = My.Resources.frmMain_gMonSetupGameManager
|
gMonTraySetupGameManager.Text = frmMain_gMonSetupGameManager
|
||||||
gMonTraySetupAddWizard.Text = My.Resources.frmMain_gMonSetupAddWizard
|
gMonTraySetupAddWizard.Text = frmMain_gMonSetupAddWizard
|
||||||
gMonTraySetupCustomVariables.Text = My.Resources.frmMain_gMonSetupCustomVariables
|
gMonTraySetupCustomVariables.Text = frmMain_gMonSetupCustomVariables
|
||||||
gMonTraySetupTags.Text = My.Resources.frmMain_gMonSetupTags
|
gMonTraySetupTags.Text = frmMain_gMonSetupTags
|
||||||
gMonTrayTools.Text = My.Resources.frmMain_gMonTools
|
gMonTrayTools.Text = frmMain_gMonTools
|
||||||
gMonTrayToolsCleanMan.Text = My.Resources.frmMain_gMonToolsCleanMan
|
gMonTrayToolsCleanMan.Text = frmMain_gMonToolsCleanMan
|
||||||
gMonTrayToolsCompact.Text = My.Resources.frmMain_gMonToolsCompact
|
gMonTrayToolsCompact.Text = frmMain_gMonToolsCompact
|
||||||
gMonTrayExit.Text = My.Resources.frmMain_gMonFileExit
|
gMonTrayExit.Text = frmMain_gMonFileExit
|
||||||
|
|
||||||
'Set Form Text
|
'Set Form Text
|
||||||
lblLastActionTitle.Text = My.Resources.frmMain_lblLastActionTitle
|
lblLastActionTitle.Text = frmMain_lblLastActionTitle
|
||||||
btnCancelOperation.Text = My.Resources.frmMain_btnCancelOperation
|
btnCancelOperation.Text = frmMain_btnCancelOperation
|
||||||
gMonStripStatusButton.Text = My.Resources.frmMain_gMonStripStatusButton
|
gMonStripStatusButton.Text = frmMain_gMonStripStatusButton
|
||||||
gMonStripStatusButton.ToolTipText = My.Resources.frmMain_gMonStripStatusButtonToolTip
|
gMonStripStatusButton.ToolTipText = frmMain_gMonStripStatusButtonToolTip
|
||||||
|
|
||||||
If mgrCommon.IsElevated Then
|
If mgrCommon.IsElevated Then
|
||||||
gMonStripAdminButton.Image = My.Resources.Admin
|
gMonStripAdminButton.Image = Admin
|
||||||
gMonStripAdminButton.ToolTipText = My.Resources.frmMain_RunningAsAdmin
|
gMonStripAdminButton.ToolTipText = frmMain_RunningAsAdmin
|
||||||
|
|
||||||
Else
|
Else
|
||||||
gMonStripAdminButton.Image = My.Resources.User
|
gMonStripAdminButton.Image = User
|
||||||
gMonStripAdminButton.ToolTipText = My.Resources.frmMain_RunningAsNormal
|
gMonStripAdminButton.ToolTipText = frmMain_RunningAsNormal
|
||||||
End If
|
End If
|
||||||
btnCancelOperation.Visible = False
|
btnCancelOperation.Visible = False
|
||||||
txtLog.Visible = False
|
txtLog.Visible = False
|
||||||
lblLastActionTitle.Visible = False
|
lblLastActionTitle.Visible = False
|
||||||
lblLastAction.Text = String.Empty
|
lblLastAction.Text = String.Empty
|
||||||
pbTime.SizeMode = PictureBoxSizeMode.AutoSize
|
pbTime.SizeMode = PictureBoxSizeMode.AutoSize
|
||||||
pbTime.Image = My.Resources.Clock
|
pbTime.Image = Clock
|
||||||
Me.Size = New System.Drawing.Size(540, 245)
|
Me.Size = New System.Drawing.Size(540, 245)
|
||||||
AddHandler mgrMonitorList.UpdateLog, AddressOf UpdateLog
|
AddHandler mgrMonitorList.UpdateLog, AddressOf UpdateLog
|
||||||
ResetGameInfo()
|
ResetGameInfo()
|
||||||
@@ -1020,16 +1022,16 @@ Public Class frmMain
|
|||||||
StopSyncWatcher()
|
StopSyncWatcher()
|
||||||
tmScanTimer.Stop()
|
tmScanTimer.Stop()
|
||||||
eCurrentStatus = eStatus.Stopped
|
eCurrentStatus = eStatus.Stopped
|
||||||
UpdateStatus(My.Resources.frmMain_NotScanning)
|
UpdateStatus(frmMain_NotScanning)
|
||||||
gMonStripStatusButton.Image = My.Resources.Stopped
|
gMonStripStatusButton.Image = Stopped
|
||||||
gMonTray.Icon = My.Resources.GBM_Tray_Stopped
|
gMonTray.Icon = GBM_Tray_Stopped
|
||||||
Else
|
Else
|
||||||
StartScan()
|
StartScan()
|
||||||
StartSyncWatcher()
|
StartSyncWatcher()
|
||||||
eCurrentStatus = eStatus.Running
|
eCurrentStatus = eStatus.Running
|
||||||
UpdateStatus(My.Resources.frmMain_NoGameDetected)
|
UpdateStatus(frmMain_NoGameDetected)
|
||||||
gMonStripStatusButton.Image = My.Resources.Ready
|
gMonStripStatusButton.Image = Ready
|
||||||
gMonTray.Icon = My.Resources.GBM_Tray_Ready
|
gMonTray.Icon = GBM_Tray_Ready
|
||||||
End If
|
End If
|
||||||
ToggleMenuText()
|
ToggleMenuText()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1039,9 +1041,9 @@ Public Class frmMain
|
|||||||
StopSyncWatcher()
|
StopSyncWatcher()
|
||||||
tmScanTimer.Stop()
|
tmScanTimer.Stop()
|
||||||
eCurrentStatus = eStatus.Paused
|
eCurrentStatus = eStatus.Paused
|
||||||
UpdateStatus(My.Resources.frmMain_NotScanning)
|
UpdateStatus(frmMain_NotScanning)
|
||||||
gMonStripStatusButton.Image = My.Resources.Detected
|
gMonStripStatusButton.Image = Detected
|
||||||
gMonTray.Icon = My.Resources.GBM_Tray_Detected
|
gMonTray.Icon = GBM_Tray_Detected
|
||||||
End If
|
End If
|
||||||
ToggleMenuText()
|
ToggleMenuText()
|
||||||
ToggleMenuEnable()
|
ToggleMenuEnable()
|
||||||
@@ -1052,9 +1054,9 @@ Public Class frmMain
|
|||||||
StartScan()
|
StartScan()
|
||||||
StartSyncWatcher()
|
StartSyncWatcher()
|
||||||
eCurrentStatus = eStatus.Running
|
eCurrentStatus = eStatus.Running
|
||||||
gMonStripStatusButton.Image = My.Resources.Ready
|
gMonStripStatusButton.Image = Ready
|
||||||
gMonTray.Icon = My.Resources.GBM_Tray_Ready
|
gMonTray.Icon = GBM_Tray_Ready
|
||||||
UpdateStatus(My.Resources.frmMain_NoGameDetected)
|
UpdateStatus(frmMain_NoGameDetected)
|
||||||
End If
|
End If
|
||||||
ToggleMenuText()
|
ToggleMenuText()
|
||||||
ToggleMenuEnable()
|
ToggleMenuEnable()
|
||||||
@@ -1064,9 +1066,9 @@ Public Class frmMain
|
|||||||
StopSyncWatcher()
|
StopSyncWatcher()
|
||||||
tmScanTimer.Stop()
|
tmScanTimer.Stop()
|
||||||
eCurrentStatus = eStatus.Stopped
|
eCurrentStatus = eStatus.Stopped
|
||||||
UpdateStatus(My.Resources.frmMain_NotScanning)
|
UpdateStatus(frmMain_NotScanning)
|
||||||
gMonStripStatusButton.Image = My.Resources.Stopped
|
gMonStripStatusButton.Image = Stopped
|
||||||
gMonTray.Icon = My.Resources.GBM_Tray_Stopped
|
gMonTray.Icon = GBM_Tray_Stopped
|
||||||
ToggleMenuText()
|
ToggleMenuText()
|
||||||
ToggleMenuEnable()
|
ToggleMenuEnable()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1075,7 +1077,7 @@ Public Class frmMain
|
|||||||
Private Sub VerifyCustomPathVariables()
|
Private Sub VerifyCustomPathVariables()
|
||||||
Dim sGames As String = String.Empty
|
Dim sGames As String = String.Empty
|
||||||
If Not mgrPath.VerifyCustomVariables(hshScanList, sGames) Then
|
If Not mgrPath.VerifyCustomVariables(hshScanList, sGames) Then
|
||||||
mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmMain_ErrorCustomVariable, sGames), MsgBoxStyle.Exclamation)
|
mgrCommon.ShowMessage(frmMain_ErrorCustomVariable, sGames, MsgBoxStyle.Exclamation)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1103,7 +1105,7 @@ Public Class frmMain
|
|||||||
Try
|
Try
|
||||||
IO.Directory.CreateDirectory(sSettingsRoot)
|
IO.Directory.CreateDirectory(sSettingsRoot)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmMain_ErrorSettingsFolder, ex.Message), MsgBoxStyle.Critical)
|
mgrCommon.ShowMessage(frmMain_ErrorSettingsFolder, ex.Message, MsgBoxStyle.Critical)
|
||||||
bShutdown = True
|
bShutdown = True
|
||||||
Me.Close()
|
Me.Close()
|
||||||
End Try
|
End Try
|
||||||
@@ -1119,9 +1121,9 @@ Public Class frmMain
|
|||||||
If Not oDatabase.CheckDBVer(iDBVer) Then
|
If Not oDatabase.CheckDBVer(iDBVer) Then
|
||||||
Select Case iDB
|
Select Case iDB
|
||||||
Case mgrSQLite.Database.Local
|
Case mgrSQLite.Database.Local
|
||||||
mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmMain_ErrorDBVerLocal, New String() {iDBVer, mgrCommon.AppVersion}), MsgBoxStyle.Critical)
|
mgrCommon.ShowMessage(frmMain_ErrorDBVerLocal, New String() {iDBVer, mgrCommon.AppVersion}, MsgBoxStyle.Critical)
|
||||||
Case mgrSQLite.Database.Remote
|
Case mgrSQLite.Database.Remote
|
||||||
mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmMain_ErrorDBVerRemote, New String() {iDBVer, mgrCommon.AppVersion}), MsgBoxStyle.Critical)
|
mgrCommon.ShowMessage(frmMain_ErrorDBVerRemote, New String() {iDBVer, mgrCommon.AppVersion}, MsgBoxStyle.Critical)
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
bShutdown = True
|
bShutdown = True
|
||||||
@@ -1170,9 +1172,9 @@ Public Class frmMain
|
|||||||
'Functions to handle other features
|
'Functions to handle other features
|
||||||
Private Sub RestartAsAdmin()
|
Private Sub RestartAsAdmin()
|
||||||
If mgrCommon.IsElevated Then
|
If mgrCommon.IsElevated Then
|
||||||
mgrCommon.ShowMessage(My.Resources.frmMain_ErrorAlreadyAdmin, MsgBoxStyle.Information)
|
mgrCommon.ShowMessage(frmMain_ErrorAlreadyAdmin, MsgBoxStyle.Information)
|
||||||
Else
|
Else
|
||||||
If mgrCommon.ShowMessage(My.Resources.frmMain_ConfirmRunAsAdmin, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(frmMain_ConfirmRunAsAdmin, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
mgrCommon.RestartAsAdmin()
|
mgrCommon.RestartAsAdmin()
|
||||||
bShutdown = True
|
bShutdown = True
|
||||||
ShutdownApp(False)
|
ShutdownApp(False)
|
||||||
@@ -1185,17 +1187,17 @@ Public Class frmMain
|
|||||||
|
|
||||||
PauseScan()
|
PauseScan()
|
||||||
|
|
||||||
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmMain_ConfirmManifestClean), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(frmMain_ConfirmManifestClean, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
|
|
||||||
slItems = mgrRestore.SyncLocalManifest()
|
slItems = mgrRestore.SyncLocalManifest()
|
||||||
|
|
||||||
If slItems.Count > 0 Then
|
If slItems.Count > 0 Then
|
||||||
For Each oItem As clsBackup In slItems.Values
|
For Each oItem As clsBackup In slItems.Values
|
||||||
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_ManifestRemovedEntry, oItem.Name), False)
|
UpdateLog(mgrCommon.FormatString(frmMain_ManifestRemovedEntry, oItem.Name), False)
|
||||||
Next
|
Next
|
||||||
mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmMain_ManifestTotalRemoved, slItems.Count), MsgBoxStyle.Information)
|
mgrCommon.ShowMessage(frmMain_ManifestTotalRemoved, slItems.Count, MsgBoxStyle.Information)
|
||||||
Else
|
Else
|
||||||
mgrCommon.ShowMessage(My.Resources.frmMain_ManifestAreadyClean, MsgBoxStyle.Information)
|
mgrCommon.ShowMessage(frmMain_ManifestAreadyClean, MsgBoxStyle.Information)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1209,18 +1211,18 @@ Public Class frmMain
|
|||||||
|
|
||||||
PauseScan()
|
PauseScan()
|
||||||
|
|
||||||
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmMain_ConfirmRebuild), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(frmMain_ConfirmRebuild, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
|
|
||||||
oLocalDatabase = New mgrSQLite(mgrSQLite.Database.Local)
|
oLocalDatabase = New mgrSQLite(mgrSQLite.Database.Local)
|
||||||
oRemoteDatabase = New mgrSQLite(mgrSQLite.Database.Remote)
|
oRemoteDatabase = New mgrSQLite(mgrSQLite.Database.Remote)
|
||||||
|
|
||||||
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_LocalCompactInit, oLocalDatabase.GetDBSize), False)
|
UpdateLog(mgrCommon.FormatString(frmMain_LocalCompactInit, oLocalDatabase.GetDBSize), False)
|
||||||
oLocalDatabase.CompactDatabase()
|
oLocalDatabase.CompactDatabase()
|
||||||
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_LocalCompactComplete, oLocalDatabase.GetDBSize), False)
|
UpdateLog(mgrCommon.FormatString(frmMain_LocalCompactComplete, oLocalDatabase.GetDBSize), False)
|
||||||
|
|
||||||
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_RemoteCompactInit, oRemoteDatabase.GetDBSize), False)
|
UpdateLog(mgrCommon.FormatString(frmMain_RemoteCompactInit, oRemoteDatabase.GetDBSize), False)
|
||||||
oRemoteDatabase.CompactDatabase()
|
oRemoteDatabase.CompactDatabase()
|
||||||
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_RemoteCompactComplete, oRemoteDatabase.GetDBSize), False)
|
UpdateLog(mgrCommon.FormatString(frmMain_RemoteCompactComplete, oRemoteDatabase.GetDBSize), False)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ResumeScan()
|
ResumeScan()
|
||||||
@@ -1356,12 +1358,12 @@ Public Class frmMain
|
|||||||
bContinue = False
|
bContinue = False
|
||||||
If iErrorCode = 5 Then
|
If iErrorCode = 5 Then
|
||||||
If oProcess.Duplicate Then
|
If oProcess.Duplicate Then
|
||||||
sErrorMessage = mgrCommon.FormatString(My.Resources.frmMain_ErrorMultiAdmin)
|
sErrorMessage = mgrCommon.FormatString(frmMain_ErrorMultiAdmin)
|
||||||
mgrCommon.ShowMessage(sErrorMessage, MsgBoxStyle.Exclamation)
|
mgrCommon.ShowMessage(sErrorMessage, MsgBoxStyle.Exclamation)
|
||||||
bAskForRestart = True
|
bAskForRestart = True
|
||||||
Else
|
Else
|
||||||
If Not CheckForSavedPath() Then
|
If Not CheckForSavedPath() Then
|
||||||
sErrorMessage = mgrCommon.FormatString(My.Resources.frmMain_ErrorAdminBackup, oProcess.GameInfo.Name)
|
sErrorMessage = mgrCommon.FormatString(frmMain_ErrorAdminBackup, oProcess.GameInfo.Name)
|
||||||
oProcess.GameInfo.ProcessPath = mgrPath.ProcessPathSearch(oProcess.GameInfo.Name, oProcess.GameInfo.ProcessName, sErrorMessage)
|
oProcess.GameInfo.ProcessPath = mgrPath.ProcessPathSearch(oProcess.GameInfo.Name, oProcess.GameInfo.ProcessName, sErrorMessage)
|
||||||
If oProcess.GameInfo.ProcessPath <> String.Empty Then
|
If oProcess.GameInfo.ProcessPath <> String.Empty Then
|
||||||
'Update and reload
|
'Update and reload
|
||||||
@@ -1375,11 +1377,11 @@ Public Class frmMain
|
|||||||
End If
|
End If
|
||||||
ElseIf iErrorCode = 299 Then
|
ElseIf iErrorCode = 299 Then
|
||||||
If oProcess.Duplicate Then
|
If oProcess.Duplicate Then
|
||||||
sErrorMessage = mgrCommon.FormatString(My.Resources.frmMain_ErrorMulti64)
|
sErrorMessage = mgrCommon.FormatString(frmMain_ErrorMulti64)
|
||||||
mgrCommon.ShowMessage(sErrorMessage, MsgBoxStyle.Exclamation)
|
mgrCommon.ShowMessage(sErrorMessage, MsgBoxStyle.Exclamation)
|
||||||
Else
|
Else
|
||||||
If Not CheckForSavedPath() Then
|
If Not CheckForSavedPath() Then
|
||||||
sErrorMessage = mgrCommon.FormatString(My.Resources.frmMain_Error64Backup, oProcess.GameInfo.Name)
|
sErrorMessage = mgrCommon.FormatString(frmMain_Error64Backup, oProcess.GameInfo.Name)
|
||||||
oProcess.GameInfo.ProcessPath = mgrPath.ProcessPathSearch(oProcess.GameInfo.Name, oProcess.GameInfo.ProcessName, sErrorMessage)
|
oProcess.GameInfo.ProcessPath = mgrPath.ProcessPathSearch(oProcess.GameInfo.Name, oProcess.GameInfo.ProcessName, sErrorMessage)
|
||||||
If oProcess.GameInfo.ProcessPath <> String.Empty Then
|
If oProcess.GameInfo.ProcessPath <> String.Empty Then
|
||||||
'Update and reload
|
'Update and reload
|
||||||
@@ -1397,12 +1399,12 @@ Public Class frmMain
|
|||||||
If bContinue = True Then
|
If bContinue = True Then
|
||||||
CheckForSavedDuplicate()
|
CheckForSavedDuplicate()
|
||||||
If oProcess.Duplicate Then
|
If oProcess.Duplicate Then
|
||||||
UpdateLog(My.Resources.frmMain_MultipleGamesDetected, oSettings.ShowDetectionToolTips)
|
UpdateLog(frmMain_MultipleGamesDetected, oSettings.ShowDetectionToolTips)
|
||||||
UpdateStatus(My.Resources.frmMain_MultipleGamesDetected)
|
UpdateStatus(frmMain_MultipleGamesDetected)
|
||||||
SetGameInfo(True)
|
SetGameInfo(True)
|
||||||
Else
|
Else
|
||||||
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_GameDetected, oProcess.GameInfo.Name), oSettings.ShowDetectionToolTips)
|
UpdateLog(mgrCommon.FormatString(frmMain_GameDetected, oProcess.GameInfo.Name), oSettings.ShowDetectionToolTips)
|
||||||
UpdateStatus(mgrCommon.FormatString(My.Resources.frmMain_GameDetected, oProcess.GameInfo.CroppedName))
|
UpdateStatus(mgrCommon.FormatString(frmMain_GameDetected, oProcess.GameInfo.CroppedName))
|
||||||
SetGameInfo()
|
SetGameInfo()
|
||||||
End If
|
End If
|
||||||
oProcess.StartTime = Now
|
oProcess.StartTime = Now
|
||||||
@@ -1436,11 +1438,11 @@ Public Class frmMain
|
|||||||
|
|
||||||
If Not bCancelledByUser Then
|
If Not bCancelledByUser Then
|
||||||
If DoMultiGameCheck() Then
|
If DoMultiGameCheck() Then
|
||||||
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_GameEnded, oProcess.GameInfo.Name), False)
|
UpdateLog(mgrCommon.FormatString(frmMain_GameEnded, oProcess.GameInfo.Name), False)
|
||||||
If oSettings.TimeTracking Then HandleTimeSpent()
|
If oSettings.TimeTracking Then HandleTimeSpent()
|
||||||
RunBackup()
|
RunBackup()
|
||||||
Else
|
Else
|
||||||
UpdateLog(My.Resources.frmMain_UnknownGameEnded, False)
|
UpdateLog(frmMain_UnknownGameEnded, False)
|
||||||
ResetGameInfo()
|
ResetGameInfo()
|
||||||
ResumeScan()
|
ResumeScan()
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -125,9 +125,24 @@ Public Class mgrCommon
|
|||||||
oProcess.Start()
|
oProcess.Start()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
'Handles no extra parameters
|
||||||
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal oType As MsgBoxStyle) As MsgBoxResult
|
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal oType As MsgBoxStyle) As MsgBoxResult
|
||||||
Dim oResult As MsgBoxResult
|
Dim oResult As MsgBoxResult
|
||||||
oResult = MsgBox(sMsg, oType, My.Resources.App_NameLong)
|
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
|
Return oResult
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
Generated
+194
-176
File diff suppressed because it is too large
Load Diff
@@ -673,4 +673,10 @@
|
|||||||
<data name="frmGameManager_XML" xml:space="preserve">
|
<data name="frmGameManager_XML" xml:space="preserve">
|
||||||
<value>XML</value>
|
<value>XML</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="frmGameManager_cmsFile" xml:space="preserve">
|
||||||
|
<value>&File...</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmGameManager_cmsOfficial" xml:space="preserve">
|
||||||
|
<value>&Official List...</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
Reference in New Issue
Block a user