Skip to content

Commit

Permalink
Build 3.1.5678.27159 plus previous fix
Browse files Browse the repository at this point in the history
Shopping List
* Increased size of form to make room for new features.
* Added column to display the total fees per item in the buy list when
using Buy Orders.
* The total cost of the items will now include fees in the buy list when
using Buy Orders.
* Added the facility name to the Item list where the item will be built.
For POS structures, the system name has been added to the array used.
* Added label showing how many total items are in the shopping list.
Useful for large shopping lists. Also added this to the copy and file
export functions.
* Fixed issue where changing the number of T2 items in the shopping list
added as ‘Components’ only would crash the program.

Misc.
* Double-clicking on the “Default Facility” label when greyed out will
now load the default facility on the BP and Manufacturing Tabs. Changed
the label to always show instead of setting visible to true, I just
change the fore color.
* The ‘Default Facility’ label will now show when a default facility is
loaded again on the BP and Manufacturing tabs.
* Fuel blocks will correctly load a POS facility on the BP tab when a
fuel block row is double clicked on the Manufacturing tab.
* Updated the Blueprints Management tab to not set owned bps to ‘BPC’ if
they are already owned and updated to ‘Owned’ again.
* The ‘Enable ME/TE’ check box and ME, TE value boxes will now be
disabled on load of the BP Management window.
* Progress bars throughout the program should now correctly show the
progress without ending halfway through.

Also committed fix when changing the number of T1 items in the shopping
list would crash the program.  Line 200 of ShoppingList.vb
  • Loading branch information
Zifrian committed Jul 20, 2015
1 parent a4b147c commit ef210e8
Show file tree
Hide file tree
Showing 11 changed files with 658 additions and 365 deletions.
18 changes: 12 additions & 6 deletions EVECREST.vb
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ Public Class EVECREST
Call ExecuteNonQuerySQL(SQL)
End If

TempPB.Value = i
' For each record, update the progress bar
Call IncrementProgressBar(TempPB)
Application.DoEvents()

Next
Expand Down Expand Up @@ -432,7 +433,8 @@ Public Class EVECREST

Next

TempPB.Value = i
' For each record, update the progress bar
Call IncrementProgressBar(TempPB)
Application.DoEvents()
Next

Expand Down Expand Up @@ -661,7 +663,8 @@ Public Class EVECREST
Next
End With

TempPB.Value = i
' For each record, update the progress bar
Call IncrementProgressBar(TempPB)
Application.DoEvents()
Next

Expand Down Expand Up @@ -913,7 +916,8 @@ Public Class EVECREST

End With

TempPB.Value = i
' For each record, update the progress bar
Call IncrementProgressBar(TempPB)
Application.DoEvents()
Next

Expand Down Expand Up @@ -1324,7 +1328,8 @@ Public Class EVECREST
End With
Next

TempPB.Value = i
' For each record, update the progress bar
Call IncrementProgressBar(TempPB)
Application.DoEvents()
Next

Expand Down Expand Up @@ -1437,7 +1442,8 @@ Public Class EVECREST
Call ExecuteNonQuerySQL(SQL)
End With

TempPB.Value = i
' For each record, update the progress bar
Call IncrementProgressBar(TempPB)
Application.DoEvents()

Next
Expand Down
31 changes: 31 additions & 0 deletions Globals.vb
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,12 @@ Public Module Public_Variables
.ItemME = SentBlueprint.GetME
.FacilityMEModifier = FacilityMEModifier ' For full item, components will be saved in blueprint class for ComponentList
.BuiltInPOS = BuiltInPOS
.BuildLocation = SentBlueprint.GetManufacturingFacility.FacilityName

' See if we need to add the system on to the end of the build location for POS
If BuiltInPOS Then
.BuildLocation = .BuildLocation & " (" & SentBlueprint.GetManufacturingFacility.SolarSystemName & ")"
End If

' Ignore flags
.IgnoredInvention = IgnoreInvention
Expand Down Expand Up @@ -1023,13 +1029,20 @@ Public Module Public_Variables
.ItemME = SentBlueprint.GetME
.FacilityMEModifier = FacilityMEModifier ' For full item, components will be saved in blueprint class for ComponentList
.BuiltInPOS = BuiltInPOS
.BuildLocation = SentBlueprint.GetManufacturingFacility.FacilityName

' See if we need to add the system on to the end of the build location for POS
If BuiltInPOS Then
.BuildLocation = .BuildLocation & " (" & SentBlueprint.GetManufacturingFacility.SolarSystemName & ")"
End If

' Ignore flags
.IgnoredInvention = IgnoreInvention
.IgnoredMinerals = IgnoreMinerals
.IgnoredT1BaseItem = IgnoreT1ITem

.NumBPs = SentBlueprint.GetUsedNumBPs
.RunsPerBP = SentBlueprint.GetSingleInventedBPCRuns

.BuildType = "Components"

Expand Down Expand Up @@ -1219,6 +1232,24 @@ Public Module Public_Variables

End Function

' Updates the value in the progressbar for a smooth progress - total hack from this: http://stackoverflow.com/questions/977278/how-can-i-make-the-progress-bar-update-fast-enough/1214147#1214147
Public Sub IncrementToolStripProgressBar(ByRef PG As ToolStripProgressBar)
If PG.Value <= PG.Maximum - 1 Then
PG.Value = PG.Value + 1
PG.Value = PG.Value - 1
PG.Value = PG.Value + 1
End If
End Sub

' Updates the value in the progressbar for a smooth progress - total hack from this: http://stackoverflow.com/questions/977278/how-can-i-make-the-progress-bar-update-fast-enough/1214147#1214147
Public Sub IncrementProgressBar(ByRef PG As ProgressBar)
If PG.Value <= PG.Maximum - 1 Then
PG.Value = PG.Value + 1
PG.Value = PG.Value - 1
PG.Value = PG.Value + 1
End If
End Sub

' Checks the error sent for EVE API data and shows forms etc based on error
Public Function NoAPIError(ByVal ErrorText As String, ByVal KeyType As String) As Boolean
Dim fAccessError As New frmAPIError
Expand Down
20 changes: 1 addition & 19 deletions IndustryFacility.vb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ Public Class IndustryFacility
Public FacilityType As String ' POS, Station, Outpost
Public FacilityTypeID As Long ' type ID for facility - type of outpost, etc
Public ProductionType As IndustryType ' What we are doing at this facility
Public Activity As String ' Activity type of the facility
Public ActivityID As Integer
Public ActivityID As Integer ' Activity code of the facility
Public RegionName As String ' Region of this facility
Public RegionID As Long
Public SolarSystemName As String ' System where this is located
Expand All @@ -31,7 +30,6 @@ Public Class IndustryFacility
FacilityName = None
FacilityType = None
ProductionType = IndustryType.None
Activity = None
ActivityID = 0
RegionName = None
RegionID = 0
Expand Down Expand Up @@ -123,19 +121,14 @@ Public Class IndustryFacility
ProductionType = .ProductionType
Select Case ProductionType
Case IndustryType.CapitalComponentManufacturing
Activity = ActivityCapComponentManufacturing
ActivityID = 1
Case IndustryType.ComponentManufacturing
Activity = ActivityComponentManufacturing
ActivityID = 1
Case IndustryType.Copying
Activity = ActivityCopying
ActivityID = 7
Case IndustryType.Invention
Activity = ActivityInvention
ActivityID = 8
Case Else
Activity = ActivityManufacturing
ActivityID = 1
End Select
RegionName = .RegionName
Expand Down Expand Up @@ -350,14 +343,6 @@ Public Class IndustryFacility
MaterialMultiplier = SearchFacilitySettings.MaterialMultiplier
TimeMultiplier = SearchFacilitySettings.TimeMultiplier
ActivityID = SearchFacilitySettings.ActivityID
Select Case ActivityID
Case 7
Activity = ActivityCopying
Case 8
Activity = ActivityInvention
Case Else
Activity = ActivityManufacturing
End Select
ActivityCostPerSecond = SearchFacilitySettings.ActivityCostperSecond
IsDefault = FacilityDefault
FacilityTypeID = 0
Expand Down Expand Up @@ -442,8 +427,6 @@ Public Class IndustryFacility
Return False
ElseIf .ProductionType <> ProductionType Then
Return False
ElseIf .Activity <> Activity Then
Return False
ElseIf .ActivityID <> ActivityID Then
Return False
ElseIf .FacilityName <> FacilityName And Not (.FacilityType = POSFacility And ProductionType = IndustryType.Manufacturing) Then
Expand Down Expand Up @@ -483,7 +466,6 @@ Public Class IndustryFacility
CopyOfMe.FacilityType = FacilityType
CopyOfMe.FacilityTypeID = FacilityTypeID
CopyOfMe.ProductionType = ProductionType
CopyOfMe.Activity = Activity
CopyOfMe.ActivityID = ActivityID
CopyOfMe.RegionName = RegionName
CopyOfMe.RegionID = RegionID
Expand Down
22 changes: 16 additions & 6 deletions Materials.vb
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ Public Class Materials
Dim DataInterfaceVolume As Double
Dim RelicDecryptorText As String = ""
Dim NumBps As String = ""
Dim Location As String = ""
Dim Separator As String = ""

Dim BuildMaterialFieldsCSV = "ME, NumBPs, Decryptor/Relic, "
Expand Down Expand Up @@ -294,7 +295,7 @@ Public Class Materials

If MaterialList(i).GetMaterialGroup.Contains("|") Then
' We have a material from the shopping list, with three values in the material group
'.BuildType & "|" & .DecryptorRelic & "|" & .NumBPs
'.BuildType & "|" & .DecryptorRelic & "|" & .NumBPs & "|" & .Location
' Parse the fields
Dim ItemColumns As String() = MaterialList(i).GetMaterialGroup.Split(New [Char]() {"|"c})

Expand All @@ -305,6 +306,7 @@ Public Class Materials
End If

NumBps = ItemColumns(2)
Location = ItemColumns(4)
Else
RelicDecryptorText = None
NumBps = "-"
Expand Down Expand Up @@ -333,13 +335,17 @@ Public Class Materials
OutputString = OutputString & RelicDecryptorText & Separator
End If

OutputString = OutputString & CStr(MaterialList(i).GetCostPerItem) & Separator & CStr(MaterialList(i).GetTotalCost) & vbCrLf
OutputString = OutputString & CStr(MaterialList(i).GetCostPerItem) & Separator & CStr(MaterialList(i).GetTotalCost)

If Location <> "" Then
OutputString = OutputString & Separator & Location & vbCrLf
End If

Else
OutputString = OutputString & MatName

If IncludeME Or IncludeDecryptorRelic Then
OutputString = OutputString & " (" ' Adding something so start the paren
OutputString = OutputString & " (" ' Adding something so start the parens

If OutputME <> "-" Then
OutputString = OutputString & "ME: " & OutputME
Expand All @@ -360,11 +366,15 @@ Public Class Materials
End If

If Not MatName.Contains("Data Interface") Then
OutputString = OutputString & " - " & FormatNumber(MaterialList(i).GetQuantity, 0) & vbCrLf
Else
OutputString = OutputString & vbCrLf
OutputString = OutputString & " - " & FormatNumber(MaterialList(i).GetQuantity, 0)
End If

If Location <> "" Then
OutputString = OutputString & ", Location: " & Location
End If

OutputString = OutputString & vbCrLf

End If
SkipFormat:
Next
Expand Down
18 changes: 12 additions & 6 deletions ShoppingList.vb
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,11 @@ Public Class ShoppingList
FoundItem.TotalItemMarketCost = FoundItem.TotalItemMarketCost / FoundItem.Quantity * UpdateItemQuantity
FoundItem.TotalBuildTime = FoundItem.TotalBuildTime / FoundItem.Quantity * UpdateItemQuantity
' Update the invention jobs if they update this later
FoundItem.InventionJobs = CInt(Math.Ceiling(FoundItem.AvgInvRunsforSuccess * Math.Ceiling(UpdateItemQuantity / FoundItem.RunsPerBP)))
' How many bps do we need to make?
FoundItem.NumBPs = CInt(Math.Ceiling(UpdateItemQuantity / FoundItem.RunsPerBP))
If FoundItem.RunsPerBP <> 0 Then
FoundItem.InventionJobs = CInt(Math.Ceiling(FoundItem.AvgInvRunsforSuccess * Math.Ceiling(UpdateItemQuantity / FoundItem.RunsPerBP)))
' How many bps do we need to make?
FoundItem.NumBPs = CInt(Math.Ceiling(UpdateItemQuantity / FoundItem.RunsPerBP))
End If
' Finally update the quantity
FoundItem.Quantity = UpdateItemQuantity
End If
Expand Down Expand Up @@ -688,7 +690,7 @@ Public Class ShoppingList
Dim ItemColumns As String() = ItemNamesSortOrder(i).Split(New [Char]() {"|"c})

' For each item, find it in the current buy list and replace
' Item sort order Name, Quantity, ME, Num BPs, Build Type, Decryptor/Relic
' Item sort order Name, Quantity, ME, Num BPs, Build Type, Decryptor/Relic, Location
For j = 0 To FullItemList.GetMaterialList.Count - 1
With FullItemList.GetMaterialList(j) ' GroupName stores the build type Decryptor/Relic in item type
' Split out the Build Type, Decryptor, NumBps, and Relic
Expand All @@ -705,7 +707,7 @@ Public Class ShoppingList

If ItemName = .GetMaterialName And CLng(ItemColumns(1)) = .GetQuantity And ItemColumns(2) = .GetItemME _
And ItemColumns(4) = GroupNameItems(0) And ItemColumns(5) = GroupNameItems(1) _
And ItemColumns(3) = GroupNameItems(2) And RelicName = GroupNameItems(3) Then
And ItemColumns(3) = GroupNameItems(2) And RelicName = GroupNameItems(3) And ItemColumns(6) = GroupNameItems(4) Then
' Found it, so insert into temp list
TempMatList.InsertMaterial(FullItemList.GetMaterialList(j))
Exit For
Expand Down Expand Up @@ -907,7 +909,7 @@ Public Class ShoppingList
For i = 0 To TotalItemList.Count - 1
With TotalItemList(i)
' Item sort order is Build Type, Decryptor, NumBps, and Relic for the group name
TempMat = New Material(.TypeID, .Name, .BuildType & "|" & .Decryptor & "|" & CStr(.NumBPs) & "|" & CStr(.Relic), .Quantity, .BuildVolume, 0, CStr(.ItemME))
TempMat = New Material(.TypeID, .Name, .BuildType & "|" & .Decryptor & "|" & CStr(.NumBPs) & "|" & CStr(.Relic) & "|" & .BuildLocation, .Quantity, .BuildVolume, 0, CStr(.ItemME))
End With
ReturnMaterials.InsertMaterial(TempMat)
Next
Expand Down Expand Up @@ -1150,6 +1152,9 @@ Public Class ShoppingListItem

' For ME values to update with add/subtract in shopping list, item is either cap component, component, or anything else we are building
Public FacilityMEModifier As Double

Public BuildLocation As String ' This is the name of the station or Array (with system name) where we build the items

' Flag to tell if the item is built in a POS or not
Public BuiltInPOS As Boolean
' Ignore Variables
Expand Down Expand Up @@ -1186,6 +1191,7 @@ Public Class ShoppingListItem
BPMaterialList = Nothing

FacilityMEModifier = 1
BuildLocation = ""
BuiltInPOS = False
IgnoredInvention = False
IgnoredMinerals = False
Expand Down
22 changes: 17 additions & 5 deletions frmBlueprintManagement.vb
Original file line number Diff line number Diff line change
Expand Up @@ -562,9 +562,9 @@ Public Class frmBlueprintManagement

txtBPSearch.Text = ""

' Start out not enabling this incase people accidently hit it
chkEnableMETE.Checked = True
Call EnableMETE(True)
' Start out not checking this incase people accidently hit it
chkEnableMETE.Checked = False
Call EnableMETE(False)

FirstLoad = False

Expand Down Expand Up @@ -1414,11 +1414,23 @@ Public Class frmBlueprintManagement
For Each item In checkedItems

' Select the BP type of using update selected and marking owned
If rbtnMarkasOwned.Checked Then
' Save all BPs as copies - they can update if they want to, all items can have bpcs and it doesn't affect processing so this is easier
If rbtnMarkasOwned.Checked And item.SubItems(7).Text <> Yes Then
' Save all BPs as copies if they aren't already owned - they can update if they want to, all items can have bpcs and it doesn't affect processing so this is easier
TempBPType = BPType.Copy
ElseIf rbtnMarkasUnowned.Checked Then
TempBPType = BPType.NotOwned
Else
' Set it to what they had in the grid
Select Case item.SubItems(8).Text
Case BPO
TempBPType = BPType.Original
Case BPC
TempBPType = BPType.Copy
Case InventedBPC
TempBPType = BPType.InventedBPC
Case Unknown
TempBPType = BPType.NotOwned
End Select
End If

' Need to add selected blueprints to the character blueprints table, and set the ME and TE's as given or as stored
Expand Down
11 changes: 5 additions & 6 deletions frmMain.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ef210e8

Please sign in to comment.