Changeset 1304

Show
Ignore:
Timestamp:
2/8/2010 2:47:09 PM (5 weeks ago)
Author:
vessper
Message:

08/02/2010


- Core: Moved various skill queue classes to their own files
- Core: Renamed SortedQueue? class to SortedQueueitem? to better reflect its purpose
- Core: Added XML documentation to classes

Location:
branches/EveHQv2
Files:
3 added
10 modified

Legend:

Unmodified
Added
Removed
  • branches/EveHQv2/EveHQ.Core/EveHQ.Core.vbproj

    r1303 r1304  
    154154    </Compile> 
    155155    <Compile Include="SkillFunctions.vb" /> 
     156    <Compile Include="SkillQueue.vb" /> 
    156157    <Compile Include="SkillQueueFunctions.vb" /> 
     158    <Compile Include="SkillQueueItem.vb" /> 
     159    <Compile Include="SortedQueueItem.vb" /> 
    157160    <Compile Include="SplitButton.vb"> 
    158161      <SubType>Component</SubType> 
  • branches/EveHQv2/EveHQ.Core/Reports.vb

    r1137 r1304  
    10311031 
    10321032        For skill As Integer = 0 To arrQueue.Count - 1 
    1033             Dim qItem As EveHQ.Core.SortedQueue = CType(arrQueue(skill), EveHQ.Core.SortedQueue) 
     1033            Dim qItem As EveHQ.Core.SortedQueueItem = CType(arrQueue(skill), EveHQ.Core.SortedQueueItem) 
    10341034            Dim skillName As String = qItem.Name 
    10351035            Dim curLevel As String = qItem.CurLevel 
     
    10981098        Dim skillPriceList As New ArrayList 
    10991099        For skill As Integer = 0 To arrQueue.Count - 1 
    1100             Dim qItem As EveHQ.Core.SortedQueue = CType(arrQueue(skill), SortedQueue) 
     1100            Dim qItem As EveHQ.Core.SortedQueueItem = CType(arrQueue(skill), SortedQueueItem) 
    11011101            Dim skillName As String = qItem.Name 
    11021102            If rpilot.PilotSkills.Contains(skillName) = False Then 
     
    28932893 
    28942894        For skill As Integer = 0 To arrQueue.Count - 1 
    2895             Dim qItem As EveHQ.Core.SortedQueue = CType(arrQueue(skill), SortedQueue) 
     2895            Dim qItem As EveHQ.Core.SortedQueueItem = CType(arrQueue(skill), SortedQueueItem) 
    28962896            Dim skillName As String = qItem.Name 
    28972897            Dim curLevel As String = qItem.CurLevel 
     
    29572957        Dim skillPriceList As New ArrayList 
    29582958        For skill As Integer = 0 To arrQueue.Count - 1 
    2959             Dim qItem As EveHQ.Core.SortedQueue = CType(arrQueue(skill), SortedQueue) 
     2959            Dim qItem As EveHQ.Core.SortedQueueItem = CType(arrQueue(skill), SortedQueueItem) 
    29602960            Dim skillName As String = qItem.Name 
    29612961            If rpilot.PilotSkills.Contains(skillName) = False Then 
  • branches/EveHQv2/EveHQ.Core/SkillQueueFunctions.vb

    r1231 r1304  
    9898                End If 
    9999 
    100                 Dim qItem As EveHQ.Core.SortedQueue = New EveHQ.Core.SortedQueue 
     100                Dim qItem As New EveHQ.Core.SortedQueueItem 
    101101                qItem.IsTraining = True 
    102102                qItem.IsInjected = True 
     
    303303                ' Get the time taken to train to that level 
    304304                Dim cTime As Integer 
    305                 Dim qItem As EveHQ.Core.SortedQueue = New EveHQ.Core.SortedQueue 
     305                Dim qItem As New EveHQ.Core.SortedQueueItem 
    306306                qItem.IsInjected = qPilot.PilotSkills.Contains(myskill.Name) 
    307307 
     
    11511151        Dim count As Integer = 1 
    11521152        If qList IsNot Nothing Then 
    1153             For Each qItem As EveHQ.Core.SortedQueue In qList 
     1153            For Each qItem As EveHQ.Core.SortedQueueItem In qList 
    11541154                If qItem.IsTraining = False Then 
    11551155                    If qItem.Done = False Then 
     
    13901390End Class 
    13911391 
    1392 <Serializable()> Public Class SkillQueueItem 
    1393     Implements System.ICloneable 
    1394     Public Key As String 
    1395     Public Name As String 
    1396     Public FromLevel As Integer 
    1397     Public ToLevel As Integer 
    1398     Public Pos As Integer 
    1399     Public Priority As Integer 
    1400     Public Notes As String 
    1401     Public Function Clone() As Object Implements System.ICloneable.Clone 
    1402         Dim R As SkillQueue = CType(Me.MemberwiseClone, SkillQueue) 
    1403         Return R 
    1404     End Function 
    1405 End Class 
    1406 Public Class SortedQueue 
    1407     Public Done As Boolean 
    1408     Public Key As String 
    1409     Public ID As String 
    1410     Public Name As String 
    1411     Public CurLevel As String 
    1412     Public FromLevel As String 
    1413     Public ToLevel As String 
    1414     Public PartTrained As Boolean 
    1415     Public IsInjected As Boolean 
    1416     Public Percent As String 
    1417     Public TrainTime As String 
    1418     Public DateFinished As Date 
    1419     Public Rank As String 
    1420     Public PAtt As String 
    1421     Public SAtt As String 
    1422     Public SPRate As String 
    1423     Public SPTrained As String 
    1424     Public IsTraining As Boolean 
    1425     Public IsPrereq As Boolean 
    1426     Public Prereq As String 
    1427     Public HasPrereq As Boolean 
    1428     Public Reqs As String 
    1429     Public Priority As Integer 
    1430     Public Notes As String 
    1431 End Class 
    1432 <Serializable()> Public Class SkillQueue 
    1433     Implements System.ICloneable 
    1434     Public Name As String 
    1435     Public IncCurrentTraining As Boolean = True 
    1436     Public Queue As New Collection 
    1437     Public Primary As Boolean 
    1438     Public QueueTime As Long 
    1439     Public QueueSkills As Integer 
    1440  
    1441     Public Function Clone() As Object Implements System.ICloneable.Clone 
    1442         Dim newQueue As SkillQueue = CType(Me.MemberwiseClone, SkillQueue) 
    1443  
    1444         Dim newQ As New Collection 
    1445         For Each qItem As EveHQ.Core.SkillQueueItem In Me.Queue 
    1446             Dim nItem As New EveHQ.Core.SkillQueueItem 
    1447             nItem.ToLevel = qItem.ToLevel 
    1448             nItem.FromLevel = qItem.FromLevel 
    1449             nItem.Name = qItem.Name 
    1450             nItem.Key = nItem.Name & nItem.FromLevel & nItem.ToLevel 
    1451             nItem.Pos = qItem.Pos 
    1452             nItem.Notes = qItem.Notes 
    1453             nItem.Priority = qItem.Priority 
    1454             newQ.Add(nItem, nItem.Key) 
    1455         Next 
    1456         newQueue.Queue = newQ 
    1457         Return newQueue 
    1458  
    1459     End Function 
    1460 End Class 
  • branches/EveHQv2/EveHQ.Creation/frmCharCreate.vb

    r1129 r1304  
    783783                    pointScores(a, 0) = a 
    784784                Next 
    785                 For Each skill As EveHQ.Core.SortedQueue In sQueue 
     785                For Each skill As EveHQ.Core.SortedQueueItem In sQueue 
    786786                    Select Case skill.PAtt 
    787787                        Case "Charisma" 
     
    852852                ' Add pilot to the list 
    853853                Dim ttt As String = "" 
    854                 For Each skill As EveHQ.Core.SortedQueue In aQueue 
     854                For Each skill As EveHQ.Core.SortedQueueItem In aQueue 
    855855                    ttt &= skill.Name & " (" & skill.FromLevel & " to " & skill.ToLevel & ")" & ControlChars.CrLf 
    856856                Next 
  • branches/EveHQv2/EveHQ/Controls/DBControls/DBCSkillQueueInfo.vb

    r956 r1304  
    236236                    Dim arrQueue As ArrayList = EveHQ.Core.SkillQueueFunctions.BuildQueue(cPilot, cQueue) 
    237237                    For skill As Integer = 0 To arrQueue.Count - 1 
    238                         Dim qItem As EveHQ.Core.SortedQueue = CType(arrQueue(skill), EveHQ.Core.SortedQueue) 
     238                        Dim qItem As EveHQ.Core.SortedQueueItem = CType(arrQueue(skill), EveHQ.Core.SortedQueueItem) 
    239239                        If qItem.Done = False Then 
    240240                            Dim newitem As New ListViewItem 
  • branches/EveHQv2/EveHQ/Forms/frmEveHQ.vb

    r1291 r1304  
    743743                                            If nq.Count > 1 Then 
    744744                                                For q As Integer = 1 To nq.Count - 1 
    745                                                     If CType(nq(1), EveHQ.Core.SortedQueue).Done = False Then 
    746                                                         notifyText &= sq.Name & ": " & CType(nq(q), EveHQ.Core.SortedQueue).Name 
    747                                                         notifyText &= " (" & EveHQ.Core.SkillFunctions.Roman(CInt(CType(nq(q), EveHQ.Core.SortedQueue).FromLevel)) 
    748                                                         notifyText &= " to " & EveHQ.Core.SkillFunctions.Roman(CInt(CType(nq(q), EveHQ.Core.SortedQueue).FromLevel) + 1) & ")" & ControlChars.CrLf 
     745                                                    If CType(nq(1), EveHQ.Core.SortedQueueItem).Done = False Then 
     746                                                        notifyText &= sq.Name & ": " & CType(nq(q), EveHQ.Core.SortedQueueItem).Name 
     747                                                        notifyText &= " (" & EveHQ.Core.SkillFunctions.Roman(CInt(CType(nq(q), EveHQ.Core.SortedQueueItem).FromLevel)) 
     748                                                        notifyText &= " to " & EveHQ.Core.SkillFunctions.Roman(CInt(CType(nq(q), EveHQ.Core.SortedQueueItem).FromLevel) + 1) & ")" & ControlChars.CrLf 
    749749                                                        Exit For 
    750750                                                    End If 
     
    754754                                            If nq.Count > 0 Then 
    755755                                                For q As Integer = 0 To nq.Count - 1 
    756                                                     If CType(nq(1), EveHQ.Core.SortedQueue).Done = False Then 
    757                                                         notifyText &= sq.Name & ": " & CType(nq(q), EveHQ.Core.SortedQueue).Name 
    758                                                         notifyText &= " (" & EveHQ.Core.SkillFunctions.Roman(CInt(CType(nq(q), EveHQ.Core.SortedQueue).FromLevel)) 
    759                                                         notifyText &= " to " & EveHQ.Core.SkillFunctions.Roman(CInt(CType(nq(q), EveHQ.Core.SortedQueue).FromLevel) + 1) & ")" & ControlChars.CrLf 
     756                                                    If CType(nq(1), EveHQ.Core.SortedQueueItem).Done = False Then 
     757                                                        notifyText &= sq.Name & ": " & CType(nq(q), EveHQ.Core.SortedQueueItem).Name 
     758                                                        notifyText &= " (" & EveHQ.Core.SkillFunctions.Roman(CInt(CType(nq(q), EveHQ.Core.SortedQueueItem).FromLevel)) 
     759                                                        notifyText &= " to " & EveHQ.Core.SkillFunctions.Roman(CInt(CType(nq(q), EveHQ.Core.SortedQueueItem).FromLevel) + 1) & ")" & ControlChars.CrLf 
    760760                                                        Exit For 
    761761                                                    End If 
     
    807807                        If pq IsNot Nothing Then 
    808808                            Dim arrQueue As ArrayList = EveHQ.Core.SkillQueueFunctions.BuildQueue(cPilot, pq) 
    809                             Dim qItem As EveHQ.Core.SortedQueue = New EveHQ.Core.SortedQueue 
     809                            Dim qItem As New EveHQ.Core.SortedQueueItem 
    810810                            For Each qItem In arrQueue 
    811811                                If qItem.Done = False Then 
  • branches/EveHQv2/EveHQ/Forms/frmImplants.vb

    r535 r1304  
    149149                pointScores(a, 0) = a 
    150150            Next 
    151             For Each skill As EveHQ.Core.SortedQueue In nQueue 
     151            For Each skill As EveHQ.Core.SortedQueueItem In nQueue 
    152152                Select Case skill.PAtt 
    153153                    Case "Charisma" 
  • branches/EveHQv2/EveHQ/Forms/frmNeuralRemap.vb

    r535 r1304  
    261261                pointScores(a, 0) = a 
    262262            Next 
    263             For Each skill As EveHQ.Core.SortedQueue In nQueue 
     263            For Each skill As EveHQ.Core.SortedQueueItem In nQueue 
    264264                Select Case skill.PAtt 
    265265                    Case "Charisma" 
  • branches/EveHQv2/EveHQ/Forms/frmSettings.vb

    r1214 r1304  
    14711471                                If nq.Count > 1 Then 
    14721472                                    For q As Integer = 1 To nq.Count - 1 
    1473                                         If CType(nq(1), EveHQ.Core.SortedQueue).Done = False Then 
    1474                                             notifyText &= sq.Name & ": " & CType(nq(q), EveHQ.Core.SortedQueue).Name 
    1475                                             notifyText &= " (" & EveHQ.Core.SkillFunctions.Roman(CInt(CType(nq(q), EveHQ.Core.SortedQueue).FromLevel)) 
    1476                                             notifyText &= " to " & EveHQ.Core.SkillFunctions.Roman(CInt(CType(nq(q), EveHQ.Core.SortedQueue).FromLevel) + 1) & ")" & ControlChars.CrLf 
     1473                                        If CType(nq(1), EveHQ.Core.SortedQueueItem).Done = False Then 
     1474                                            notifyText &= sq.Name & ": " & CType(nq(q), EveHQ.Core.SortedQueueItem).Name 
     1475                                            notifyText &= " (" & EveHQ.Core.SkillFunctions.Roman(CInt(CType(nq(q), EveHQ.Core.SortedQueueItem).FromLevel)) 
     1476                                            notifyText &= " to " & EveHQ.Core.SkillFunctions.Roman(CInt(CType(nq(q), EveHQ.Core.SortedQueueItem).FromLevel) + 1) & ")" & ControlChars.CrLf 
    14771477                                            Exit For 
    14781478                                        End If 
     
    14821482                                If nq.Count > 0 Then 
    14831483                                    For q As Integer = 0 To nq.Count - 1 
    1484                                         If CType(nq(1), EveHQ.Core.SortedQueue).Done = False Then 
    1485                                             notifyText &= sq.Name & ": " & CType(nq(q), EveHQ.Core.SortedQueue).Name 
    1486                                             notifyText &= " (" & EveHQ.Core.SkillFunctions.Roman(CInt(CType(nq(q), EveHQ.Core.SortedQueue).FromLevel)) 
    1487                                             notifyText &= " to " & EveHQ.Core.SkillFunctions.Roman(CInt(CType(nq(q), EveHQ.Core.SortedQueue).FromLevel) + 1) & ")" & ControlChars.CrLf 
     1484                                        If CType(nq(1), EveHQ.Core.SortedQueueItem).Done = False Then 
     1485                                            notifyText &= sq.Name & ": " & CType(nq(q), EveHQ.Core.SortedQueueItem).Name 
     1486                                            notifyText &= " (" & EveHQ.Core.SkillFunctions.Roman(CInt(CType(nq(q), EveHQ.Core.SortedQueueItem).FromLevel)) 
     1487                                            notifyText &= " to " & EveHQ.Core.SkillFunctions.Roman(CInt(CType(nq(q), EveHQ.Core.SortedQueueItem).FromLevel) + 1) & ")" & ControlChars.CrLf 
    14881488                                            Exit For 
    14891489                                        End If 
  • branches/EveHQv2/EveHQ/Forms/frmTraining.vb

    r1242 r1304  
    607607            Dim aq As EveHQ.Core.SkillQueue = CType(displayPilot.TrainingQueues(QueueName), Core.SkillQueue) 
    608608            Dim arrQueue As ArrayList = EveHQ.Core.SkillQueueFunctions.BuildQueue(displayPilot, aq) 
    609             Dim qItem As EveHQ.Core.SortedQueue = New EveHQ.Core.SortedQueue 
     609            Dim qItem As New EveHQ.Core.SortedQueueItem 
    610610            Dim totalTime As Long = 0 
    611611            Dim totalSP As Long = displayPilot.SkillPoints 
     
    679679        End If 
    680680    End Sub 
    681     Private Sub AddUserColumns(ByVal newskill As ListViewItem, ByVal qitem As EveHQ.Core.SortedQueue, ByVal totalSP As Long) 
     681    Private Sub AddUserColumns(ByVal newskill As ListViewItem, ByVal qitem As EveHQ.Core.SortedQueueItem, ByVal totalSP As Long) 
    682682        ' Add subitems based on the user selected columns 
    683683        Dim colName As String = "" 
     
    22772277            Next 
    22782278            Dim arrQueue As ArrayList = EveHQ.Core.SkillQueueFunctions.BuildQueue(displayPilot, newQueue) 
    2279             Dim qItem As EveHQ.Core.SortedQueue = New EveHQ.Core.SortedQueue 
     2279            Dim qItem As New EveHQ.Core.SortedQueueItem 
    22802280            Dim QTime As Double = 0 
    22812281            For Each qItem In arrQueue 
     
    23182318        Next 
    23192319        Dim arrQueue As ArrayList = EveHQ.Core.SkillQueueFunctions.BuildQueue(displayPilot, newQueue) 
    2320         Dim qItem As EveHQ.Core.SortedQueue = New EveHQ.Core.SortedQueue 
     2320        Dim qItem As New EveHQ.Core.SortedQueueItem 
    23212321        Dim QTime As Double = 0 
    23222322        For Each qItem In arrQueue 
     
    29712971        If activeQueue IsNot Nothing Then 
    29722972            Dim arrQueue As ArrayList = EveHQ.Core.SkillQueueFunctions.BuildQueue(displayPilot, activeQueue) 
    2973             Dim qItem As EveHQ.Core.SortedQueue = New EveHQ.Core.SortedQueue 
     2973            Dim qItem As New EveHQ.Core.SortedQueueItem 
    29742974            If arrQueue IsNot Nothing Then 
    29752975                Dim EMPAtt As XmlAttribute