Moved strings to resource (frmGameManager)

This commit is contained in:
Michael J. Seiferling
2015-12-21 12:06:34 -06:00
parent 8778f2e1c0
commit 4316a7c7be
7 changed files with 1310 additions and 214 deletions
+5
View File
@@ -420,6 +420,11 @@ Public Class frmAddWizard
Private Sub frmAddWizard_Load(sender As Object, e As EventArgs) Handles MyBase.Load
FormInit()
'Dim sResource As String = String.Empty
'Dim sCode As String = String.Empty
'mgrCommon.GetAllStrings(Me, sResource, sCode, "frmAddWizard")
'Clipboard.SetText(sResource & vbCrLf & vbCrLf & sCode)
End Sub
Private Sub DropTarget_DragEnter(sender As Object, e As DragEventArgs) Handles lblDrag1.DragEnter, lblDrag2.DragEnter, txtName.DragEnter, txtProcessPath.DragEnter
+10 -10
View File
@@ -53,7 +53,7 @@ Partial Class frmGameManager
Me.txtCompany = New System.Windows.Forms.TextBox()
Me.lblCompany = New System.Windows.Forms.Label()
Me.pbIcon = New System.Windows.Forms.PictureBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.lblIcon = New System.Windows.Forms.Label()
Me.btnAppPathBrowse = New System.Windows.Forms.Button()
Me.lblGamePath = New System.Windows.Forms.Label()
Me.txtAppPath = New System.Windows.Forms.TextBox()
@@ -319,7 +319,7 @@ Partial Class frmGameManager
Me.grpExtra.Controls.Add(Me.txtCompany)
Me.grpExtra.Controls.Add(Me.lblCompany)
Me.grpExtra.Controls.Add(Me.pbIcon)
Me.grpExtra.Controls.Add(Me.Label1)
Me.grpExtra.Controls.Add(Me.lblIcon)
Me.grpExtra.Controls.Add(Me.btnAppPathBrowse)
Me.grpExtra.Controls.Add(Me.lblGamePath)
Me.grpExtra.Controls.Add(Me.txtAppPath)
@@ -401,14 +401,14 @@ Partial Class frmGameManager
Me.pbIcon.TabIndex = 15
Me.pbIcon.TabStop = False
'
'Label1
'lblIcon
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(6, 100)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(31, 13)
Me.Label1.TabIndex = 3
Me.Label1.Text = "Icon:"
Me.lblIcon.AutoSize = True
Me.lblIcon.Location = New System.Drawing.Point(6, 100)
Me.lblIcon.Name = "lblIcon"
Me.lblIcon.Size = New System.Drawing.Size(31, 13)
Me.lblIcon.TabIndex = 3
Me.lblIcon.Text = "Icon:"
'
'btnAppPathBrowse
'
@@ -815,7 +815,7 @@ Partial Class frmGameManager
Friend WithEvents btnAppPathBrowse As System.Windows.Forms.Button
Friend WithEvents lblGamePath As System.Windows.Forms.Label
Friend WithEvents txtAppPath As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents lblIcon As System.Windows.Forms.Label
Friend WithEvents pbIcon As System.Windows.Forms.PictureBox
Friend WithEvents lblVersion As System.Windows.Forms.Label
Friend WithEvents txtVersion As System.Windows.Forms.TextBox
+105 -62
View File
@@ -279,8 +279,8 @@ Public Class frmGameManager
End If
End If
sNewPath = mgrCommon.OpenFileBrowser("Choose exe file that starts the application", "exe", _
"Executable", sDefaultFolder, False)
sNewPath = mgrCommon.OpenFileBrowser(My.Resources.frmGameManager_ChooseExe, "exe", _
My.Resources.frmGameManager_Executable, sDefaultFolder, False)
If sNewPath <> String.Empty Then
txtAppPath.Text = Path.GetDirectoryName(sNewPath)
@@ -300,7 +300,7 @@ Public Class frmGameManager
End If
End If
sNewPath = mgrCommon.OpenFolderBrowser("Choose the location of application's exe file:", sDefaultFolder, False)
sNewPath = mgrCommon.OpenFolderBrowser(My.Resources.frmGameManager_ChooseExePath, sDefaultFolder, False)
If sNewPath <> String.Empty Then txtAppPath.Text = sNewPath
End Sub
@@ -316,7 +316,7 @@ Public Class frmGameManager
End If
End If
sNewPath = mgrCommon.OpenFolderBrowser("Choose the application save folder:", sDefaultFolder, False)
sNewPath = mgrCommon.OpenFolderBrowser(My.Resources.frmGameManager_ChooseSaveFolder, sDefaultFolder, False)
If sNewPath <> String.Empty Then
txtSavePath.Text = sNewPath
@@ -335,8 +335,8 @@ Public Class frmGameManager
End If
End If
sNewPath = mgrCommon.OpenFileBrowser("Choose a custom icon for the application", "ico", _
"Icon", sDefaultFolder, False)
sNewPath = mgrCommon.OpenFileBrowser(My.Resources.frmGameManager_ChooseCustomIcon, "ico", _
My.Resources.frmGameManager_Icon, sDefaultFolder, False)
If sNewPath <> String.Empty Then
txtIcon.Text = sNewPath
@@ -349,7 +349,7 @@ Public Class frmGameManager
Private Function HandleDirty() As MsgBoxResult
Dim oResult As MsgBoxResult
oResult = mgrCommon.ShowMessage("There are unsaved changes on this form. Do you want to save?", MsgBoxStyle.YesNoCancel)
oResult = mgrCommon.ShowMessage(My.Resources.App_ConfirmDirty, MsgBoxStyle.YesNoCancel)
Select Case oResult
Case MsgBoxResult.Yes
@@ -393,7 +393,7 @@ Public Class frmGameManager
If File.Exists(sFileName) Then
Process.Start("explorer.exe", "/select," & sFileName)
Else
mgrCommon.ShowMessage("The backup file does not exist.", MsgBoxStyle.Exclamation)
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorNoBackupExists, MsgBoxStyle.Exclamation)
End If
End Sub
@@ -402,9 +402,9 @@ Public Class frmGameManager
Dim iCount As Integer = sBuilderString.Split(":").Length
If sBuilderString <> String.Empty And iCount > 0 Then
btn.Text = sLabel & " Items... (" & iCount & ")"
btn.Text = sLabel & " " & mgrCommon.FormatString(My.Resources.frmGameManager_ItemsExist, iCount)
Else
btn.Text = sLabel & " Items..."
btn.Text = sLabel & " " & My.Resources.frmGameManager_Items
End If
If bDirty Then
@@ -454,7 +454,7 @@ Public Class frmGameManager
Else
sProcess = CurrentGame.TrueProcess
If mgrCommon.IsProcessNotSearchable(CurrentGame) Then bNoAuto = True
sRestorePath = mgrPath.ProcessPathSearch(CurrentBackupItem.Name, sProcess, CurrentBackupItem.Name & " uses a relative path and the game path has not been set.", bNoAuto)
sRestorePath = mgrPath.ProcessPathSearch(CurrentBackupItem.Name, sProcess, mgrCommon.FormatString(My.Resources.frmGameManager_ErrorPathNotSet, CurrentBackupItem.Name), bNoAuto)
If sRestorePath <> String.Empty Then
CurrentBackupItem.RelativeRestorePath = sRestorePath & "\" & CurrentBackupItem.RestorePath
@@ -482,7 +482,7 @@ Public Class frmGameManager
If Directory.Exists(sPath) Then
Process.Start("explorer.exe", sPath)
Else
mgrCommon.ShowMessage("The restore path does not exist.", MsgBoxStyle.Exclamation)
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorNoRestorePathExists, MsgBoxStyle.Exclamation)
End If
End Sub
@@ -522,7 +522,7 @@ Public Class frmGameManager
If oRemoteBackupData.Contains(oApp.Name) Then
CurrentBackupItem = DirectCast(oRemoteBackupData(oApp.Name), clsBackup)
txtCurrentBackup.Text = CurrentBackupItem.DateUpdated & " by " & CurrentBackupItem.UpdatedBy
txtCurrentBackup.Text = mgrCommon.FormatString(My.Resources.frmGameManager_BackupTimeAndName, New String() {CurrentBackupItem.DateUpdated, CurrentBackupItem.UpdatedBy})
sFileName = BackupFolder & CurrentBackupItem.FileName
btnOpenBackupFile.Enabled = True
@@ -534,16 +534,16 @@ Public Class frmGameManager
oFileInfo = New FileInfo(sFileName)
dFileSize = oFileInfo.Length
If dFileSize > 1048576 Then
txtFileSize.Text = Math.Round(dFileSize / 1048576, 2) & " MB"
txtFileSize.Text = mgrCommon.FormatString(My.Resources.App_MB, Math.Round(dFileSize / 1048576, 2).ToString)
Else
txtFileSize.Text = Math.Round(dFileSize / 1024, 2) & " KB"
txtFileSize.Text = mgrCommon.FormatString(My.Resources.App_KB, Math.Round(dFileSize / 1024, 2).ToString)
End If
Else
txtFileSize.Text = "Backup file was not found!"
txtFileSize.Text = My.Resources.frmGameManager_ErrorNoBackupExists
End If
txtRestorePath.Text = CurrentBackupItem.RestorePath
Else
txtCurrentBackup.Text = "Never"
txtCurrentBackup.Text = My.Resources.frmGameManager_Never
txtFileSize.Text = String.Empty
txtRestorePath.Text = String.Empty
btnOpenBackupFile.Enabled = False
@@ -554,25 +554,25 @@ Public Class frmGameManager
If oLocalBackupData.Contains(oApp.Name) Then
oBackupInfo = DirectCast(oLocalBackupData(oApp.Name), clsBackup)
txtLocalBackup.Text = oBackupInfo.DateUpdated & " by " & oBackupInfo.UpdatedBy
txtLocalBackup.Text = mgrCommon.FormatString(My.Resources.frmGameManager_BackupTimeAndName, New String() {oBackupInfo.DateUpdated, oBackupInfo.UpdatedBy})
Else
txtLocalBackup.Text = "Never"
txtLocalBackup.Text = My.Resources.frmGameManager_Never
End If
If txtCurrentBackup.Text = "Never" And txtLocalBackup.Text = "Never" Then
If txtCurrentBackup.Text = My.Resources.frmGameManager_Never And txtLocalBackup.Text = My.Resources.frmGameManager_Never Then
lblSync.Visible = False
btnMarkAsRestored.Enabled = False
ElseIf txtCurrentBackup.Text = "Never" And txtLocalBackup.Text <> "Never" Then
ElseIf txtCurrentBackup.Text = My.Resources.frmGameManager_Never And txtLocalBackup.Text <> My.Resources.frmGameManager_Never Then
lblSync.Visible = False
btnMarkAsRestored.Enabled = False
ElseIf txtCurrentBackup.Text <> txtLocalBackup.Text Then
lblSync.ForeColor = Color.Red
lblSync.Text = "Out of Sync!"
lblSync.Text = My.Resources.frmGameManager_OutofSync
lblSync.Visible = True
btnMarkAsRestored.Enabled = True
Else
lblSync.ForeColor = Color.Green
lblSync.Text = "Up to Date!"
lblSync.Text = My.Resources.frmGameManager_UpToDate
lblSync.Visible = True
btnMarkAsRestored.Enabled = False
End If
@@ -583,8 +583,7 @@ Public Class frmGameManager
Dim oDir As DirectoryInfo
Dim sSubDir As String
If mgrCommon.ShowMessage("This will delete the backup file and all records of this backup. This cannot be undone. " & vbCrLf & vbCrLf & "Do you want to remove the data for " _
& CurrentBackupItem.Name & "?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmBackupDelete, CurrentBackupItem.Name), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
mgrManifest.DoManifestDelete(CurrentBackupItem, mgrSQLite.Database.Local)
mgrManifest.DoManifestDelete(CurrentBackupItem, mgrSQLite.Database.Remote)
@@ -601,9 +600,7 @@ Public Class frmGameManager
oDir = New DirectoryInfo(sSubDir)
If oDir.GetDirectories.Length > 0 Or oDir.GetFiles.Length > 0 Then
'Confirm
If mgrCommon.ShowMessage("The backup folder " & sSubDir & " still contains " & oDir.GetDirectories.Length & " directories and " &
oDir.GetFiles.Length & " files." & vbCrLf & vbCrLf & "Do you want to delete the contents and remove the sub-folder for this game?",
MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmBackupFolderDelete, New String() {sSubDir, oDir.GetDirectories.Length, oDir.GetFiles.Length}), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If Directory.Exists(sSubDir) Then Directory.Delete(sSubDir, True)
End If
Else
@@ -644,8 +641,8 @@ Public Class frmGameManager
chkMonitorOnly.Checked = oApp.MonitorOnly
'Update Buttons
UpdateBuilderButtonLabel(oApp.FileType, "In&clude", btnInclude, False)
UpdateBuilderButtonLabel(oApp.ExcludeList, "E&xclude", btnExclude, False)
UpdateBuilderButtonLabel(oApp.FileType, My.Resources.frmGameManager_IncludeShortcut, btnInclude, False)
UpdateBuilderButtonLabel(oApp.ExcludeList, My.Resources.frmGameManager_ExcludeShortcut, btnExclude, False)
'Extra
txtAppPath.Text = oApp.ProcessPath
@@ -765,8 +762,8 @@ Public Class frmGameManager
chkMonitorOnly.Checked = False
btnTags.Enabled = False
lblTags.Visible = False
btnInclude.Text = "In&clude Items..."
btnExclude.Text = "E&xclude Items..."
btnInclude.Text = My.Resources.frmGameManager_btnInclude
btnExclude.Text = My.Resources.frmGameManager_btnExclude
btnImport.Enabled = False
btnExport.Enabled = False
Case eModes.Edit
@@ -823,8 +820,8 @@ Public Class frmGameManager
btnBackup.Enabled = False
btnTags.Enabled = False
lblTags.Visible = False
btnInclude.Text = "In&clude Items..."
btnExclude.Text = "E&xclude Items..."
btnInclude.Text = My.Resources.frmGameManager_btnInclude
btnExclude.Text = My.Resources.frmGameManager_btnExclude
btnImport.Enabled = True
btnExport.Enabled = True
Case eModes.Disabled
@@ -849,8 +846,8 @@ Public Class frmGameManager
btnMarkAsRestored.Enabled = False
btnTags.Enabled = False
lblTags.Visible = False
btnInclude.Text = "In&clude Items..."
btnExclude.Text = "E&xclude Items..."
btnInclude.Text = My.Resources.frmGameManager_btnInclude
btnExclude.Text = My.Resources.frmGameManager_btnExclude
btnImport.Enabled = True
btnExport.Enabled = True
Case eModes.MultiSelect
@@ -976,13 +973,11 @@ Public Class frmGameManager
End If
Case eModes.MultiSelect
Dim sMonitorIDs As New List(Of String)
Dim sChanges As String
For Each oData In lstGames.SelectedItems
sMonitorIDs.Add(AppData(oData.Key))
Next
sChanges = vbCrLf & vbCrLf & "Monitor this game: " & mgrCommon.BooleanYesNo(oApp.Enabled) & vbCrLf & "Monitor only (No backup): " & mgrCommon.BooleanYesNo(oApp.MonitorOnly)
If mgrCommon.ShowMessage("Are you sure you want to save the following changes to " & sMonitorIDs.Count & " selected games?" & sChanges, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
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
bSuccess = True
mgrMonitorList.DoListUpdateMulti(sMonitorIDs, oApp)
eCurrentMode = eModes.Disabled
@@ -1008,7 +1003,7 @@ Public Class frmGameManager
oData = lstGames.SelectedItems(0)
oApp = DirectCast(AppData(oData.Key), clsGame)
If mgrCommon.ShowMessage("Are you sure you want to delete " & oApp.Name & "? This cannot be undone." & vbCrLf & vbCrLf & "This will not delete any backup files that already exist for this game.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmGameDelete, oApp.Name), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
mgrMonitorList.DoListDelete(oApp.ID)
LoadData()
eCurrentMode = eModes.Disabled
@@ -1022,7 +1017,7 @@ Public Class frmGameManager
sMonitorIDs.Add(oApp.ID)
Next
If mgrCommon.ShowMessage("Are you sure you want to delete the " & sMonitorIDs.Count & " selected games? This cannot be undone.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmMultiGameDelete, sMonitorIDs.Count), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
mgrMonitorList.DoListDeleteMulti(sMonitorIDs)
LoadData()
eCurrentMode = eModes.Disabled
@@ -1044,25 +1039,25 @@ Public Class frmGameManager
Private Function CoreValidatation(ByVal oApp As clsGame) As Boolean
If txtName.Text = String.Empty Then
mgrCommon.ShowMessage("You must enter a valid application name.", MsgBoxStyle.Exclamation)
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorValidName, MsgBoxStyle.Exclamation)
txtName.Focus()
Return False
End If
If txtProcess.Text = String.Empty Then
mgrCommon.ShowMessage("You must enter a valid process name.", MsgBoxStyle.Exclamation)
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorValidProcess, MsgBoxStyle.Exclamation)
txtProcess.Focus()
Return False
End If
If chkFolderSave.Checked = False And txtFileType.Text = String.Empty Then
mgrCommon.ShowMessage("You must choose items to include in the backup, or choose to save the entire folder.", MsgBoxStyle.Exclamation)
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorNoItems, MsgBoxStyle.Exclamation)
btnInclude.Focus()
Return False
End If
If mgrMonitorList.DoDuplicateListCheck(oApp.Name, oApp.ProcessName, , oApp.ID) Then
mgrCommon.ShowMessage("A game with this exact name and process already exists.", MsgBoxStyle.Exclamation)
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorGameDupe, MsgBoxStyle.Exclamation)
txtName.Focus()
Return False
End If
@@ -1085,7 +1080,7 @@ Public Class frmGameManager
Next
If oMarkList.Count = 1 Then
If mgrCommon.ShowMessage("Do you want to mark " & oMarkList(0).Name & " as restored? This cannot be undone.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmMark, oMarkList(0).Name), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
bWasUpdated = True
If mgrManifest.DoManifestCheck(oMarkList(0).Name, mgrSQLite.Database.Local) Then
mgrManifest.DoManifestUpdate(oMarkList(0), mgrSQLite.Database.Local)
@@ -1094,7 +1089,7 @@ Public Class frmGameManager
End If
End If
ElseIf oMarkList.Count > 1 Then
If mgrCommon.ShowMessage("Do you want to mark " & oMarkList.Count & " games as restored? This cannot be undone.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmMultiMark, oMarkList.Count), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
bWasUpdated = True
For Each oGameBackup In oMarkList
If mgrManifest.DoManifestCheck(oGameBackup.Name, mgrSQLite.Database.Local) Then
@@ -1105,7 +1100,7 @@ Public Class frmGameManager
Next
End If
Else
mgrCommon.ShowMessage("The selected game(s) have no backup data.", MsgBoxStyle.Information)
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorNoBackupData, MsgBoxStyle.Information)
End If
'Don't bother updating unless we actually did something
@@ -1139,9 +1134,9 @@ Public Class frmGameManager
Next
If BackupList.Count = 1 Then
sMsg = "Are you sure you want to run a backup for " & BackupList(0).Name & "? This will close the form."
sMsg = mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmBackup, BackupList(0).Name)
ElseIf BackupList.Count > 1 Then
sMsg = "Are you sure you want to run a backup for " & BackupList.Count & " games? This will close the form."
sMsg = mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmMultiBackup, BackupList.Count)
End If
If mgrCommon.ShowMessage(sMsg, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
@@ -1171,15 +1166,15 @@ Public Class frmGameManager
If RestoreList.Count = 1 Then
bDoRestore = True
If Not mgrRestore.CheckManifest(RestoreList(0).Name) Then
sMsg = RestoreList(0).Name & " is already up to date." & vbCrLf & vbCrLf & "Would you like to restore this backup anyway?"
sMsg = mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmRestoreAnyway, RestoreList(0).Name)
Else
sMsg = "Are you sure you want to restore the backup for " & RestoreList(0).Name & "? This will close the form."
sMsg = mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmRestore, RestoreList(0).Name)
End If
ElseIf RestoreList.Count > 1 Then
bDoRestore = True
sMsg = "Are you sure you want to restore the backups for " & RestoreList.Count & " games? This will close the form."
sMsg = mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmMultiRestore, RestoreList.Count)
Else
mgrCommon.ShowMessage("The selected game(s) have no backup data.", MsgBoxStyle.Information)
mgrCommon.ShowMessage(My.Resources.frmGameManager_ErrorNoBackupData, MsgBoxStyle.Information)
End If
'We need this check in case a bunch of games with no backups are multi-selected
@@ -1195,7 +1190,7 @@ Public Class frmGameManager
Private Sub ImportGameListFile()
Dim sLocation As String
sLocation = mgrCommon.OpenFileBrowser("Choose a valid xml file to import", "xml", "XML", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), False)
sLocation = mgrCommon.OpenFileBrowser(My.Resources.frmGameManager_ChooseImportXML, "xml", My.Resources.frmGameManager_XML, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), False)
If sLocation <> String.Empty Then
If mgrMonitorList.DoImport(sLocation) Then
@@ -1208,7 +1203,7 @@ Public Class frmGameManager
Private Sub ExportGameList()
Dim sLocation As String
sLocation = mgrCommon.SaveFileBrowser("Choose a location for the export file", "xml", "XML", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Game Backup Monitor Export " & Date.Now.ToString("dd-MMM-yyyy"))
sLocation = mgrCommon.SaveFileBrowser(My.Resources.frmGameManager_ChooseExportXML, "xml", My.Resources.frmGameManager_XML, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Game Backup Monitor Export " & Date.Now.ToString("dd-MMM-yyyy"))
If sLocation <> String.Empty Then
mgrMonitorList.ExportMonitorList(sLocation)
@@ -1218,7 +1213,7 @@ Public Class frmGameManager
Private Sub ImportOfficialGameList()
If mgrCommon.ShowMessage("Would you like to choose games to import from the official game list?" & vbCrLf & vbCrLf & "This require an active internet connection.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmGameManager_ConfirmOfficialImport), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrMonitorList.DoImport(mgrPath.OfficialImportURL) Then
LoadData()
End If
@@ -1226,7 +1221,55 @@ Public Class frmGameManager
End Sub
Private Sub SetForm()
'Set Form Name
Me.Name = My.Resources.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
End Sub
Private Sub frmGameManager_Load(sender As Object, e As EventArgs) Handles MyBase.Load
SetForm()
If DisableExternalFunctions Then
btnBackup.Visible = False
@@ -1342,14 +1385,14 @@ Public Class frmGameManager
Private Sub btnInclude_Click(sender As Object, e As EventArgs) Handles btnInclude.Click
Dim sInclude As String = txtFileType.Text
OpenBuilder("Include", txtFileType)
UpdateBuilderButtonLabel(txtFileType.Text, "In&clude", btnInclude, (sInclude <> txtFileType.Text))
OpenBuilder(My.Resources.frmGameManager_Include, txtFileType)
UpdateBuilderButtonLabel(txtFileType.Text, My.Resources.frmGameManager_IncludeShortcut, btnInclude, (sInclude <> txtFileType.Text))
End Sub
Private Sub btnExclude_Click(sender As Object, e As EventArgs) Handles btnExclude.Click
Dim sExclude As String = txtExclude.Text
OpenBuilder("Exclude", txtExclude)
UpdateBuilderButtonLabel(txtExclude.Text, "E&xclude", btnExclude, (sExclude <> txtExclude.Text))
OpenBuilder(My.Resources.frmGameManager_Exclude, txtExclude)
UpdateBuilderButtonLabel(txtExclude.Text, My.Resources.frmGameManager_ExcludeShortcut, btnExclude, (sExclude <> txtExclude.Text))
End Sub
Private Sub chkFolderSave_CheckedChanged(sender As Object, e As EventArgs) Handles chkFolderSave.CheckedChanged
@@ -1357,7 +1400,7 @@ Public Class frmGameManager
btnInclude.Enabled = False
If txtFileType.Text <> String.Empty Then
txtFileType.Text = String.Empty
UpdateBuilderButtonLabel(txtFileType.Text, "In&clude", btnInclude, False)
UpdateBuilderButtonLabel(txtFileType.Text, My.Resources.frmGameManager_IncludeShortcut, btnInclude, False)
End If
Else
btnInclude.Enabled = True
+16 -12
View File
@@ -548,9 +548,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.AppCopyright
Dim sConstCopyright As String = Chr(169) & My.Resources.App_Copyright
mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.AppAbout, New String() {sVersion, sProcessType, sRevision, sConstCopyright}), MsgBoxStyle.Information)
mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmMain_About, New String() {sVersion, sProcessType, sRevision, sConstCopyright}), MsgBoxStyle.Information)
End Sub
Private Sub OpenTags()
@@ -811,7 +811,7 @@ Public Class frmMain
Dim bClose As Boolean = False
If bPrompt Then
If mgrCommon.ShowMessage(My.Resources.AppExit, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrCommon.ShowMessage(My.Resources.frmMain_Exit, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
bClose = True
End If
Else
@@ -948,6 +948,9 @@ Public Class frmMain
End Sub
Private Sub SetForm()
'Set Form Name
Me.Name = My.Resources.App_NameLong
'Set Menu Text
gMonFile.Text = My.Resources.frmMain_gMonFile
gMonFileMonitor.Text = My.Resources.frmMain_gMonFileMonitor_Start
@@ -985,6 +988,7 @@ Public Class frmMain
lblLastActionTitle.Text = My.Resources.frmMain_lblLastActionTitle
btnCancelOperation.Text = My.Resources.frmMain_btnCancelOperation
gMonStripStatusButton.Text = My.Resources.frmMain_gMonStripStatusButton
gMonStripStatusButton.ToolTipText = My.Resources.frmMain_gMonStripStatusButtonToolTip
If mgrCommon.IsElevated Then
gMonStripAdminButton.Image = My.Resources.Admin
@@ -1181,17 +1185,17 @@ Public Class frmMain
PauseScan()
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.AppConfirmClean), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.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.AppCleanedGame, oItem.Name), False)
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_ManifestRemovedEntry, oItem.Name), False)
Next
mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.AppCleanedTotal, slItems.Count), MsgBoxStyle.Information)
mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmMain_ManifestTotalRemoved, slItems.Count), MsgBoxStyle.Information)
Else
mgrCommon.ShowMessage(My.Resources.AppAlreadyClean, MsgBoxStyle.Information)
mgrCommon.ShowMessage(My.Resources.frmMain_ManifestAreadyClean, MsgBoxStyle.Information)
End If
End If
@@ -1205,18 +1209,18 @@ Public Class frmMain
PauseScan()
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.AppConfirmRebuild), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrCommon.ShowMessage(mgrCommon.FormatString(My.Resources.frmMain_ConfirmRebuild), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
oLocalDatabase = New mgrSQLite(mgrSQLite.Database.Local)
oRemoteDatabase = New mgrSQLite(mgrSQLite.Database.Remote)
UpdateLog(mgrCommon.FormatString(My.Resources.AppLocalCompactInit, oLocalDatabase.GetDBSize), False)
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_LocalCompactInit, oLocalDatabase.GetDBSize), False)
oLocalDatabase.CompactDatabase()
UpdateLog(mgrCommon.FormatString(My.Resources.AppLocalCompactComplete, oLocalDatabase.GetDBSize), False)
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_LocalCompactComplete, oLocalDatabase.GetDBSize), False)
UpdateLog(mgrCommon.FormatString(My.Resources.AppRemoteCompactInit, oRemoteDatabase.GetDBSize), False)
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_RemoteCompactInit, oRemoteDatabase.GetDBSize), False)
oRemoteDatabase.CompactDatabase()
UpdateLog(mgrCommon.FormatString(My.Resources.AppRemoteCompactComplete, oRemoteDatabase.GetDBSize), False)
UpdateLog(mgrCommon.FormatString(My.Resources.frmMain_RemoteCompactComplete, oRemoteDatabase.GetDBSize), False)
End If
ResumeScan()