We have completed our calculation model, and we just need to add some finishing touches. First we will add a new method to ExcavationCostcalculator
called TotalCost
, which will simply return the sum of cost of removing the trees plus the cost of removing the soil. We will also add the cost breakdown in a small message box. Follow these steps:
If necessary, open Visual Studio Express in administrator mode; we need to do this since our project is actually writing to the registry this time, so it needs administrator permissions. To do that, right-click on Visual Studio and click on Run as administrator.
Go to File, then click on Open Project, browse to the
Yharnam
project from theC:\ArcGISByExample\yharnam\Code
, and click on Open.Double-click on the
ExcavationCostCaculator.vb
class to edit it and add the following method:Public Function TotalExcavationCost() As Double Return SoilRemovalCost() + TreesRemovalCost() End Function
Right-click on
frmExcavationEditor...