Changeset 1240

Show
Ignore:
Timestamp:
1/17/2010 3:03:27 PM (8 weeks ago)
Author:
vessper
Message:

17/01/2010 (1.14.0.1240)


- Core: Added patch for Standings to only use the latest files

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/EveHQ/Forms/frmPilot.vb

    r1077 r1240  
    10261026 
    10271027#Region "Standings Routines" 
    1028     
     1028 
    10291029    Private Sub btnGetStandings_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetStandings.Click 
    10301030        ' First, let's check out the cache location based on the value of the settings 
     
    11141114 
    11151115        If cacheFileList.Count > 0 Then 
     1116            Dim lastWrites As Dictionary(Of String, Date) = New Dictionary(Of String, Date) 
     1117 
    11161118            Cursor = Cursors.WaitCursor 
    11171119            Dim StandingsDecoder As New EveHQ.Core.StandingsCacheDecoder 
     
    11201122                MyStandings = StandingsDecoder.FetchStandings(cachefile) 
    11211123                If MyStandings.OwnerID IsNot Nothing Then 
     1124                    Dim last As Date = File.GetLastWriteTime(cachefile) 
    11221125                    If EveHQ.Core.HQ.AllStandings.ContainsKey(MyStandings.OwnerID) = False Then 
    11231126                        EveHQ.Core.HQ.AllStandings.Add(MyStandings.OwnerID, MyStandings) 
     1127                        lastWrites.Add(MyStandings.OwnerID, last) 
     1128                    Else 
     1129                        If last > lastWrites(MyStandings.OwnerID) Then 
     1130                            EveHQ.Core.HQ.AllStandings.Remove(MyStandings.OwnerID) 
     1131                            EveHQ.Core.HQ.AllStandings.Add(MyStandings.OwnerID, MyStandings) 
     1132                            lastWrites(MyStandings.OwnerID) = last 
     1133                        End If 
    11241134                    End If 
    11251135                End If