diff --git a/GBM/Forms/frmChooseGame.Designer.vb b/GBM/Forms/frmChooseGame.Designer.vb index 0ea2359..0ac5c72 100644 --- a/GBM/Forms/frmChooseGame.Designer.vb +++ b/GBM/Forms/frmChooseGame.Designer.vb @@ -49,6 +49,7 @@ Partial Class frmChooseGame 'lstGameBox ' Me.lstGameBox.FormattingEnabled = True + Me.lstGameBox.HorizontalScrollbar = True Me.lstGameBox.Location = New System.Drawing.Point(15, 34) Me.lstGameBox.Name = "lstGameBox" Me.lstGameBox.Size = New System.Drawing.Size(228, 95) diff --git a/GBM/Forms/frmChooseGame.vb b/GBM/Forms/frmChooseGame.vb index 3a9a18a..a19fac0 100644 --- a/GBM/Forms/frmChooseGame.vb +++ b/GBM/Forms/frmChooseGame.vb @@ -26,11 +26,19 @@ Public Class frmChooseGame End Property Private Sub FillComboBox() + Dim sTags As String + Dim sName As String lstGameBox.ValueMember = "Key" lstGameBox.DisplayMember = "Value" For Each o As clsGame In Process.DuplicateList - lstGameBox.Items.Add(New KeyValuePair(Of String, String)(o.ID, o.Name)) + sTags = mgrGameTags.PrintTagsbyID(o.ID) + If sTags <> String.Empty Then + sName = o.Name & " (" & sTags & ")" + Else + sName = o.Name + End If + lstGameBox.Items.Add(New KeyValuePair(Of String, String)(o.ID, sName)) oGamesHash.Add(o.ID, o) Next diff --git a/GBM/Forms/frmGameManager.vb b/GBM/Forms/frmGameManager.vb index 6454dd9..d1339fc 100644 --- a/GBM/Forms/frmGameManager.vb +++ b/GBM/Forms/frmGameManager.vb @@ -706,13 +706,13 @@ Public Class frmGameManager If eCurrentMode = eModes.Add Then oTagsToSave = frm.TagList - FillTagsbyList(frm.TagList) + lblTags.Text = mgrGameTags.PrintTagsbyList(frm.TagList) Else 'Sync mgrMonitorList.SyncMonitorLists(Settings) 'Only update visible tags if one item is selected - If lstGames.SelectedItems.Count = 1 Then FillTagsbyID(CurrentGame.ID) + If lstGames.SelectedItems.Count = 1 Then lblTags.Text = mgrGameTags.PrintTagsbyID(CurrentGame.ID) 'If a tag filter is enabled, reload list to reflect changes If optCustom.Checked Then @@ -954,7 +954,7 @@ Public Class frmGameManager txtVersion.Text = oApp.Version txtIcon.Text = oApp.Icon - FillTagsbyID(oData.Key) + lblTags.Text = mgrGameTags.PrintTagsbyID(oData.Key) 'Icon If IO.File.Exists(oApp.Icon) Then @@ -973,33 +973,6 @@ Public Class frmGameManager IsLoading = False End Sub - Private Sub FillTagsbyID(ByVal sID As String) - Dim slTags As SortedList - Dim oTag As clsTag - Dim sTags As String = String.Empty - Dim cTrim() As Char = {",", " "} - - slTags = mgrGameTags.GetTagsByGame(sID) - - For Each de As DictionaryEntry In slTags - oTag = DirectCast(de.Value, clsTag) - sTags &= "#" & oTag.Name & ", " - Next - - lblTags.Text = sTags.TrimEnd(cTrim) - End Sub - - Private Sub FillTagsbyList(ByVal oList As List(Of KeyValuePair(Of String, String))) - Dim sTags As String = String.Empty - Dim cTrim() As Char = {",", " "} - - For Each kp As KeyValuePair(Of String, String) In oList - sTags &= "#" & kp.Value & ", " - Next - - lblTags.Text = sTags.TrimEnd(cTrim) - End Sub - Private Sub DirtyCheck_ValueChanged(sender As Object, e As EventArgs) If Not IsLoading And Not eCurrentMode = eModes.MultiSelect Then IsDirty = True diff --git a/GBM/Managers/mgrGameTags.vb b/GBM/Managers/mgrGameTags.vb index 78e5e1c..3ce01ec 100644 --- a/GBM/Managers/mgrGameTags.vb +++ b/GBM/Managers/mgrGameTags.vb @@ -281,4 +281,31 @@ End Function + Public Shared Function PrintTagsbyID(ByVal sID As String) As String + Dim slTags As SortedList + Dim oTag As clsTag + Dim sTags As String = String.Empty + Dim cTrim() As Char = {",", " "} + + slTags = mgrGameTags.GetTagsByGame(sID) + + For Each de As DictionaryEntry In slTags + oTag = DirectCast(de.Value, clsTag) + sTags &= "#" & oTag.Name & ", " + Next + + Return sTags.TrimEnd(cTrim) + End Function + + Public Shared Function PrintTagsbyList(ByVal oList As List(Of KeyValuePair(Of String, String))) As String + Dim sTags As String = String.Empty + Dim cTrim() As Char = {",", " "} + + For Each kp As KeyValuePair(Of String, String) In oList + sTags &= "#" & kp.Value & ", " + Next + + Return sTags.TrimEnd(cTrim) + End Function + End Class