Fixed import bug caused by issue 13

This commit is contained in:
Michael J. Seiferling
2015-12-05 17:24:50 -06:00
parent b270ffeabe
commit 80badb577a
3 changed files with 16 additions and 15 deletions
+6
View File
@@ -28,6 +28,12 @@
End Get
End Property
ReadOnly Property CompoundKey As String
Get
Return ProcessName & ":" & Name
End Get
End Property
ReadOnly Property CroppedName As String
Get
If Name.Length > 40 Then
+1 -1
View File
@@ -30,7 +30,7 @@
For Each de As DictionaryEntry In ImportData
oApp = DirectCast(de.Value, clsGame)
oData = New KeyValuePair(Of String, String)(oApp.ProcessName, oApp.Name & " (" & oApp.TrueProcess & ")")
oData = New KeyValuePair(Of String, String)(oApp.CompoundKey, oApp.Name & " (" & oApp.TrueProcess & ")")
lstGames.Items.Add(oData)
Next
End Sub
+9 -14
View File
@@ -119,7 +119,6 @@ Public Class mgrMonitorList
Dim oFromItem As clsGame
Dim oToItem As clsGame
Dim iChanges As Integer
Dim sCompareKey As String
Cursor.Current = Cursors.WaitCursor
@@ -141,11 +140,10 @@ Public Class mgrMonitorList
hshSyncItems = hshCompareFrom.Clone
For Each oFromItem In hshCompareFrom.Values
sCompareKey = oFromItem.ProcessName & ":" & oFromItem.Name
If hshCompareTo.Contains(sCompareKey) Then
oToItem = DirectCast(hshCompareTo(sCompareKey), clsGame)
If hshCompareTo.Contains(oFromItem.CompoundKey) Then
oToItem = DirectCast(hshCompareTo(oFromItem.CompoundKey), clsGame)
If oFromItem.SyncEquals(oToItem) Then
hshSyncItems.Remove(sCompareKey)
hshSyncItems.Remove(oFromItem.CompoundKey)
End If
End If
Next
@@ -173,11 +171,10 @@ Public Class mgrMonitorList
hshDeleteItems = hshCompareTo.Clone
For Each oToItem In hshCompareTo.Values
sCompareKey = oToItem.ProcessName & ":" & oToItem.Name
If hshCompareFrom.Contains(sCompareKey) Then
oFromItem = DirectCast(hshCompareFrom(sCompareKey), clsGame)
If hshCompareFrom.Contains(oToItem.CompoundKey) Then
oFromItem = DirectCast(hshCompareFrom(oToItem.CompoundKey), clsGame)
If oToItem.MinimalEquals(oFromItem) Then
hshDeleteItems.Remove(sCompareKey)
hshDeleteItems.Remove(oToItem.CompoundKey)
End If
End If
Next
@@ -199,7 +196,6 @@ Public Class mgrMonitorList
Dim hshSyncItems As Hashtable
Dim oFromItem As clsGame
Dim oToItem As clsGame
Dim sCompareKey As String
Cursor.Current = Cursors.WaitCursor
@@ -210,11 +206,10 @@ Public Class mgrMonitorList
hshSyncItems = hshCompareFrom.Clone
For Each oFromItem In hshCompareFrom.Values
sCompareKey = oFromItem.ProcessName & ":" & oFromItem.Name
If hshCompareTo.Contains(sCompareKey) Then
oToItem = DirectCast(hshCompareTo(sCompareKey), clsGame)
If hshCompareTo.Contains(oFromItem.CompoundKey) Then
oToItem = DirectCast(hshCompareTo(oFromItem.CompoundKey), clsGame)
If oFromItem.CoreEquals(oToItem) Then
hshSyncItems.Remove(sCompareKey)
hshSyncItems.Remove(oFromItem.CompoundKey)
End If
End If
Next