Fix #177
This commit is contained in:
Generated
+1
@@ -49,6 +49,7 @@ Partial Class frmChooseGame
|
|||||||
'lstGameBox
|
'lstGameBox
|
||||||
'
|
'
|
||||||
Me.lstGameBox.FormattingEnabled = True
|
Me.lstGameBox.FormattingEnabled = True
|
||||||
|
Me.lstGameBox.HorizontalScrollbar = True
|
||||||
Me.lstGameBox.Location = New System.Drawing.Point(15, 34)
|
Me.lstGameBox.Location = New System.Drawing.Point(15, 34)
|
||||||
Me.lstGameBox.Name = "lstGameBox"
|
Me.lstGameBox.Name = "lstGameBox"
|
||||||
Me.lstGameBox.Size = New System.Drawing.Size(228, 95)
|
Me.lstGameBox.Size = New System.Drawing.Size(228, 95)
|
||||||
|
|||||||
@@ -26,11 +26,19 @@ Public Class frmChooseGame
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Sub FillComboBox()
|
Private Sub FillComboBox()
|
||||||
|
Dim sTags As String
|
||||||
|
Dim sName As String
|
||||||
lstGameBox.ValueMember = "Key"
|
lstGameBox.ValueMember = "Key"
|
||||||
lstGameBox.DisplayMember = "Value"
|
lstGameBox.DisplayMember = "Value"
|
||||||
|
|
||||||
For Each o As clsGame In Process.DuplicateList
|
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)
|
oGamesHash.Add(o.ID, o)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|||||||
@@ -706,13 +706,13 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
If eCurrentMode = eModes.Add Then
|
If eCurrentMode = eModes.Add Then
|
||||||
oTagsToSave = frm.TagList
|
oTagsToSave = frm.TagList
|
||||||
FillTagsbyList(frm.TagList)
|
lblTags.Text = mgrGameTags.PrintTagsbyList(frm.TagList)
|
||||||
Else
|
Else
|
||||||
'Sync
|
'Sync
|
||||||
mgrMonitorList.SyncMonitorLists(Settings)
|
mgrMonitorList.SyncMonitorLists(Settings)
|
||||||
|
|
||||||
'Only update visible tags if one item is selected
|
'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 a tag filter is enabled, reload list to reflect changes
|
||||||
If optCustom.Checked Then
|
If optCustom.Checked Then
|
||||||
@@ -954,7 +954,7 @@ Public Class frmGameManager
|
|||||||
txtVersion.Text = oApp.Version
|
txtVersion.Text = oApp.Version
|
||||||
txtIcon.Text = oApp.Icon
|
txtIcon.Text = oApp.Icon
|
||||||
|
|
||||||
FillTagsbyID(oData.Key)
|
lblTags.Text = mgrGameTags.PrintTagsbyID(oData.Key)
|
||||||
|
|
||||||
'Icon
|
'Icon
|
||||||
If IO.File.Exists(oApp.Icon) Then
|
If IO.File.Exists(oApp.Icon) Then
|
||||||
@@ -973,33 +973,6 @@ Public Class frmGameManager
|
|||||||
IsLoading = False
|
IsLoading = False
|
||||||
End Sub
|
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)
|
Private Sub DirtyCheck_ValueChanged(sender As Object, e As EventArgs)
|
||||||
If Not IsLoading And Not eCurrentMode = eModes.MultiSelect Then
|
If Not IsLoading And Not eCurrentMode = eModes.MultiSelect Then
|
||||||
IsDirty = True
|
IsDirty = True
|
||||||
|
|||||||
@@ -281,4 +281,31 @@
|
|||||||
|
|
||||||
End Function
|
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
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user