From 39bbafd73153a3ea4bee6724a98a84a33760031c Mon Sep 17 00:00:00 2001 From: "Michael J. Seiferling" Date: Mon, 30 Nov 2015 21:25:39 -0600 Subject: [PATCH] Various tweaks and changes --- GBM/Forms/frmGameManager.Designer.vb | 5 +- GBM/Forms/frmGameManager.vb | 12 +++- GBM/Forms/frmIncludeExclude.Designer.vb | 2 +- GBM/Forms/frmIncludeExclude.resx | 2 +- GBM/Forms/frmIncludeExclude.vb | 8 +-- GBM/Forms/frmMain.Designer.vb | 69 ++++++++++++-------- GBM/Forms/frmMain.vb | 86 ++++++++++++++----------- GBM/Managers/mgrPath.vb | 13 ++-- 8 files changed, 118 insertions(+), 79 deletions(-) diff --git a/GBM/Forms/frmGameManager.Designer.vb b/GBM/Forms/frmGameManager.Designer.vb index 7a8a877..2119134 100644 --- a/GBM/Forms/frmGameManager.Designer.vb +++ b/GBM/Forms/frmGameManager.Designer.vb @@ -469,14 +469,13 @@ Partial Class frmGameManager Me.grpStats.Controls.Add(Me.lblLastBackup) Me.grpStats.Location = New System.Drawing.Point(238, 365) Me.grpStats.Name = "grpStats" - Me.grpStats.Size = New System.Drawing.Size(534, 154) + Me.grpStats.Size = New System.Drawing.Size(534, 137) Me.grpStats.TabIndex = 11 Me.grpStats.TabStop = False Me.grpStats.Text = "Backup Information" ' 'btnOpenRestorePath ' - Me.btnOpenRestorePath.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.btnOpenRestorePath.Location = New System.Drawing.Point(339, 105) Me.btnOpenRestorePath.Name = "btnOpenRestorePath" Me.btnOpenRestorePath.Size = New System.Drawing.Size(114, 23) @@ -486,7 +485,6 @@ Partial Class frmGameManager ' 'btnOpenBackupFile ' - Me.btnOpenBackupFile.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.btnOpenBackupFile.Location = New System.Drawing.Point(216, 105) Me.btnOpenBackupFile.Name = "btnOpenBackupFile" Me.btnOpenBackupFile.Size = New System.Drawing.Size(114, 23) @@ -505,7 +503,6 @@ Partial Class frmGameManager ' 'btnDeleteBackup ' - Me.btnDeleteBackup.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.btnDeleteBackup.Location = New System.Drawing.Point(96, 105) Me.btnDeleteBackup.Name = "btnDeleteBackup" Me.btnDeleteBackup.Size = New System.Drawing.Size(114, 23) diff --git a/GBM/Forms/frmGameManager.vb b/GBM/Forms/frmGameManager.vb index ff8585c..ad2b960 100644 --- a/GBM/Forms/frmGameManager.vb +++ b/GBM/Forms/frmGameManager.vb @@ -738,6 +738,8 @@ Public Class frmGameManager chkMonitorOnly.Checked = False btnTags.Enabled = False lblTags.Visible = False + btnInclude.Text = "In&clude Items..." + btnExclude.Text = "E&xclude Items..." Case eModes.Edit grpFilter.Enabled = False lstGames.Enabled = False @@ -788,6 +790,8 @@ Public Class frmGameManager btnBackup.Enabled = False btnTags.Enabled = False lblTags.Visible = False + btnInclude.Text = "In&clude Items..." + btnExclude.Text = "E&xclude Items..." Case eModes.Disabled grpFilter.Enabled = True lstGames.Enabled = True @@ -810,6 +814,8 @@ Public Class frmGameManager btnRestore.Enabled = False btnMarkAsRestored.Enabled = False btnTags.Enabled = False + btnInclude.Text = "In&clude Items..." + btnExclude.Text = "E&xclude Items..." Case eModes.MultiSelect lstGames.Enabled = True WipeControls(grpConfig.Controls) @@ -1253,13 +1259,15 @@ Public Class frmGameManager End Sub 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, (oCurrentGame.FileType <> txtFileType.Text)) + UpdateBuilderButtonLabel(txtFileType.Text, "In&clude", 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, (oCurrentGame.ExcludeList <> txtExclude.Text)) + UpdateBuilderButtonLabel(txtExclude.Text, "E&xclude", btnExclude, (sExclude <> txtExclude.Text)) End Sub Private Sub chkFolderSave_CheckedChanged(sender As Object, e As EventArgs) Handles chkFolderSave.CheckedChanged diff --git a/GBM/Forms/frmIncludeExclude.Designer.vb b/GBM/Forms/frmIncludeExclude.Designer.vb index df304ad..2d52f55 100644 --- a/GBM/Forms/frmIncludeExclude.Designer.vb +++ b/GBM/Forms/frmIncludeExclude.Designer.vb @@ -214,7 +214,7 @@ Partial Class frmIncludeExclude Me.lblSaveFolder.Name = "lblSaveFolder" Me.lblSaveFolder.Size = New System.Drawing.Size(250, 13) Me.lblSaveFolder.TabIndex = 15 - Me.lblSaveFolder.Text = "Saved Game Folder" + Me.lblSaveFolder.Text = "Saved Game Explorer" Me.lblSaveFolder.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'ttWarning diff --git a/GBM/Forms/frmIncludeExclude.resx b/GBM/Forms/frmIncludeExclude.resx index 423d39f..0f14aeb 100644 --- a/GBM/Forms/frmIncludeExclude.resx +++ b/GBM/Forms/frmIncludeExclude.resx @@ -125,7 +125,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAB6 - CQAAAk1TRnQBSQFMAgEBAwEAAaABAAGgAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CQAAAk1TRnQBSQFMAgEBAwEAAagBAAGoAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA diff --git a/GBM/Forms/frmIncludeExclude.vb b/GBM/Forms/frmIncludeExclude.vb index d246558..d7e27b0 100644 --- a/GBM/Forms/frmIncludeExclude.vb +++ b/GBM/Forms/frmIncludeExclude.vb @@ -2,7 +2,7 @@ Public Class frmIncludeExclude - Dim sFormName As String = "Include Exclude" + Dim sFormName As String = "Builder" Dim sRootFolder As String = String.Empty Dim sBuilderString As String @@ -187,7 +187,7 @@ Public Class frmIncludeExclude Dim iType As Integer = 1 Dim sFolderCheck As String - If sNewLabel.Contains("*") Then + If sNewLabel.Contains("*") Or sNewLabel.Contains("?") Then iType = 2 Else If txtRootFolder.Text <> String.Empty Then @@ -222,7 +222,7 @@ Public Class frmIncludeExclude Private Sub OpenRawEdit() Dim sCurrentString As String = CreateNewBuilderString() Dim sNewString As String - sNewString = InputBox("Entries are semi-colon delimited.", FormName & " Raw Edit", sCurrentString) + sNewString = InputBox("Items are semi-colon delimited.", FormName & " Raw Edit", sCurrentString) If sNewString <> String.Empty Then ParseBuilderString(sNewString) End If @@ -243,7 +243,7 @@ Public Class frmIncludeExclude If Not treFiles.SelectedNode Is Nothing Then treFiles.SelectedNode.Expand() If txtRootFolder.Text = String.Empty Then ttWarning.ToolTipTitle = "Notice" - ttWarning.Show("The saved game folder could not be determined or does not exist. Click here to manually set it.", btnBrowse, 10000) + ttWarning.Show("The saved game folder could not be determined or does not exist.", txtRootFolder, 6000) End If End Sub diff --git a/GBM/Forms/frmMain.Designer.vb b/GBM/Forms/frmMain.Designer.vb index 303b56d..e680c26 100644 --- a/GBM/Forms/frmMain.Designer.vb +++ b/GBM/Forms/frmMain.Designer.vb @@ -34,6 +34,7 @@ Partial Class frmMain Me.gMonTraySetupAddWizard = New System.Windows.Forms.ToolStripMenuItem() Me.gMonTraySetupGameManager = New System.Windows.Forms.ToolStripMenuItem() Me.gMonTraySetupCustomVariables = New System.Windows.Forms.ToolStripMenuItem() + Me.gMonTraySetupTags = New System.Windows.Forms.ToolStripMenuItem() Me.gMonTrayTools = New System.Windows.Forms.ToolStripMenuItem() Me.gMonTrayToolsGameList = New System.Windows.Forms.ToolStripMenuItem() Me.gMonTrayToolsGameImportOfficialList = New System.Windows.Forms.ToolStripMenuItem() @@ -60,6 +61,7 @@ Partial Class frmMain Me.gMonSetupGameManager = New System.Windows.Forms.ToolStripMenuItem() Me.gMonSetupAddWizard = New System.Windows.Forms.ToolStripMenuItem() Me.gMonSetupCustomVariables = New System.Windows.Forms.ToolStripMenuItem() + Me.gMonSetupTags = New System.Windows.Forms.ToolStripMenuItem() Me.gMonTools = New System.Windows.Forms.ToolStripMenuItem() Me.gMonToolsGameList = New System.Windows.Forms.ToolStripMenuItem() Me.gMonToolsGameImportOfficialList = New System.Windows.Forms.ToolStripMenuItem() @@ -78,10 +80,10 @@ Partial Class frmMain Me.lblLastActionTitle = New System.Windows.Forms.Label() Me.lblTimeTitle = New System.Windows.Forms.Label() Me.lblTimeSpent = New System.Windows.Forms.Label() - Me.txtGameInfo = New System.Windows.Forms.TextBox() Me.btnCancelOperation = New System.Windows.Forms.Button() - Me.gMonSetupTags = New System.Windows.Forms.ToolStripMenuItem() - Me.gMonTraySetupTags = New System.Windows.Forms.ToolStripMenuItem() + Me.lblStatus1 = New System.Windows.Forms.Label() + Me.lblStatus2 = New System.Windows.Forms.Label() + Me.lblStatus3 = New System.Windows.Forms.Label() Me.gMonTrayMenu.SuspendLayout() Me.gMonStatusStrip.SuspendLayout() Me.gMonMainMenu.SuspendLayout() @@ -151,6 +153,12 @@ Partial Class frmMain Me.gMonTraySetupCustomVariables.Size = New System.Drawing.Size(201, 22) Me.gMonTraySetupCustomVariables.Text = "Custom &Path Variables..." ' + 'gMonTraySetupTags + ' + Me.gMonTraySetupTags.Name = "gMonTraySetupTags" + Me.gMonTraySetupTags.Size = New System.Drawing.Size(201, 22) + Me.gMonTraySetupTags.Text = "&Tags" + ' 'gMonTrayTools ' Me.gMonTrayTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonTrayToolsGameList, Me.gMonTrayToolsSyncMan, Me.gMonTrayToolsCompact}) @@ -334,6 +342,12 @@ Partial Class frmMain Me.gMonSetupCustomVariables.Size = New System.Drawing.Size(201, 22) Me.gMonSetupCustomVariables.Text = "Custom &Path Variables..." ' + 'gMonSetupTags + ' + Me.gMonSetupTags.Name = "gMonSetupTags" + Me.gMonSetupTags.Size = New System.Drawing.Size(201, 22) + Me.gMonSetupTags.Text = "&Tags..." + ' 'gMonTools ' Me.gMonTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonToolsGameList, Me.gMonToolsSyncMan, Me.gMonToolsCompact}) @@ -469,19 +483,6 @@ Partial Class frmMain Me.lblTimeSpent.TabIndex = 14 Me.lblTimeSpent.Text = "0 Hours" ' - 'txtGameInfo - ' - Me.txtGameInfo.BorderStyle = System.Windows.Forms.BorderStyle.None - Me.txtGameInfo.Cursor = System.Windows.Forms.Cursors.Default - Me.txtGameInfo.Location = New System.Drawing.Point(69, 71) - Me.txtGameInfo.Multiline = True - Me.txtGameInfo.Name = "txtGameInfo" - Me.txtGameInfo.ReadOnly = True - Me.txtGameInfo.Size = New System.Drawing.Size(443, 52) - Me.txtGameInfo.TabIndex = 0 - Me.txtGameInfo.TabStop = False - Me.txtGameInfo.WordWrap = False - ' 'btnCancelOperation ' Me.btnCancelOperation.Location = New System.Drawing.Point(437, 103) @@ -491,25 +492,39 @@ Partial Class frmMain Me.btnCancelOperation.Text = "&Cancel" Me.btnCancelOperation.UseVisualStyleBackColor = True ' - 'gMonSetupTags + 'lblStatus1 ' - Me.gMonSetupTags.Name = "gMonSetupTags" - Me.gMonSetupTags.Size = New System.Drawing.Size(201, 22) - Me.gMonSetupTags.Text = "&Tags..." + Me.lblStatus1.AutoEllipsis = True + Me.lblStatus1.Location = New System.Drawing.Point(66, 71) + Me.lblStatus1.Name = "lblStatus1" + Me.lblStatus1.Size = New System.Drawing.Size(446, 13) + Me.lblStatus1.TabIndex = 15 ' - 'gMonTraySetupTags + 'lblStatus2 ' - Me.gMonTraySetupTags.Name = "gMonTraySetupTags" - Me.gMonTraySetupTags.Size = New System.Drawing.Size(201, 22) - Me.gMonTraySetupTags.Text = "&Tags" + Me.lblStatus2.AutoEllipsis = True + Me.lblStatus2.Location = New System.Drawing.Point(66, 87) + Me.lblStatus2.Name = "lblStatus2" + Me.lblStatus2.Size = New System.Drawing.Size(446, 13) + Me.lblStatus2.TabIndex = 16 + ' + 'lblStatus3 + ' + Me.lblStatus3.AutoEllipsis = True + Me.lblStatus3.Location = New System.Drawing.Point(66, 103) + Me.lblStatus3.Name = "lblStatus3" + Me.lblStatus3.Size = New System.Drawing.Size(365, 13) + Me.lblStatus3.TabIndex = 17 ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(524, 372) + Me.Controls.Add(Me.lblStatus3) + Me.Controls.Add(Me.lblStatus2) + Me.Controls.Add(Me.lblStatus1) Me.Controls.Add(Me.btnCancelOperation) - Me.Controls.Add(Me.txtGameInfo) Me.Controls.Add(Me.lblTimeSpent) Me.Controls.Add(Me.lblTimeTitle) Me.Controls.Add(Me.lblLastActionTitle) @@ -579,7 +594,6 @@ Partial Class frmMain Friend WithEvents gMonTraySetupAddWizard As System.Windows.Forms.ToolStripMenuItem Friend WithEvents lblTimeTitle As System.Windows.Forms.Label Friend WithEvents lblTimeSpent As System.Windows.Forms.Label - Friend WithEvents txtGameInfo As System.Windows.Forms.TextBox Friend WithEvents gMonToolsGameList As System.Windows.Forms.ToolStripMenuItem Friend WithEvents gMonToolsGameImportOfficialList As System.Windows.Forms.ToolStripMenuItem Friend WithEvents gMonToolsGameImportList As System.Windows.Forms.ToolStripMenuItem @@ -598,4 +612,7 @@ Partial Class frmMain Friend WithEvents gMonStripAdminButton As ToolStripSplitButton Friend WithEvents gMonTraySetupTags As System.Windows.Forms.ToolStripMenuItem Friend WithEvents gMonSetupTags As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents lblStatus1 As Label + Friend WithEvents lblStatus2 As Label + Friend WithEvents lblStatus3 As Label End Class diff --git a/GBM/Forms/frmMain.vb b/GBM/Forms/frmMain.vb index 5c5d6cd..8fd951d 100644 --- a/GBM/Forms/frmMain.vb +++ b/GBM/Forms/frmMain.vb @@ -35,7 +35,9 @@ Public Class frmMain Private bAllowIcon As Boolean = False Private bAllowDetails As Boolean = False Private oPriorImage As Image - Private sPriorDetails As String + Private sPriorPath As String + Private sPriorCompany As String + Private sPriorVersion As String WithEvents oFileWatcher As New System.IO.FileSystemWatcher WithEvents tmScanTimer As New Timer @@ -47,7 +49,7 @@ Public Class frmMain Public oSettings As New mgrSettings Delegate Sub UpdateLogCallBack(ByVal sLogUpdate As String, ByVal bTrayUpdate As Boolean, ByVal objIcon As System.Windows.Forms.ToolTipIcon, ByVal bTimeStamp As Boolean) - Delegate Sub WorkingGameInfoCallBack(ByVal sTitle As String, ByVal sInfo As String) + Delegate Sub WorkingGameInfoCallBack(ByVal sTitle As String, ByVal sStatus1 As String, ByVal sStatus2 As String, ByVal sStatus3 As String) Delegate Sub UpdateStatusCallBack(ByVal sStatus As String) Delegate Sub SetLastActionCallBack(ByVal sString As String) Delegate Sub OperationEndedCallBack() @@ -67,37 +69,38 @@ Public Class frmMain End Sub Private Sub SetRestoreInfo(ByVal oRestoreInfo As clsBackup) Handles oRestore.UpdateRestoreInfo - Dim sInfo As String + Dim sStatus1 As String + Dim sStatus2 As String + Dim sStatus3 As String 'Build Info - sInfo = IO.Path.GetFileName(oRestoreInfo.FileName) & vbCrLf & "Updated by " & oRestoreInfo.UpdatedBy & " on " & oRestoreInfo.DateUpdated & vbCrLf + sStatus1 = IO.Path.GetFileName(oRestoreInfo.FileName) + sStatus2 = "Updated by " & oRestoreInfo.UpdatedBy & " on " & oRestoreInfo.DateUpdated If oRestoreInfo.AbsolutePath Then - sInfo = sInfo & oRestoreInfo.RestorePath + sStatus3 = oRestoreInfo.RestorePath Else - sInfo = sInfo & oRestoreInfo.RelativeRestorePath + sStatus3 = oRestoreInfo.RelativeRestorePath End If - WorkingGameInfo("Restore in progress...", sInfo) + WorkingGameInfo("Restore in progress...", sStatus1, sStatus2, sStatus3) UpdateStatus("Restore in progress...") End Sub Private Sub SetBackupInfo(ByVal oGame As clsGame) Handles oBackup.UpdateBackupInfo - Dim sInfo As String + Dim sStatus1 As String + Dim sStatus2 As String + Dim sStatus3 As String 'Build Info - sInfo = oGame.CroppedName & vbCrLf - If oGame.FolderSave Then - sInfo = sInfo & "Full Folder Backup" & vbCrLf - Else - sInfo = sInfo & "File Type Backup: " & oGame.FileType & vbCrLf - End If + sStatus1 = oGame.CroppedName If oGame.AbsolutePath Then - sInfo = sInfo & oGame.Path + sStatus2 = oGame.Path Else - sInfo = sInfo & oGame.ProcessPath & "\" & oGame.Path + sStatus2 = oGame.ProcessPath & "\" & oGame.Path End If + sStatus3 = String.Empty - WorkingGameInfo("Backup in Progress...", sInfo) + WorkingGameInfo("Backup in Progress...", sStatus1, sStatus2, sStatus3) UpdateStatus("Backup in progress...") End Sub @@ -366,7 +369,9 @@ Public Class frmMain If bKeepInfo And Not oProcess.GameInfo Is Nothing Then lblGameTitle.Text = "Last Game: " & oProcess.GameInfo.CroppedName pbIcon.Image = oPriorImage - txtGameInfo.Text = sPriorDetails + lblStatus1.Text = sPriorPath + lblStatus2.Text = sPriorCompany + lblStatus3.Text = sPriorVersion If oSettings.TimeTracking Then lblTimeTitle.Visible = True lblTimeSpent.Visible = True @@ -374,7 +379,9 @@ Public Class frmMain Else pbIcon.Image = My.Resources.Searching lblGameTitle.Text = "No Game Detected" - txtGameInfo.Clear() + lblStatus1.Text = String.Empty + lblStatus2.Text = String.Empty + lblStatus3.Text = String.Empty lblTimeTitle.Visible = False lblTimeSpent.Visible = False End If @@ -387,17 +394,19 @@ Public Class frmMain End Sub - Private Sub WorkingGameInfo(ByVal sTitle As String, ByVal sInfo As String) + Private Sub WorkingGameInfo(ByVal sTitle As String, ByVal sStatus1 As String, ByVal sStatus2 As String, ByVal sStatus3 As String) 'Thread Safe (If one control requires an invoke assume they all do) If pbIcon.InvokeRequired = True Then Dim d As New WorkingGameInfoCallBack(AddressOf WorkingGameInfo) - Me.Invoke(d, New Object() {sTitle, sInfo}) + Me.Invoke(d, New Object() {sTitle, sStatus1, sStatus2, sStatus3}) Else lblTimeTitle.Visible = False lblTimeSpent.Visible = False pbIcon.Image = My.Resources.Working lblGameTitle.Text = sTitle - txtGameInfo.Text = sInfo + lblStatus1.Text = sStatus1 + lblStatus2.Text = sStatus2 + lblStatus3.Text = sStatus3 End If End Sub @@ -407,7 +416,9 @@ Public Class frmMain Dim sCompanyName As String = String.Empty 'Wipe Game Info - txtGameInfo.Clear() + lblStatus1.Text = String.Empty + lblStatus2.Text = String.Empty + lblStatus3.Text = String.Empty 'Get Game Details If bMulti Then @@ -417,7 +428,7 @@ Public Class frmMain lblTimeTitle.Visible = False lblTimeSpent.Visible = False pbIcon.Image = My.Resources.Unknown - txtGameInfo.AppendText("Details are not available when multiple games are detected.") + lblStatus1.Text = "Game details are unavailable." Else bAllowIcon = True bAllowDetails = True @@ -462,27 +473,30 @@ Public Class frmMain 'Set Details If sFileName = String.Empty Then - txtGameInfo.AppendText("Path Not Available") + lblStatus1.Text = "Path Not Available" Else - txtGameInfo.AppendText(sFileName) - End If - - If sFileVersion = String.Empty Then - txtGameInfo.AppendText(vbCrLf & "No Version Set") - Else - txtGameInfo.AppendText(vbCrLf & sFileVersion) + lblStatus1.Text = sFileName End If If sCompanyName = String.Empty Then - txtGameInfo.AppendText(vbCrLf & "No Company Set") + lblStatus2.Text = "No Company Set" Else - txtGameInfo.AppendText(vbCrLf & sCompanyName) + lblStatus2.Text = sCompanyName End If + + If sFileVersion = String.Empty Then + lblStatus3.Text = "No Version Set" + Else + lblStatus3.Text = sFileVersion + End If + End If 'Set Prior Info oPriorImage = pbIcon.Image - sPriorDetails = txtGameInfo.Text + sPriorPath = lblStatus1.Text + sPriorCompany = lblStatus2.Text + sPriorVersion = lblStatus3.Text End Sub Private Sub UpdateTimeSpent(ByVal dTotalTime As Double, ByVal dSessionTime As Double) @@ -1421,7 +1435,7 @@ Public Class frmMain End If End Sub - Private Sub txtGameInfo_Enter(sender As Object, e As EventArgs) Handles txtGameInfo.Enter + Private Sub txtGameInfo_Enter(sender As Object, e As EventArgs) btnLogToggle.Focus() End Sub diff --git a/GBM/Managers/mgrPath.vb b/GBM/Managers/mgrPath.vb index 29bcb0f..449a98f 100644 --- a/GBM/Managers/mgrPath.vb +++ b/GBM/Managers/mgrPath.vb @@ -108,12 +108,15 @@ Public Class mgrPath End Set End Property - - Public Shared Function ValidateForFileSystem(ByVal sCheckString As String) As String - Dim cInvalidCharacters As Char() = {"\", "/", ":", "*", "?", """", "<", ">", "|"} + Dim cInvalidFileCharacters As Char() = Path.GetInvalidFileNameChars + Dim cInvalidPathCharacters As Char() = Path.GetInvalidPathChars - For Each c As Char In cInvalidCharacters + For Each c As Char In cInvalidFileCharacters + sCheckString = sCheckString.Replace(c, "") + Next + + For Each c As Char In cInvalidPathCharacters sCheckString = sCheckString.Replace(c, "") Next @@ -121,7 +124,7 @@ Public Class mgrPath sCheckString = sCheckString.Substring(0, 257) End If - Return sCheckString + Return sCheckString.Trim End Function Public Shared Function DetermineRelativePath(ByVal sProcessPath As String, ByVal sSavePath As String) As String Dim sPath1Array As String()