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
|
||||
|
||||
@@ -279,8 +280,8 @@ Public Class frmGameManager
|
||||
End If
|
||||
End If
|
||||
|
||||
sNewPath = mgrCommon.OpenFileBrowser(My.Resources.frmGameManager_ChooseExe, "exe", _
|
||||
My.Resources.frmGameManager_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(My.Resources.frmGameManager_ChooseExePath, 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(My.Resources.frmGameManager_ChooseSaveFolder, 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(My.Resources.frmGameManager_ChooseCustomIcon, "ico", _
|
||||
My.Resources.frmGameManager_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 = mgrCommon.ShowMessage(My.Resources.App_ConfirmDirty, MsgBoxStyle.YesNoCancel)
|
||||
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
|
||||
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorNoBackupExists, MsgBoxStyle.Exclamation)
|
||||
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 & " " & mgrCommon.FormatString(My.Resources.frmGameManager_ItemsExist, iCount)
|
||||
btn.Text = sLabel & " " & mgrCommon.FormatString(frmGameManager_ItemsExist, iCount)
|
||||
Else
|
||||
btn.Text = sLabel & " " & My.Resources.frmGameManager_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, 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
|
||||
CurrentBackupItem.RelativeRestorePath = sRestorePath & "\" & CurrentBackupItem.RestorePath
|
||||
@@ -482,7 +483,7 @@ Public Class frmGameManager
|
||||
If Directory.Exists(sPath) Then
|
||||
Process.Start("explorer.exe", sPath)
|
||||
Else
|
||||
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorNoRestorePathExists, MsgBoxStyle.Exclamation)
|
||||
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 = 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
|
||||
|
||||
btnOpenBackupFile.Enabled = True
|
||||
@@ -534,16 +535,16 @@ Public Class frmGameManager
|
||||
oFileInfo = New FileInfo(sFileName)
|
||||
dFileSize = oFileInfo.Length
|
||||
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
|
||||
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
|
||||
Else
|
||||
txtFileSize.Text = My.Resources.frmGameManager_ErrorNoBackupExists
|
||||
txtFileSize.Text = frmGameManager_ErrorNoBackupExists
|
||||
End If
|
||||
txtRestorePath.Text = CurrentBackupItem.RestorePath
|
||||
Else
|
||||
txtCurrentBackup.Text = My.Resources.frmGameManager_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 = 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
|
||||
txtLocalBackup.Text = My.Resources.frmGameManager_Never
|
||||
txtLocalBackup.Text = frmGameManager_Never
|
||||
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
|
||||
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
|
||||
btnMarkAsRestored.Enabled = False
|
||||
ElseIf txtCurrentBackup.Text <> txtLocalBackup.Text Then
|
||||
lblSync.ForeColor = Color.Red
|
||||
lblSync.Text = My.Resources.frmGameManager_OutofSync
|
||||
lblSync.Text = frmGameManager_OutofSync
|
||||
lblSync.Visible = True
|
||||
btnMarkAsRestored.Enabled = True
|
||||
Else
|
||||
lblSync.ForeColor = Color.Green
|
||||
lblSync.Text = My.Resources.frmGameManager_UpToDate
|
||||
lblSync.Text = frmGameManager_UpToDate
|
||||
lblSync.Visible = True
|
||||
btnMarkAsRestored.Enabled = False
|
||||
End If
|
||||
@@ -583,7 +584,7 @@ Public Class frmGameManager
|
||||
Dim oDir As DirectoryInfo
|
||||
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.Remote)
|
||||
|
||||
@@ -600,7 +601,7 @@ Public Class frmGameManager
|
||||
oDir = New DirectoryInfo(sSubDir)
|
||||
If oDir.GetDirectories.Length > 0 Or oDir.GetFiles.Length > 0 Then
|
||||
'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)
|
||||
End If
|
||||
Else
|
||||
@@ -641,8 +642,8 @@ Public Class frmGameManager
|
||||
chkMonitorOnly.Checked = oApp.MonitorOnly
|
||||
|
||||
'Update Buttons
|
||||
UpdateBuilderButtonLabel(oApp.FileType, My.Resources.frmGameManager_IncludeShortcut, btnInclude, False)
|
||||
UpdateBuilderButtonLabel(oApp.ExcludeList, My.Resources.frmGameManager_ExcludeShortcut, btnExclude, False)
|
||||
UpdateBuilderButtonLabel(oApp.FileType, frmGameManager_IncludeShortcut, btnInclude, False)
|
||||
UpdateBuilderButtonLabel(oApp.ExcludeList, frmGameManager_ExcludeShortcut, btnExclude, False)
|
||||
|
||||
'Extra
|
||||
txtAppPath.Text = oApp.ProcessPath
|
||||
@@ -656,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 = Unknown
|
||||
End If
|
||||
|
||||
'Stats
|
||||
@@ -744,7 +745,7 @@ Public Class frmGameManager
|
||||
WipeControls(grpConfig.Controls)
|
||||
WipeControls(grpExtra.Controls)
|
||||
WipeControls(grpStats.Controls)
|
||||
pbIcon.Image = My.Resources.Unknown
|
||||
pbIcon.Image = Unknown
|
||||
chkEnabled.Enabled = True
|
||||
chkMonitorOnly.Enabled = True
|
||||
btnSave.Enabled = True
|
||||
@@ -762,8 +763,8 @@ Public Class frmGameManager
|
||||
chkMonitorOnly.Checked = False
|
||||
btnTags.Enabled = False
|
||||
lblTags.Visible = False
|
||||
btnInclude.Text = My.Resources.frmGameManager_btnInclude
|
||||
btnExclude.Text = My.Resources.frmGameManager_btnExclude
|
||||
btnInclude.Text = frmGameManager_btnInclude
|
||||
btnExclude.Text = frmGameManager_btnExclude
|
||||
btnImport.Enabled = False
|
||||
btnExport.Enabled = False
|
||||
Case eModes.Edit
|
||||
@@ -820,8 +821,8 @@ Public Class frmGameManager
|
||||
btnBackup.Enabled = False
|
||||
btnTags.Enabled = False
|
||||
lblTags.Visible = False
|
||||
btnInclude.Text = My.Resources.frmGameManager_btnInclude
|
||||
btnExclude.Text = My.Resources.frmGameManager_btnExclude
|
||||
btnInclude.Text = frmGameManager_btnInclude
|
||||
btnExclude.Text = frmGameManager_btnExclude
|
||||
btnImport.Enabled = True
|
||||
btnExport.Enabled = True
|
||||
Case eModes.Disabled
|
||||
@@ -830,7 +831,7 @@ Public Class frmGameManager
|
||||
WipeControls(grpConfig.Controls)
|
||||
WipeControls(grpExtra.Controls)
|
||||
WipeControls(grpStats.Controls)
|
||||
pbIcon.Image = My.Resources.Unknown
|
||||
pbIcon.Image = Unknown
|
||||
lblSync.Visible = False
|
||||
btnSave.Enabled = False
|
||||
btnCancel.Enabled = False
|
||||
@@ -846,8 +847,8 @@ Public Class frmGameManager
|
||||
btnMarkAsRestored.Enabled = False
|
||||
btnTags.Enabled = False
|
||||
lblTags.Visible = False
|
||||
btnInclude.Text = My.Resources.frmGameManager_btnInclude
|
||||
btnExclude.Text = My.Resources.frmGameManager_btnExclude
|
||||
btnInclude.Text = frmGameManager_btnInclude
|
||||
btnExclude.Text = frmGameManager_btnExclude
|
||||
btnImport.Enabled = True
|
||||
btnExport.Enabled = True
|
||||
Case eModes.MultiSelect
|
||||
@@ -855,7 +856,7 @@ Public Class frmGameManager
|
||||
WipeControls(grpConfig.Controls)
|
||||
WipeControls(grpExtra.Controls)
|
||||
WipeControls(grpStats.Controls)
|
||||
pbIcon.Image = My.Resources.Unknown
|
||||
pbIcon.Image = Unknown
|
||||
lblSync.Visible = False
|
||||
btnSave.Enabled = True
|
||||
btnCancel.Enabled = False
|
||||
@@ -977,7 +978,7 @@ Public Class frmGameManager
|
||||
sMonitorIDs.Add(AppData(oData.Key))
|
||||
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
|
||||
mgrMonitorList.DoListUpdateMulti(sMonitorIDs, oApp)
|
||||
eCurrentMode = eModes.Disabled
|
||||
@@ -1003,7 +1004,7 @@ Public Class frmGameManager
|
||||
oData = lstGames.SelectedItems(0)
|
||||
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)
|
||||
LoadData()
|
||||
eCurrentMode = eModes.Disabled
|
||||
@@ -1017,7 +1018,7 @@ Public Class frmGameManager
|
||||
sMonitorIDs.Add(oApp.ID)
|
||||
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)
|
||||
LoadData()
|
||||
eCurrentMode = eModes.Disabled
|
||||
@@ -1039,25 +1040,25 @@ Public Class frmGameManager
|
||||
|
||||
Private Function CoreValidatation(ByVal oApp As clsGame) As Boolean
|
||||
If txtName.Text = String.Empty Then
|
||||
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorValidName, MsgBoxStyle.Exclamation)
|
||||
mgrCommon.ShowMessage(frmGameManager_ErrorValidName, MsgBoxStyle.Exclamation)
|
||||
txtName.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
If txtProcess.Text = String.Empty Then
|
||||
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorValidProcess, MsgBoxStyle.Exclamation)
|
||||
mgrCommon.ShowMessage(frmGameManager_ErrorValidProcess, MsgBoxStyle.Exclamation)
|
||||
txtProcess.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
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()
|
||||
Return False
|
||||
End If
|
||||
|
||||
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()
|
||||
Return False
|
||||
End If
|
||||
@@ -1080,7 +1081,7 @@ Public Class frmGameManager
|
||||
Next
|
||||
|
||||
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
|
||||
If mgrManifest.DoManifestCheck(oMarkList(0).Name, mgrSQLite.Database.Local) Then
|
||||
mgrManifest.DoManifestUpdate(oMarkList(0), mgrSQLite.Database.Local)
|
||||
@@ -1089,7 +1090,7 @@ Public Class frmGameManager
|
||||
End If
|
||||
End If
|
||||
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
|
||||
For Each oGameBackup In oMarkList
|
||||
If mgrManifest.DoManifestCheck(oGameBackup.Name, mgrSQLite.Database.Local) Then
|
||||
@@ -1100,7 +1101,7 @@ Public Class frmGameManager
|
||||
Next
|
||||
End If
|
||||
Else
|
||||
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorNoBackupData, MsgBoxStyle.Information)
|
||||
mgrCommon.ShowMessage(frmGameManager_ErrorNoBackupData, MsgBoxStyle.Information)
|
||||
End If
|
||||
|
||||
'Don't bother updating unless we actually did something
|
||||
@@ -1134,9 +1135,9 @@ Public Class frmGameManager
|
||||
Next
|
||||
|
||||
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
|
||||
sMsg = mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmMultiBackup, BackupList.Count)
|
||||
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmMultiBackup, BackupList.Count)
|
||||
End If
|
||||
|
||||
If mgrCommon.ShowMessage(sMsg, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
@@ -1166,15 +1167,15 @@ Public Class frmGameManager
|
||||
If RestoreList.Count = 1 Then
|
||||
bDoRestore = True
|
||||
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
|
||||
sMsg = mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmRestore, RestoreList(0).Name)
|
||||
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmRestore, RestoreList(0).Name)
|
||||
End If
|
||||
ElseIf RestoreList.Count > 1 Then
|
||||
bDoRestore = True
|
||||
sMsg = mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmMultiRestore, RestoreList.Count)
|
||||
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmMultiRestore, RestoreList.Count)
|
||||
Else
|
||||
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorNoBackupData, MsgBoxStyle.Information)
|
||||
mgrCommon.ShowMessage(frmGameManager_ErrorNoBackupData, MsgBoxStyle.Information)
|
||||
End If
|
||||
|
||||
'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()
|
||||
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 mgrMonitorList.DoImport(sLocation) Then
|
||||
@@ -1203,7 +1204,7 @@ Public Class frmGameManager
|
||||
Private Sub ExportGameList()
|
||||
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
|
||||
mgrMonitorList.ExportMonitorList(sLocation)
|
||||
@@ -1213,7 +1214,7 @@ Public Class frmGameManager
|
||||
|
||||
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
|
||||
LoadData()
|
||||
End If
|
||||
@@ -1223,49 +1224,51 @@ Public Class frmGameManager
|
||||
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Name = My.Resources.frmGameManager_FormName
|
||||
Me.Name = frmGameManager_FormName
|
||||
|
||||
'Set Form text
|
||||
btnExport.Text = My.Resources.frmGameManager_btnExport
|
||||
btnImport.Text = My.Resources.frmGameManager_btnImport
|
||||
optCustom.Text = My.Resources.frmGameManager_optCustom
|
||||
optBackupData.Text = My.Resources.frmGameManager_optBackupData
|
||||
optPendingRestores.Text = My.Resources.frmGameManager_optPendingRestores
|
||||
optAllGames.Text = My.Resources.frmGameManager_optAllGames
|
||||
btnTags.Text = My.Resources.frmGameManager_btnTags
|
||||
chkEnabled.Text = My.Resources.frmGameManager_chkEnabled
|
||||
btnCancel.Text = My.Resources.frmGameManager_btnCancel
|
||||
chkMonitorOnly.Text = My.Resources.frmGameManager_chkMonitorOnly
|
||||
btnMarkAsRestored.Text = My.Resources.frmGameManager_btnMarkAsRestored
|
||||
btnRestore.Text = My.Resources.frmGameManager_btnRestore
|
||||
btnSave.Text = My.Resources.frmGameManager_btnSave
|
||||
lblRestorePath.Text = My.Resources.frmGameManager_lblRestorePath
|
||||
btnOpenRestorePath.Text = My.Resources.frmGameManager_btnOpenRestorePath
|
||||
btnOpenBackupFile.Text = My.Resources.frmGameManager_btnOpenBackupFile
|
||||
btnDeleteBackup.Text = My.Resources.frmGameManager_btnDeleteBackup
|
||||
lblFileSize.Text = My.Resources.frmGameManager_lblFileSize
|
||||
lblCurrentBackup.Text = My.Resources.frmGameManager_lblCurrentBackup
|
||||
lblLastBackup.Text = My.Resources.frmGameManager_lblLastBackup
|
||||
btnIconBrowse.Text = My.Resources.frmGameManager_btnIconBrowse
|
||||
lblVersion.Text = My.Resources.frmGameManager_lblVersion
|
||||
lblCompany.Text = My.Resources.frmGameManager_lblCompany
|
||||
lblIcon.Text = My.Resources.frmGameManager_lblIcon
|
||||
btnAppPathBrowse.Text = My.Resources.frmGameManager_btnAppPathBrowse
|
||||
lblGamePath.Text = My.Resources.frmGameManager_lblGamePath
|
||||
lblHours.Text = My.Resources.frmGameManager_lblHours
|
||||
btnExclude.Text = My.Resources.frmGameManager_btnExclude
|
||||
btnInclude.Text = My.Resources.frmGameManager_btnInclude
|
||||
btnSavePathBrowse.Text = My.Resources.frmGameManager_btnSavePathBrowse
|
||||
btnProcessBrowse.Text = My.Resources.frmGameManager_btnProcessBrowse
|
||||
lblSavePath.Text = My.Resources.frmGameManager_lblSavePath
|
||||
lblProcess.Text = My.Resources.frmGameManager_lblProcess
|
||||
lblName.Text = My.Resources.frmGameManager_lblName
|
||||
chkTimeStamp.Text = My.Resources.frmGameManager_chkTimeStamp
|
||||
chkFolderSave.Text = My.Resources.frmGameManager_chkFolderSave
|
||||
btnBackup.Text = My.Resources.frmGameManager_btnBackup
|
||||
btnClose.Text = My.Resources.frmGameManager_btnClose
|
||||
btnDelete.Text = My.Resources.frmGameManager_btnDelete
|
||||
btnAdd.Text = My.Resources.frmGameManager_btnAdd
|
||||
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
|
||||
@@ -1385,14 +1388,14 @@ Public Class frmGameManager
|
||||
|
||||
Private Sub btnInclude_Click(sender As Object, e As EventArgs) Handles btnInclude.Click
|
||||
Dim sInclude As String = txtFileType.Text
|
||||
OpenBuilder(My.Resources.frmGameManager_Include, txtFileType)
|
||||
UpdateBuilderButtonLabel(txtFileType.Text, My.Resources.frmGameManager_IncludeShortcut, 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(My.Resources.frmGameManager_Exclude, txtExclude)
|
||||
UpdateBuilderButtonLabel(txtExclude.Text, My.Resources.frmGameManager_ExcludeShortcut, 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
|
||||
@@ -1400,7 +1403,7 @@ Public Class frmGameManager
|
||||
btnInclude.Enabled = False
|
||||
If txtFileType.Text <> String.Empty Then
|
||||
txtFileType.Text = String.Empty
|
||||
UpdateBuilderButtonLabel(txtFileType.Text, My.Resources.frmGameManager_IncludeShortcut, btnInclude, False)
|
||||
UpdateBuilderButtonLabel(txtFileType.Text, frmGameManager_IncludeShortcut, btnInclude, False)
|
||||
End If
|
||||
Else
|
||||
btnInclude.Enabled = True
|
||||
|
||||
+142
-140
@@ -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
|
||||
@@ -69,15 +71,15 @@ Public Class frmMain
|
||||
|
||||
'Build Info
|
||||
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
|
||||
sStatus3 = oRestoreInfo.RestorePath
|
||||
Else
|
||||
sStatus3 = oRestoreInfo.RelativeRestorePath
|
||||
End If
|
||||
|
||||
WorkingGameInfo(My.Resources.frmMain_RestoreInProgress, sStatus1, sStatus2, sStatus3)
|
||||
UpdateStatus(My.Resources.frmMain_RestoreInProgress)
|
||||
WorkingGameInfo(frmMain_RestoreInProgress, sStatus1, sStatus2, sStatus3)
|
||||
UpdateStatus(frmMain_RestoreInProgress)
|
||||
End Sub
|
||||
|
||||
Private Sub SetBackupInfo(ByVal oGame As clsGame) Handles oBackup.UpdateBackupInfo
|
||||
@@ -94,8 +96,8 @@ Public Class frmMain
|
||||
End If
|
||||
sStatus3 = String.Empty
|
||||
|
||||
WorkingGameInfo(My.Resources.frmMain_BackupInProgress, sStatus1, sStatus2, sStatus3)
|
||||
UpdateStatus(My.Resources.frmMain_BackupInProgress)
|
||||
WorkingGameInfo(frmMain_BackupInProgress, sStatus1, sStatus2, sStatus3)
|
||||
UpdateStatus(frmMain_BackupInProgress)
|
||||
End Sub
|
||||
|
||||
Private Sub OperationStarted(Optional ByVal bPause As Boolean = True)
|
||||
@@ -169,7 +171,7 @@ Public Class frmMain
|
||||
If mgrRestore.CheckPath(oRestoreInfo, oGame, bTriggerReload) Then
|
||||
oReadyList.Add(oRestoreInfo)
|
||||
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
|
||||
Next
|
||||
|
||||
@@ -200,18 +202,18 @@ Public Class frmMain
|
||||
bNoAuto = 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.ProcessPath = String.Empty Then
|
||||
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
|
||||
|
||||
If oGame.ProcessPath <> String.Empty Then
|
||||
oReadyList.Add(oGame)
|
||||
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
|
||||
Else
|
||||
oReadyList.Add(oGame)
|
||||
@@ -267,27 +269,27 @@ Public Class frmMain
|
||||
|
||||
If SupressBackup() Then
|
||||
bDoBackup = False
|
||||
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_ErrorBackupSessionLength, oProcess.GameInfo.Name), False)
|
||||
SetLastAction(mgrCommon.FormatString(My.Resources.frmMain_ErrorBackupSessionLength, oProcess.GameInfo.CroppedName))
|
||||
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 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
|
||||
Else
|
||||
bDoBackup = False
|
||||
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_ErrorBackupCancel, oProcess.GameInfo.Name), False)
|
||||
SetLastAction(mgrCommon.FormatString(My.Resources.frmMain_ErrorBackupCancel, oProcess.GameInfo.CroppedName))
|
||||
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(mgrCommon.FormatString(My.Resources.frmMain_MonitorEnded, oProcess.GameInfo.Name), False)
|
||||
SetLastAction(mgrCommon.FormatString(My.Resources.frmMain_MonitorEnded, oProcess.GameInfo.CroppedName))
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_MonitorEnded, oProcess.GameInfo.Name), False)
|
||||
SetLastAction(mgrCommon.FormatString(frmMain_MonitorEnded, oProcess.GameInfo.CroppedName))
|
||||
OperationEnded()
|
||||
End If
|
||||
End If
|
||||
@@ -307,12 +309,12 @@ Public Class frmMain
|
||||
|
||||
If slRestoreData.Count > 0 Then
|
||||
If slRestoreData.Count > 1 Then
|
||||
sNotification = mgrCommon.FormatString(My.Resources.frmMain_NewSaveNotificationMulti, slRestoreData.Count)
|
||||
sNotification = mgrCommon.FormatString(frmMain_NewSaveNotificationMulti, slRestoreData.Count)
|
||||
Else
|
||||
sNotification = mgrCommon.FormatString(My.Resources.frmMain_NewSaveNotificationSingle, slRestoreData.Count)
|
||||
sNotification = mgrCommon.FormatString(frmMain_NewSaveNotificationSingle, slRestoreData.Count)
|
||||
End If
|
||||
gMonNotification.Image = My.Resources.Inbox
|
||||
gMonTrayNotification.Image = My.Resources.Inbox
|
||||
gMonNotification.Image = Inbox
|
||||
gMonTrayNotification.Image = Inbox
|
||||
gMonNotification.Text = sNotification
|
||||
gMonTrayNotification.Text = sNotification
|
||||
gMonNotification.Visible = True
|
||||
@@ -325,9 +327,9 @@ Public Class frmMain
|
||||
Dim sIcon As String
|
||||
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.Filter = My.Resources.frmMain_IconFilter
|
||||
fbBrowser.Filter = frmMain_IconFilter
|
||||
Try
|
||||
fbBrowser.InitialDirectory = IO.Path.GetDirectoryName(oProcess.FoundProcess.MainModule.FileName)
|
||||
Catch ex As Exception
|
||||
@@ -347,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 = mgrCommon.FormatString(My.Resources.frmMain_LastGame, oProcess.GameInfo.CroppedName)
|
||||
lblGameTitle.Text = mgrCommon.FormatString(frmMain_LastGame, oProcess.GameInfo.CroppedName)
|
||||
pbIcon.Image = oPriorImage
|
||||
lblStatus1.Text = sPriorPath
|
||||
lblStatus2.Text = sPriorCompany
|
||||
@@ -357,8 +359,8 @@ Public Class frmMain
|
||||
lblTimeSpent.Visible = True
|
||||
End If
|
||||
Else
|
||||
pbIcon.Image = My.Resources.Searching
|
||||
lblGameTitle.Text = My.Resources.frmMain_NoGameDetected
|
||||
pbIcon.Image = Searching
|
||||
lblGameTitle.Text = frmMain_NoGameDetected
|
||||
lblStatus1.Text = String.Empty
|
||||
lblStatus2.Text = String.Empty
|
||||
lblStatus3.Text = String.Empty
|
||||
@@ -367,9 +369,9 @@ Public Class frmMain
|
||||
End If
|
||||
|
||||
If eCurrentStatus = eStatus.Stopped Then
|
||||
UpdateStatus(My.Resources.frmMain_NotScanning)
|
||||
UpdateStatus(frmMain_NotScanning)
|
||||
Else
|
||||
UpdateStatus(My.Resources.frmMain_NoGameDetected)
|
||||
UpdateStatus(frmMain_NoGameDetected)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -382,7 +384,7 @@ Public Class frmMain
|
||||
Else
|
||||
pbTime.Visible = False
|
||||
lblTimeSpent.Visible = False
|
||||
pbIcon.Image = My.Resources.Working
|
||||
pbIcon.Image = Working
|
||||
lblGameTitle.Text = sTitle
|
||||
lblStatus1.Text = sStatus1
|
||||
lblStatus2.Text = sStatus2
|
||||
@@ -404,11 +406,11 @@ Public Class frmMain
|
||||
If bMulti Then
|
||||
bAllowIcon = False
|
||||
bAllowDetails = False
|
||||
lblGameTitle.Text = My.Resources.frmMain_MultipleGames
|
||||
lblGameTitle.Text = frmMain_MultipleGames
|
||||
pbTime.Visible = False
|
||||
lblTimeSpent.Visible = False
|
||||
pbIcon.Image = My.Resources.Unknown
|
||||
lblStatus1.Text = My.Resources.frmMain_NoDetails
|
||||
pbIcon.Image = Unknown
|
||||
lblStatus1.Text = frmMain_NoDetails
|
||||
Else
|
||||
bAllowIcon = True
|
||||
bAllowDetails = True
|
||||
@@ -424,7 +426,7 @@ Public Class frmMain
|
||||
sCompanyName = oProcess.FoundProcess.MainModule.FileVersionInfo.CompanyName
|
||||
|
||||
Catch ex As Exception
|
||||
pbIcon.Image = My.Resources.Unknown
|
||||
pbIcon.Image = Unknown
|
||||
End Try
|
||||
|
||||
'Check for a custom icon & details
|
||||
@@ -433,7 +435,7 @@ Public Class frmMain
|
||||
End If
|
||||
If sFileName = 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
|
||||
If oProcess.GameInfo.Version <> String.Empty Then
|
||||
@@ -453,19 +455,19 @@ Public Class frmMain
|
||||
|
||||
'Set Details
|
||||
If sFileName = String.Empty Then
|
||||
lblStatus1.Text = My.Resources.frmMain_NotAvailable
|
||||
lblStatus1.Text = frmMain_NotAvailable
|
||||
Else
|
||||
lblStatus1.Text = sFileName
|
||||
End If
|
||||
|
||||
If sCompanyName = String.Empty Then
|
||||
lblStatus2.Text = My.Resources.frmMain_NotAvailable
|
||||
lblStatus2.Text = frmMain_NotAvailable
|
||||
Else
|
||||
lblStatus2.Text = sCompanyName
|
||||
End If
|
||||
|
||||
If sFileVersion = String.Empty Then
|
||||
lblStatus3.Text = My.Resources.frmMain_NotAvailable
|
||||
lblStatus3.Text = frmMain_NotAvailable
|
||||
Else
|
||||
lblStatus3.Text = sFileVersion
|
||||
End If
|
||||
@@ -484,15 +486,15 @@ Public Class frmMain
|
||||
Dim sSessionTime As String
|
||||
|
||||
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
|
||||
sTotalTime = mgrCommon.FormatString(My.Resources.frmMain_SessionHours, Math.Round(dTotalTime, 1).ToString)
|
||||
sTotalTime = mgrCommon.FormatString(frmMain_SessionHours, Math.Round(dTotalTime, 1).ToString)
|
||||
End If
|
||||
|
||||
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
|
||||
sSessionTime = mgrCommon.FormatString(My.Resources.frmMain_SessionHours, Math.Round(dSessionTime, 1).ToString)
|
||||
sSessionTime = mgrCommon.FormatString(frmMain_SessionHours, Math.Round(dSessionTime, 1).ToString)
|
||||
End If
|
||||
|
||||
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 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) & 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
|
||||
|
||||
Private Sub OpenTags()
|
||||
@@ -648,7 +650,7 @@ Public Class frmMain
|
||||
'Load Monitor List
|
||||
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
|
||||
|
||||
Private Sub StartSyncWatcher()
|
||||
@@ -673,7 +675,7 @@ Public Class frmMain
|
||||
|
||||
Private Sub HandleSyncWatcher() Handles oFileWatcher.Changed
|
||||
If oSettings.Sync Then
|
||||
UpdateLog(My.Resources.frmMain_MasterListChanged, False, ToolTipIcon.Info, True)
|
||||
UpdateLog(frmMain_MasterListChanged, False, ToolTipIcon.Info, True)
|
||||
SyncGameSettings()
|
||||
LoadGameSettings()
|
||||
CheckForNewBackups()
|
||||
@@ -699,7 +701,7 @@ Public Class frmMain
|
||||
|
||||
'The application cannot continue if this fails
|
||||
If Not oBackup.CheckForUtilities(mgrPath.Utility7zLocation) Then
|
||||
mgrCommon.ShowMessage(My.Resources.frmMain_Error7zip, MsgBoxStyle.Critical)
|
||||
mgrCommon.ShowMessage(frmMain_Error7zip, MsgBoxStyle.Critical)
|
||||
bShutdown = True
|
||||
Me.Close()
|
||||
End If
|
||||
@@ -735,7 +737,7 @@ Public Class frmMain
|
||||
'Verify the "Start with Windows" setting
|
||||
If oSettings.StartWithWindows Then
|
||||
If Not VerifyStartWithWindows() Then
|
||||
UpdateLog(My.Resources.frmMain_ErrorAppLocationChanged, False, ToolTipIcon.Info)
|
||||
UpdateLog(frmMain_ErrorAppLocationChanged, False, ToolTipIcon.Info)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -747,14 +749,14 @@ Public Class frmMain
|
||||
txtLog.Visible = True
|
||||
Me.Size = New System.Drawing.Size(540, 425)
|
||||
bLogToggle = True
|
||||
btnLogToggle.Text = My.Resources.frmMain_btnToggleLog_Hide
|
||||
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 = My.Resources.frmMain_btnToggleLog_Show
|
||||
btnLogToggle.Text = frmMain_btnToggleLog_Show
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -780,18 +782,18 @@ Public Class frmMain
|
||||
Dim sGame As String = oProcess.GameInfo.CroppedName
|
||||
|
||||
If bProcessIsAdmin Then
|
||||
mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmMain_ErrorAdminDetect, sGame), MsgBoxStyle.Exclamation)
|
||||
mgrCommon.ShowMessage(frmMain_ErrorAdminDetect, sGame, MsgBoxStyle.Exclamation)
|
||||
RestartAsAdmin()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If oProcess.Duplicate Then
|
||||
sGame = My.Resources.frmMain_UnknownGame
|
||||
sGame = frmMain_UnknownGame
|
||||
End If
|
||||
|
||||
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmMain_ConfirmMonitorCancel, sGame), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_MonitorCancel, sGame), False)
|
||||
SetLastAction(mgrCommon.FormatString(My.Resources.frmMain_MonitorCancel, sGame))
|
||||
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()
|
||||
@@ -811,7 +813,7 @@ Public Class frmMain
|
||||
Dim bClose As Boolean = False
|
||||
|
||||
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
|
||||
End If
|
||||
Else
|
||||
@@ -890,14 +892,14 @@ Public Class frmMain
|
||||
Private Sub ToggleMenuText()
|
||||
Select Case eCurrentStatus
|
||||
Case eStatus.Running
|
||||
gMonFileMonitor.Text = My.Resources.frmMain_gMonFileMonitor_Stop
|
||||
gMonTrayMon.Text = My.Resources.frmMain_gMonFileMonitor_Stop
|
||||
gMonFileMonitor.Text = frmMain_gMonFileMonitor_Stop
|
||||
gMonTrayMon.Text = frmMain_gMonFileMonitor_Stop
|
||||
Case eStatus.Stopped
|
||||
gMonFileMonitor.Text = My.Resources.frmMain_gMonFileMonitor_Start
|
||||
gMonTrayMon.Text = My.Resources.frmMain_gMonFileMonitor_Start
|
||||
gMonFileMonitor.Text = frmMain_gMonFileMonitor_Start
|
||||
gMonTrayMon.Text = frmMain_gMonFileMonitor_Start
|
||||
Case eStatus.Paused
|
||||
gMonFileMonitor.Text = My.Resources.frmMain_gMonFileMonitor_Cancel
|
||||
gMonTrayMon.Text = My.Resources.frmMain_gMonFileMonitor_Cancel
|
||||
gMonFileMonitor.Text = frmMain_gMonFileMonitor_Cancel
|
||||
gMonTrayMon.Text = frmMain_gMonFileMonitor_Cancel
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -949,61 +951,61 @@ Public Class frmMain
|
||||
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Name = My.Resources.App_NameLong
|
||||
Me.Name = App_NameLong
|
||||
|
||||
'Set Menu Text
|
||||
gMonFile.Text = My.Resources.frmMain_gMonFile
|
||||
gMonFileMonitor.Text = My.Resources.frmMain_gMonFileMonitor_Start
|
||||
gMonFileSettings.Text = My.Resources.frmMain_gMonFileSettings
|
||||
gMonFileExit.Text = My.Resources.frmMain_gMonFileExit
|
||||
gMonSetup.Text = My.Resources.frmMain_gMonSetup
|
||||
gMonSetupGameManager.Text = My.Resources.frmMain_gMonSetupGameManager
|
||||
gMonSetupAddWizard.Text = My.Resources.frmMain_gMonSetupAddWizard
|
||||
gMonSetupCustomVariables.Text = My.Resources.frmMain_gMonSetupCustomVariables
|
||||
gMonSetupTags.Text = My.Resources.frmMain_gMonSetupTags
|
||||
gMonTools.Text = My.Resources.frmMain_gMonTools
|
||||
gMonToolsCleanMan.Text = My.Resources.frmMain_gMonToolsCleanMan
|
||||
gMonToolsCompact.Text = My.Resources.frmMain_gMonToolsCompact
|
||||
gMonHelp.Text = My.Resources.frmMain_gMonHelp
|
||||
gMonHelpWebSite.Text = My.Resources.frmMain_gMonHelpWebSite
|
||||
gMonHelpManual.Text = My.Resources.frmMain_gMonHelpManual
|
||||
gMonHelpCheckforUpdates.Text = My.Resources.frmMain_gMonHelpCheckForUpdates
|
||||
gMonHelpAbout.Text = My.Resources.frmMain_gMonHelpAbout
|
||||
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 = My.Resources.frmMain_gMonTrayShow
|
||||
gMonTrayMon.Text = My.Resources.frmMain_gMonFileMonitor_Start
|
||||
gMonTraySettings.Text = My.Resources.frmMain_gMonFileSettings
|
||||
gMonTraySetup.Text = My.Resources.frmMain_gMonSetup
|
||||
gMonTraySetupGameManager.Text = My.Resources.frmMain_gMonSetupGameManager
|
||||
gMonTraySetupAddWizard.Text = My.Resources.frmMain_gMonSetupAddWizard
|
||||
gMonTraySetupCustomVariables.Text = My.Resources.frmMain_gMonSetupCustomVariables
|
||||
gMonTraySetupTags.Text = My.Resources.frmMain_gMonSetupTags
|
||||
gMonTrayTools.Text = My.Resources.frmMain_gMonTools
|
||||
gMonTrayToolsCleanMan.Text = My.Resources.frmMain_gMonToolsCleanMan
|
||||
gMonTrayToolsCompact.Text = My.Resources.frmMain_gMonToolsCompact
|
||||
gMonTrayExit.Text = My.Resources.frmMain_gMonFileExit
|
||||
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 = My.Resources.frmMain_lblLastActionTitle
|
||||
btnCancelOperation.Text = My.Resources.frmMain_btnCancelOperation
|
||||
gMonStripStatusButton.Text = My.Resources.frmMain_gMonStripStatusButton
|
||||
gMonStripStatusButton.ToolTipText = My.Resources.frmMain_gMonStripStatusButtonToolTip
|
||||
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 = My.Resources.frmMain_RunningAsAdmin
|
||||
gMonStripAdminButton.Image = Admin
|
||||
gMonStripAdminButton.ToolTipText = frmMain_RunningAsAdmin
|
||||
|
||||
Else
|
||||
gMonStripAdminButton.Image = My.Resources.User
|
||||
gMonStripAdminButton.ToolTipText = My.Resources.frmMain_RunningAsNormal
|
||||
gMonStripAdminButton.Image = 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 = Clock
|
||||
Me.Size = New System.Drawing.Size(540, 245)
|
||||
AddHandler mgrMonitorList.UpdateLog, AddressOf UpdateLog
|
||||
ResetGameInfo()
|
||||
@@ -1020,16 +1022,16 @@ Public Class frmMain
|
||||
StopSyncWatcher()
|
||||
tmScanTimer.Stop()
|
||||
eCurrentStatus = eStatus.Stopped
|
||||
UpdateStatus(My.Resources.frmMain_NotScanning)
|
||||
gMonStripStatusButton.Image = My.Resources.Stopped
|
||||
gMonTray.Icon = My.Resources.GBM_Tray_Stopped
|
||||
UpdateStatus(frmMain_NotScanning)
|
||||
gMonStripStatusButton.Image = Stopped
|
||||
gMonTray.Icon = GBM_Tray_Stopped
|
||||
Else
|
||||
StartScan()
|
||||
StartSyncWatcher()
|
||||
eCurrentStatus = eStatus.Running
|
||||
UpdateStatus(My.Resources.frmMain_NoGameDetected)
|
||||
gMonStripStatusButton.Image = My.Resources.Ready
|
||||
gMonTray.Icon = My.Resources.GBM_Tray_Ready
|
||||
UpdateStatus(frmMain_NoGameDetected)
|
||||
gMonStripStatusButton.Image = Ready
|
||||
gMonTray.Icon = GBM_Tray_Ready
|
||||
End If
|
||||
ToggleMenuText()
|
||||
End Sub
|
||||
@@ -1039,9 +1041,9 @@ Public Class frmMain
|
||||
StopSyncWatcher()
|
||||
tmScanTimer.Stop()
|
||||
eCurrentStatus = eStatus.Paused
|
||||
UpdateStatus(My.Resources.frmMain_NotScanning)
|
||||
gMonStripStatusButton.Image = My.Resources.Detected
|
||||
gMonTray.Icon = My.Resources.GBM_Tray_Detected
|
||||
UpdateStatus(frmMain_NotScanning)
|
||||
gMonStripStatusButton.Image = Detected
|
||||
gMonTray.Icon = GBM_Tray_Detected
|
||||
End If
|
||||
ToggleMenuText()
|
||||
ToggleMenuEnable()
|
||||
@@ -1052,9 +1054,9 @@ Public Class frmMain
|
||||
StartScan()
|
||||
StartSyncWatcher()
|
||||
eCurrentStatus = eStatus.Running
|
||||
gMonStripStatusButton.Image = My.Resources.Ready
|
||||
gMonTray.Icon = My.Resources.GBM_Tray_Ready
|
||||
UpdateStatus(My.Resources.frmMain_NoGameDetected)
|
||||
gMonStripStatusButton.Image = Ready
|
||||
gMonTray.Icon = GBM_Tray_Ready
|
||||
UpdateStatus(frmMain_NoGameDetected)
|
||||
End If
|
||||
ToggleMenuText()
|
||||
ToggleMenuEnable()
|
||||
@@ -1064,9 +1066,9 @@ Public Class frmMain
|
||||
StopSyncWatcher()
|
||||
tmScanTimer.Stop()
|
||||
eCurrentStatus = eStatus.Stopped
|
||||
UpdateStatus(My.Resources.frmMain_NotScanning)
|
||||
gMonStripStatusButton.Image = My.Resources.Stopped
|
||||
gMonTray.Icon = My.Resources.GBM_Tray_Stopped
|
||||
UpdateStatus(frmMain_NotScanning)
|
||||
gMonStripStatusButton.Image = Stopped
|
||||
gMonTray.Icon = GBM_Tray_Stopped
|
||||
ToggleMenuText()
|
||||
ToggleMenuEnable()
|
||||
End Sub
|
||||
@@ -1075,7 +1077,7 @@ Public Class frmMain
|
||||
Private Sub VerifyCustomPathVariables()
|
||||
Dim sGames As String = String.Empty
|
||||
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 Sub
|
||||
|
||||
@@ -1103,7 +1105,7 @@ Public Class frmMain
|
||||
Try
|
||||
IO.Directory.CreateDirectory(sSettingsRoot)
|
||||
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
|
||||
Me.Close()
|
||||
End Try
|
||||
@@ -1119,9 +1121,9 @@ Public Class frmMain
|
||||
If Not oDatabase.CheckDBVer(iDBVer) Then
|
||||
Select Case iDB
|
||||
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
|
||||
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
|
||||
|
||||
bShutdown = True
|
||||
@@ -1170,9 +1172,9 @@ Public Class frmMain
|
||||
'Functions to handle other features
|
||||
Private Sub RestartAsAdmin()
|
||||
If mgrCommon.IsElevated Then
|
||||
mgrCommon.ShowMessage(My.Resources.frmMain_ErrorAlreadyAdmin, MsgBoxStyle.Information)
|
||||
mgrCommon.ShowMessage(frmMain_ErrorAlreadyAdmin, MsgBoxStyle.Information)
|
||||
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()
|
||||
bShutdown = True
|
||||
ShutdownApp(False)
|
||||
@@ -1185,17 +1187,17 @@ Public Class frmMain
|
||||
|
||||
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()
|
||||
|
||||
If slItems.Count > 0 Then
|
||||
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
|
||||
mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmMain_ManifestTotalRemoved, slItems.Count), MsgBoxStyle.Information)
|
||||
mgrCommon.ShowMessage(frmMain_ManifestTotalRemoved, slItems.Count, MsgBoxStyle.Information)
|
||||
Else
|
||||
mgrCommon.ShowMessage(My.Resources.frmMain_ManifestAreadyClean, MsgBoxStyle.Information)
|
||||
mgrCommon.ShowMessage(frmMain_ManifestAreadyClean, MsgBoxStyle.Information)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -1209,18 +1211,18 @@ Public Class frmMain
|
||||
|
||||
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)
|
||||
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()
|
||||
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()
|
||||
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_RemoteCompactComplete, oRemoteDatabase.GetDBSize), False)
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_RemoteCompactComplete, oRemoteDatabase.GetDBSize), False)
|
||||
End If
|
||||
|
||||
ResumeScan()
|
||||
@@ -1356,12 +1358,12 @@ Public Class frmMain
|
||||
bContinue = False
|
||||
If iErrorCode = 5 Then
|
||||
If oProcess.Duplicate Then
|
||||
sErrorMessage = mgrCommon.FormatString(My.Resources.frmMain_ErrorMultiAdmin)
|
||||
sErrorMessage = mgrCommon.FormatString(frmMain_ErrorMultiAdmin)
|
||||
mgrCommon.ShowMessage(sErrorMessage, MsgBoxStyle.Exclamation)
|
||||
bAskForRestart = True
|
||||
Else
|
||||
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)
|
||||
If oProcess.GameInfo.ProcessPath <> String.Empty Then
|
||||
'Update and reload
|
||||
@@ -1375,11 +1377,11 @@ Public Class frmMain
|
||||
End If
|
||||
ElseIf iErrorCode = 299 Then
|
||||
If oProcess.Duplicate Then
|
||||
sErrorMessage = mgrCommon.FormatString(My.Resources.frmMain_ErrorMulti64)
|
||||
sErrorMessage = mgrCommon.FormatString(frmMain_ErrorMulti64)
|
||||
mgrCommon.ShowMessage(sErrorMessage, MsgBoxStyle.Exclamation)
|
||||
Else
|
||||
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)
|
||||
If oProcess.GameInfo.ProcessPath <> String.Empty Then
|
||||
'Update and reload
|
||||
@@ -1397,12 +1399,12 @@ Public Class frmMain
|
||||
If bContinue = True Then
|
||||
CheckForSavedDuplicate()
|
||||
If oProcess.Duplicate Then
|
||||
UpdateLog(My.Resources.frmMain_MultipleGamesDetected, oSettings.ShowDetectionToolTips)
|
||||
UpdateStatus(My.Resources.frmMain_MultipleGamesDetected)
|
||||
UpdateLog(frmMain_MultipleGamesDetected, oSettings.ShowDetectionToolTips)
|
||||
UpdateStatus(frmMain_MultipleGamesDetected)
|
||||
SetGameInfo(True)
|
||||
Else
|
||||
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_GameDetected, oProcess.GameInfo.Name), oSettings.ShowDetectionToolTips)
|
||||
UpdateStatus(mgrCommon.FormatString(My.Resources.frmMain_GameDetected, oProcess.GameInfo.CroppedName))
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_GameDetected, oProcess.GameInfo.Name), oSettings.ShowDetectionToolTips)
|
||||
UpdateStatus(mgrCommon.FormatString(frmMain_GameDetected, oProcess.GameInfo.CroppedName))
|
||||
SetGameInfo()
|
||||
End If
|
||||
oProcess.StartTime = Now
|
||||
@@ -1436,11 +1438,11 @@ Public Class frmMain
|
||||
|
||||
If Not bCancelledByUser 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()
|
||||
RunBackup()
|
||||
Else
|
||||
UpdateLog(My.Resources.frmMain_UnknownGameEnded, False)
|
||||
UpdateLog(frmMain_UnknownGameEnded, False)
|
||||
ResetGameInfo()
|
||||
ResumeScan()
|
||||
End If
|
||||
|
||||
@@ -125,9 +125,24 @@ 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(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
|
||||
End Function
|
||||
|
||||
|
||||
Generated
+20
-2
@@ -130,7 +130,7 @@ Namespace My.Resources
|
||||
Friend ReadOnly Property Clock() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("Clock", resourceCulture)
|
||||
Return CType(obj, System.Drawing.Bitmap)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -140,7 +140,7 @@ Namespace My.Resources
|
||||
Friend ReadOnly Property Detected() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("Detected", resourceCulture)
|
||||
Return CType(obj, System.Drawing.Bitmap)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -423,6 +423,24 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to &File....
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_cmsFile() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_cmsFile", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to &Official List....
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_cmsOfficial() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_cmsOfficial", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Are you sure you want to run a backup for [PARAM]? This will close the form..
|
||||
'''</summary>
|
||||
|
||||
@@ -673,4 +673,10 @@
|
||||
<data name="frmGameManager_XML" xml:space="preserve">
|
||||
<value>XML</value>
|
||||
</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>
|
||||
Reference in New Issue
Block a user