Bug fixes for issues 13, 18, 21
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
Private oProcess As mgrProcesses
|
Private oProcess As mgrProcesses
|
||||||
Private oGame As clsGame
|
Private oGame As clsGame
|
||||||
Private oGamesList As New List(Of KeyValuePair(Of String, String))
|
|
||||||
Private oGamesHash As New Hashtable
|
Private oGamesHash As New Hashtable
|
||||||
Private bGameSelected As Boolean = False
|
Private bGameSelected As Boolean = False
|
||||||
|
|
||||||
@@ -25,14 +24,14 @@
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Sub FillComboBox()
|
Private Sub FillComboBox()
|
||||||
|
lstGameBox.ValueMember = "Key"
|
||||||
|
lstGameBox.DisplayMember = "Value"
|
||||||
|
|
||||||
For Each o As clsGame In Process.DuplicateList
|
For Each o As clsGame In Process.DuplicateList
|
||||||
oGamesList.Add(New KeyValuePair(Of String, String)(o.ID, o.Name))
|
lstGameBox.Items.Add(New KeyValuePair(Of String, String)(o.ID, o.Name))
|
||||||
oGamesHash.Add(o.ID, o)
|
oGamesHash.Add(o.ID, o)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
lstGameBox.ValueMember = "key"
|
|
||||||
lstGameBox.DisplayMember = "value"
|
|
||||||
lstGameBox.DataSource = oGamesList
|
|
||||||
lstGameBox.SelectedIndex = 0
|
lstGameBox.SelectedIndex = 0
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -42,9 +41,8 @@
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub GetSelection()
|
Private Sub GetSelection()
|
||||||
Dim sSelectedGame As String
|
Dim oSelected As KeyValuePair(Of String, String) = lstGameBox.SelectedItem
|
||||||
sSelectedGame = CStr(lstGameBox.SelectedValue)
|
oGame = DirectCast(oGamesHash.Item(oSelected.Key), clsGame)
|
||||||
oGame = DirectCast(oGamesHash.Item(sSelectedGame), clsGame)
|
|
||||||
SaveSelection()
|
SaveSelection()
|
||||||
bGameSelected = True
|
bGameSelected = True
|
||||||
Me.DialogResult = DialogResult.OK
|
Me.DialogResult = DialogResult.OK
|
||||||
|
|||||||
@@ -314,7 +314,9 @@
|
|||||||
</BootstrapperPackage>
|
</BootstrapperPackage>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="gbm.ico" />
|
<Content Include="gbm.ico">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="License\credits.txt">
|
<Content Include="License\credits.txt">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ Public Class mgrBackup
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If oGame.FolderSave = True Then
|
If oGame.FolderSave = True Then
|
||||||
BuildFileList(sSavePath, "*.*", mgrPath.IncludeFileLocation)
|
BuildFileList(sSavePath, "*", mgrPath.IncludeFileLocation)
|
||||||
Else
|
Else
|
||||||
BuildFileList(sSavePath, oGame.FileType, mgrPath.IncludeFileLocation)
|
BuildFileList(sSavePath, oGame.FileType, mgrPath.IncludeFileLocation)
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -119,6 +119,7 @@ Public Class mgrMonitorList
|
|||||||
Dim oFromItem As clsGame
|
Dim oFromItem As clsGame
|
||||||
Dim oToItem As clsGame
|
Dim oToItem As clsGame
|
||||||
Dim iChanges As Integer
|
Dim iChanges As Integer
|
||||||
|
Dim sCompareKey As String
|
||||||
|
|
||||||
Cursor.Current = Cursors.WaitCursor
|
Cursor.Current = Cursors.WaitCursor
|
||||||
|
|
||||||
@@ -140,10 +141,11 @@ Public Class mgrMonitorList
|
|||||||
hshSyncItems = hshCompareFrom.Clone
|
hshSyncItems = hshCompareFrom.Clone
|
||||||
|
|
||||||
For Each oFromItem In hshCompareFrom.Values
|
For Each oFromItem In hshCompareFrom.Values
|
||||||
If hshCompareTo.Contains(oFromItem.ProcessName) Then
|
sCompareKey = oFromItem.ProcessName & ":" & oFromItem.Name
|
||||||
oToItem = DirectCast(hshCompareTo(oFromItem.ProcessName), clsGame)
|
If hshCompareTo.Contains(sCompareKey) Then
|
||||||
|
oToItem = DirectCast(hshCompareTo(sCompareKey), clsGame)
|
||||||
If oFromItem.SyncEquals(oToItem) Then
|
If oFromItem.SyncEquals(oToItem) Then
|
||||||
hshSyncItems.Remove(oFromItem.ProcessName)
|
hshSyncItems.Remove(sCompareKey)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -171,10 +173,11 @@ Public Class mgrMonitorList
|
|||||||
hshDeleteItems = hshCompareTo.Clone
|
hshDeleteItems = hshCompareTo.Clone
|
||||||
|
|
||||||
For Each oToItem In hshCompareTo.Values
|
For Each oToItem In hshCompareTo.Values
|
||||||
If hshCompareFrom.Contains(oToItem.ProcessName) Then
|
sCompareKey = oToItem.ProcessName & ":" & oToItem.Name
|
||||||
oFromItem = DirectCast(hshCompareFrom(oToItem.ProcessName), clsGame)
|
If hshCompareFrom.Contains(sCompareKey) Then
|
||||||
|
oFromItem = DirectCast(hshCompareFrom(sCompareKey), clsGame)
|
||||||
If oToItem.MinimalEquals(oFromItem) Then
|
If oToItem.MinimalEquals(oFromItem) Then
|
||||||
hshDeleteItems.Remove(oToItem.ProcessName)
|
hshDeleteItems.Remove(sCompareKey)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -196,6 +199,7 @@ Public Class mgrMonitorList
|
|||||||
Dim hshSyncItems As Hashtable
|
Dim hshSyncItems As Hashtable
|
||||||
Dim oFromItem As clsGame
|
Dim oFromItem As clsGame
|
||||||
Dim oToItem As clsGame
|
Dim oToItem As clsGame
|
||||||
|
Dim sCompareKey As String
|
||||||
|
|
||||||
Cursor.Current = Cursors.WaitCursor
|
Cursor.Current = Cursors.WaitCursor
|
||||||
|
|
||||||
@@ -206,10 +210,11 @@ Public Class mgrMonitorList
|
|||||||
hshSyncItems = hshCompareFrom.Clone
|
hshSyncItems = hshCompareFrom.Clone
|
||||||
|
|
||||||
For Each oFromItem In hshCompareFrom.Values
|
For Each oFromItem In hshCompareFrom.Values
|
||||||
If hshCompareTo.Contains(oFromItem.ProcessName) Then
|
sCompareKey = oFromItem.ProcessName & ":" & oFromItem.Name
|
||||||
oToItem = DirectCast(hshCompareTo(oFromItem.ProcessName), clsGame)
|
If hshCompareTo.Contains(sCompareKey) Then
|
||||||
|
oToItem = DirectCast(hshCompareTo(sCompareKey), clsGame)
|
||||||
If oFromItem.CoreEquals(oToItem) Then
|
If oFromItem.CoreEquals(oToItem) Then
|
||||||
hshSyncItems.Remove(oFromItem.ProcessName)
|
hshSyncItems.Remove(sCompareKey)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -257,7 +262,6 @@ Public Class mgrMonitorList
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Shared Function ReadFilteredList(ByVal oFilters As List(Of clsTag), ByVal eFilterType As frmFilter.eFilterType, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local) As Hashtable
|
Public Shared Function ReadFilteredList(ByVal oFilters As List(Of clsTag), ByVal eFilterType As frmFilter.eFilterType, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local) As Hashtable
|
||||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||||
Dim oData As DataSet
|
Dim oData As DataSet
|
||||||
@@ -333,7 +337,6 @@ Public Class mgrMonitorList
|
|||||||
Dim hshList As New Hashtable
|
Dim hshList As New Hashtable
|
||||||
Dim hshDupeList As New Hashtable
|
Dim hshDupeList As New Hashtable
|
||||||
Dim oGame As clsGame
|
Dim oGame As clsGame
|
||||||
Dim oDupeGame As clsGame
|
|
||||||
|
|
||||||
sSQL = "Select * from monitorlist ORDER BY Name Asc"
|
sSQL = "Select * from monitorlist ORDER BY Name Asc"
|
||||||
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
||||||
@@ -359,27 +362,14 @@ Public Class mgrMonitorList
|
|||||||
|
|
||||||
Select Case eListType
|
Select Case eListType
|
||||||
Case eListTypes.FullList
|
Case eListTypes.FullList
|
||||||
If hshList.Contains(oGame.ProcessName) Or hshDupeList.Contains(oGame.ProcessName) Then
|
'Don't wrap this, if it fails there's a problem with the database
|
||||||
oDupeGame = DirectCast(hshList.Item(oGame.ProcessName), clsGame)
|
hshList.Add(oGame.ProcessName & ":" & oGame.Name, oGame)
|
||||||
If Not hshDupeList.Contains(oGame.ProcessName) Then
|
|
||||||
hshDupeList.Add(oGame.ProcessName, oDupeGame)
|
|
||||||
hshList.Remove(oDupeGame.ProcessName)
|
|
||||||
oDupeGame.Duplicate = True
|
|
||||||
oDupeGame.ProcessName = oDupeGame.ProcessName & ":" & oDupeGame.Name
|
|
||||||
hshList.Add(oDupeGame.ProcessName, oDupeGame)
|
|
||||||
End If
|
|
||||||
oGame.ProcessName = oGame.ProcessName & ":" & oGame.Name
|
|
||||||
oGame.Duplicate = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
hshList.Add(oGame.ProcessName, oGame)
|
|
||||||
Case eListTypes.ScanList
|
Case eListTypes.ScanList
|
||||||
If hshList.Contains(oGame.ProcessName) Then
|
If hshList.Contains(oGame.ProcessName) Then
|
||||||
DirectCast(hshList.Item(oGame.ProcessName), clsGame).Duplicate = True
|
DirectCast(hshList.Item(oGame.ProcessName), clsGame).Duplicate = True
|
||||||
oGame.ProcessName = oGame.ProcessName & ":" & oGame.Name
|
oGame.ProcessName = oGame.ProcessName & ":" & oGame.Name
|
||||||
oGame.Duplicate = True
|
oGame.Duplicate = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If oGame.Enabled Then hshList.Add(oGame.ProcessName, oGame)
|
If oGame.Enabled Then hshList.Add(oGame.ProcessName, oGame)
|
||||||
End Select
|
End Select
|
||||||
Next
|
Next
|
||||||
|
|||||||
+6
-15
@@ -10,7 +10,6 @@ Public Class mgrXML
|
|||||||
Dim hshList As New Hashtable
|
Dim hshList As New Hashtable
|
||||||
Dim hshDupeList As New Hashtable
|
Dim hshDupeList As New Hashtable
|
||||||
Dim oGame As clsGame
|
Dim oGame As clsGame
|
||||||
Dim oDupeGame As clsGame
|
|
||||||
|
|
||||||
'If the file doesn't exist return an empty list
|
'If the file doesn't exist return an empty list
|
||||||
If Not File.Exists(sLocation) And Not bWebRead Then
|
If Not File.Exists(sLocation) And Not bWebRead Then
|
||||||
@@ -32,20 +31,12 @@ Public Class mgrXML
|
|||||||
oGame.ImportTags.Add(t)
|
oGame.ImportTags.Add(t)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If hshList.Contains(oGame.ProcessName) Or hshDupeList.Contains(oGame.ProcessName) Then
|
'This should be wrapped just in case we get some bad data
|
||||||
oDupeGame = DirectCast(hshList.Item(oGame.ProcessName), clsGame)
|
Try
|
||||||
If Not hshDupeList.Contains(oGame.ProcessName) Then
|
hshList.Add(oGame.ProcessName & ":" & oGame.Name, oGame)
|
||||||
hshDupeList.Add(oGame.ProcessName, oDupeGame)
|
Catch e As Exception
|
||||||
hshList.Remove(oDupeGame.ProcessName)
|
'Do Nothing
|
||||||
oDupeGame.Duplicate = True
|
End Try
|
||||||
oDupeGame.ProcessName = oDupeGame.ProcessName & ":" & oDupeGame.Name
|
|
||||||
hshList.Add(oDupeGame.ProcessName, oDupeGame)
|
|
||||||
End If
|
|
||||||
oGame.ProcessName = oGame.ProcessName & ":" & oGame.Name
|
|
||||||
oGame.Duplicate = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
hshList.Add(oGame.ProcessName, oGame)
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Return hshList
|
Return hshList
|
||||||
|
|||||||
Reference in New Issue
Block a user