From ba244fa81844e21ceb576085a73a418f2a4f1a7f Mon Sep 17 00:00:00 2001
From: "Burns, Terry" <Terry.Burns@ricardo.com>
Date: Wed, 4 Mar 2015 16:19:34 +0000
Subject: [PATCH] WIP - SSM SAVE POINT

git-tfs-id: [http://tfs00.element.root.com:8080/tfs/TFSCollection]$/VECTO;C1807
---
 HVACTOOL/HVACTOOL.vbproj                      |   3 +
 HVACTOOL/Module1.vb                           |   2 +-
 HVACTOOL/testSSMTechBenefits.csv              |  33 +
 .../VectoAuxiliaries/Hvac/ISSMTechList.vb     |   5 +-
 VECTOAux/VectoAuxiliaries/Hvac/SSMTOOL.vb     |  26 +-
 VECTOAux/VectoAuxiliaries/Hvac/SSMTechList.vb |  38 +-
 .../Hvac/TechListBenefitLine.vb               |   7 +-
 .../UI/frmAuxiliaryConfig.Designer.vb         |   7 +-
 .../UI/frmAuxiliaryConfig.resx                |   4 +-
 .../VectoAuxiliaries/UI/frmAuxiliaryConfig.vb | 665 ++++++------
 .../UI/frmHVACTool.Designer.vb                | 950 +++++++++++++-----
 VECTOAux/VectoAuxiliaries/UI/frmHVACTool.vb   | 496 +++++++--
 12 files changed, 1499 insertions(+), 737 deletions(-)
 create mode 100644 HVACTOOL/testSSMTechBenefits.csv

diff --git a/HVACTOOL/HVACTOOL.vbproj b/HVACTOOL/HVACTOOL.vbproj
index a38b6e506f..4f45fc6a5b 100644
--- a/HVACTOOL/HVACTOOL.vbproj
+++ b/HVACTOOL/HVACTOOL.vbproj
@@ -124,6 +124,9 @@
     <Content Include="SSMTechBenefitsALLON.csv">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
+    <Content Include="testSSMTechBenefits.csv">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\VECTOAux\VectoAuxiliaries\VectoAuxiliaries.vbproj">
diff --git a/HVACTOOL/Module1.vb b/HVACTOOL/Module1.vb
index 434fc033e7..bdc3bb59e8 100644
--- a/HVACTOOL/Module1.vb
+++ b/HVACTOOL/Module1.vb
@@ -4,7 +4,7 @@ module Main
 
 Sub main()
 
-   Dim frm As New frmHVACTool("BusDatabase.csv", "ssm.Ahsm")
+   Dim frm As New frmHVACTool("BusDatabase.csv", "ssmDelete.ahsm")
 
    frm.ShowDialog
 
diff --git a/HVACTOOL/testSSMTechBenefits.csv b/HVACTOOL/testSSMTechBenefits.csv
new file mode 100644
index 0000000000..bad9f3ed24
--- /dev/null
+++ b/HVACTOOL/testSSMTechBenefits.csv
@@ -0,0 +1,33 @@
+Category,BenefitName,Units,LowH,LowV,LowC,SemiLowH,SemiLowV,SemiLowC,RaisedH,RaisedV,RaisedC,OnVehicle,LineType,ActiveVH,ActiveVV,ActiveVC
+Insulation,Foils (g-value reduction),fraction,0.01,0,0.01,0.01,0,0.01,0.01,0,0.01,FALSE,0,FALSE,FALSE,FALSE
+Insulation,Double-glazing (g-value reduction- u-value reduction),fraction,0,0,0,0.02,0,0.012,0.02,0,0.025,FALSE,0,FALSE,FALSE,FALSE
+Insulation,Heat insulation glazing (u-value reduction),fraction,0.005,0,0.01,0.01,0,0.028,0.01,0,0.024,FALSE,0,FALSE,FALSE,FALSE
+Insulation,Roof insulation (u-value reduction),fraction,0.02,0,-0.01,-0.01,0,-0.012,-0.01,0,-0.032,FALSE,0,FALSE,FALSE,FALSE
+Insulation,Wall insulation (u-value reduction),fraction,0.01,0,0.02,0.02,0,0.019,0.02,0,0.05,FALSE,0,FALSE,FALSE,FALSE
+Insulation,Floor insulation (u-value reduction),fraction,0,0,0,0.02,0,0.027,0.02,0,0.012,FALSE,0,FALSE,FALSE,FALSE
+Insulation,Door insulation (u-value reduction),fraction,0.01,0,0.02,0.01,0,0.028,0.01,0,0.021,FALSE,0,FALSE,FALSE,FALSE
+Insulation,Clearance between door frame / door leaf  (different solutions bristles / rubberseals)  (reduced leckage air),fraction,0.01,0,0.02,0.005,0,0.036,0.008,0,0.041,FALSE,0,FALSE,FALSE,FALSE
+Insulation,Insulation of heating and cooling pipes (increase heating efficiency),fraction,0.01,0,0.02,0.01,0,0.024,0.01,0,0.029,FALSE,0,FALSE,FALSE,FALSE
+Insulation,Changeable' glas (g-value),fraction,0.005,0,0.01,0.01,0,0.025,0.011,0,0.025,FALSE,0,FALSE,FALSE,FALSE
+Insulation,Reflective paintings,fraction,0.005,0,0.005,0.005,0,0.02,0.005,0,0.012,FALSE,0,FALSE,FALSE,FALSE
+Insulation,Insulation of engine compartment,fraction,0,0,0.01,0,0,0.023,0,0,0.02,FALSE,0,FALSE,FALSE,FALSE
+Ventilation,Fan engines (EC- Brush) (efficiency),fraction,0,0.01,0,0,0.03,0,0,0.018,0,FALSE,3,FALSE,FALSE,FALSE
+Ventilation,Fan controll strategy (serial / parallel),fraction,0,0.005,0,0,0.017,0,0,0.02,0,FALSE,3,FALSE,FALSE,FALSE
+Ventilation,Air curtain (reduces air exchange between in-cabin room and environment,fraction,0.01,-0.005,0.01,0,0,0,0,0,0,FALSE,0,FALSE,FALSE,FALSE
+Ventilation,Partial air recirculation,fraction,0.02,0,-0.01,-0.01,0,-0.012,-0.01,0,-0.032,FALSE,0,FALSE,FALSE,FALSE
+Ventilation,Variable fresh air rate (influence on heating / cooling demand),fraction,0,0,0,-0.01,0,-0.012,-0.01,0,-0.032,FALSE,0,FALSE,FALSE,FALSE
+Heating,Engine waste heat recovery (reduces heating demand for auxillary heater) ALREADY IMPLEMENTED,fraction,0.014,0,0,0.024,0,0,0.01,0,0,FALSE,0,FALSE,FALSE,FALSE
+Heating,Heat storage (increase heating efficiency),fraction,0.012,0,0,0.028,0,0,0.005,0,0,FALSE,0,FALSE,FALSE,FALSE
+Heating,Heat pump systems (increase heating efficiency),fraction,0.01,0,0,0.02,0,0,0.005,0,0,FALSE,0,FALSE,FALSE,FALSE
+Heating,Position of heatexchangers in-cabin room (air flow towards walls / windows) [increases heat losses through increased ?T],fraction,0.02,0,0,0.019,0,0,0.03,0,0,FALSE,0,FALSE,FALSE,FALSE
+Heating,Heated surfaces,fraction,-0.01,0,0,-0.012,0,0,-0.032,0,0,FALSE,0,FALSE,FALSE,FALSE
+Heating,Heated seats,fraction,0.01,0,0,0.01,0,0,0.01,0,0,FALSE,0,FALSE,FALSE,FALSE
+Heating,Aux. heater type (heated medium water- air) (efficiency value)(energy source- fuel ptc),fraction,0.02,0,0,0.015,0,0,0.02,0,0,FALSE,0,FALSE,FALSE,FALSE
+Cooling,Adjustable compressorpower (cooling power variable) ALREADY IMPLEMENTED,fraction,0,0,0.01,0,0,0.01,0,0,0.02,FALSE,0,FALSE,FALSE,FALSE
+Cooling,Driver ac-system (mechanical),kW,0,0,-0.2,0,0,-0.3,0,0,-0.4,FALSE,1,FALSE,FALSE,FALSE
+Cooling,Driver ac-system (electrical),kW,0,0,-0.1,0,0,-0.15,0,0,-0.2,FALSE,2,FALSE,FALSE,FALSE
+Cooling,Different sizes of air ducts (pressure loss effects power consumption of the fan engines),fraction,0,-0.01,0,0,-0.012,0,0,-0.032,0,FALSE,3,FALSE,FALSE,FALSE
+Cooling,Low temperature storages / storage vaporizer,fraction,0,0,0.014,0,0,0.012,0,0,0.012,FALSE,0,FALSE,FALSE,FALSE
+Cooling,Speed depending air conditioning,fraction,0,0,0.018,0,0,0.02,0,0,0.021,FALSE,0,FALSE,FALSE,FALSE
+Cooling,Ejector,fraction,0,0,0.023,0,0,0.024,0,0,0.012,FALSE,0,FALSE,FALSE,FALSE
+Cooling,Downhill' savings (determine diff. between effect for mech. & electr. Comp. regarding fuel consumpt.),fraction,0,0,0.01,0,0,0.028,0,0,0.021,FALSE,0,FALSE,FALSE,FALSE
diff --git a/VECTOAux/VectoAuxiliaries/Hvac/ISSMTechList.vb b/VECTOAux/VectoAuxiliaries/Hvac/ISSMTechList.vb
index 5ccb3ed0a5..4f030766a8 100644
--- a/VECTOAux/VectoAuxiliaries/Hvac/ISSMTechList.vb
+++ b/VECTOAux/VectoAuxiliaries/Hvac/ISSMTechList.vb
@@ -8,7 +8,9 @@ Public Interface ISSMTechList
  Sub Clear()
  Function    Add( item As ITechListBenefitLine, byref feedback as String) As Boolean
  Function Delete( item As ITechListBenefitLine, byref feedback as String) As Boolean
- Function Modify( item As ITechListBenefitLine, byref feedback as String) As Boolean
+ Function Modify( originalItem As ITechListBenefitLine, modifiedItem As ITechListBenefitLine, byref feedback as String) As Boolean
+
+  Sub SetSSMGeneralInputs( genInputs As ISSMGenInputs)
 
  ReadOnly Property HValueVariation  As Double
  ReadOnly Property VHValueVariation As Double
@@ -24,6 +26,7 @@ Public Interface ISSMTechList
 
 
  Function Initialise() As Boolean
+ Function Initialise( filePath As String ) As Boolean
 
 
 
diff --git a/VECTOAux/VectoAuxiliaries/Hvac/SSMTOOL.vb b/VECTOAux/VectoAuxiliaries/Hvac/SSMTOOL.vb
index b6845fe700..dbe223860d 100644
--- a/VECTOAux/VectoAuxiliaries/Hvac/SSMTOOL.vb
+++ b/VECTOAux/VectoAuxiliaries/Hvac/SSMTOOL.vb
@@ -15,6 +15,7 @@ Implements ISSMTOOL
  Public genInputs As ISSMGenInputs
  Public techList As ISSMTechList
 
+
  'Public facing properties, final results from calculations.
  Public ReadOnly Property ElectricalWAdjusted As Single Implements ISSMTOOL.ElectricalWAdjusted
    Get
@@ -51,16 +52,14 @@ Implements ISSMTOOL
 
  'Constructors
  Sub New()
-
+  
 
  End Sub
  Sub New(filePath As String)
 
    Me.filePath = filePath
-
-   genInputs = New SSMGenInputs(True)
-   techList = New SSMTechList(filePath, genInputs)
-
+   genInputs = New SSMGenInputs()
+   techList  = New SSMTechList(filePath,genInputs)
 
  End Sub
 
@@ -71,14 +70,11 @@ Implements ISSMTOOL
 
      genInputs.InjectFrom(DirectCast(from, SSMTOOL).genInputs)
 
-     techList.InjectFrom(DirectCast(from, SSMTOOL).techList)
      techList.Clear()
 
      For Each line As TechListBenefitLine In DirectCast(from, SSMTOOL).techList.TechLines
 
-         Dim newLine As ITechListBenefitLine = New TechListBenefitLine(Me.genInputs)
-         newLine.InjectFrom(line)
-         techList.Add(newLine, feedback)
+         techList.Add(line, feedback)
 
     Next
 
@@ -112,7 +108,7 @@ End Function
 
     Dim returnValue As Boolean = True
     Dim settings As JsonSerializerSettings = New JsonSerializerSettings()
-    Dim tmpAux As SSMTOOL = New SSMTOOL()
+    Dim tmpAux As SSMTOOL = New SSMTOOL(filePath)
 
     settings.TypeNameHandling = TypeNameHandling.Objects
 
@@ -124,6 +120,16 @@ End Function
 
        tmpAux = JsonConvert.DeserializeObject(Of SSMTOOL)(output, settings)
 
+       tmpAux.techList.SetSSMGeneralInputs( tmpAux.genInputs)
+
+       For Each tll As TechListBenefitLine In tmpAux.techList.TechLines
+
+         tll.inputSheet= tmpAux.genInputs
+
+       Next
+
+   
+
        'This is where we Assume values of loaded( Deserialized ) object.
        Clone(tmpAux)
 
diff --git a/VECTOAux/VectoAuxiliaries/Hvac/SSMTechList.vb b/VECTOAux/VectoAuxiliaries/Hvac/SSMTechList.vb
index 940e8f847a..eb854de9ce 100644
--- a/VECTOAux/VectoAuxiliaries/Hvac/SSMTechList.vb
+++ b/VECTOAux/VectoAuxiliaries/Hvac/SSMTechList.vb
@@ -6,16 +6,15 @@ Namespace Hvac
 Public Class SSMTechList
  Implements ISSMTechList
 
-
+  'Private Fields
   Private filePath As String
   Private _ssmInputs As ISSMGenInputs
   Private _dirty As Boolean
-  
-  
+
   public property  TechLines As List(Of ITechListBenefitLine)  Implements ISSMTechList.TechLines
   
-  
-  Public Sub New(filepath As String, genInputs As ISSMGenInputs)
+  'Constructors
+  Public Sub New(filepath As String, genInputs As ISSMGenInputs) 
   
      Me.TechLines = New List(Of ITechListBenefitLine)
 
@@ -28,8 +27,21 @@ Public Class SSMTechList
   End Sub
 
 
+  Public Sub SetSSMGeneralInputs( genInputs As ISSMGenInputs) Implements ISSMTechList.SetSSMGeneralInputs
+
+     _ssmInputs = genInputs
+
+  End Sub
+
+  'Initialisation Methods
+  Public Function Initialise( filePath As String ) As Boolean Implements ISSMTechList.Initialise
+
+     Me.filePath=filePath
+
+     Return Initialise()
 
-  Public Function Initialise() As Boolean Implements ISSMTechList.Initialise
+  End Function
+  Public Function Initialise( ) As Boolean Implements ISSMTechList.Initialise
 
 
 
@@ -129,7 +141,7 @@ Public Class SSMTechList
 
 End Function
 
-   
+  'Public Properties - Outputs Of Class
   Public ReadOnly Property CValueVariation As Double Implements ISSMTechList.CValueVariation
             Get
                  Dim a As double
@@ -200,6 +212,7 @@ End Function
         End Property
 
 
+  'Member Management
   Public Function Add(item As ITechListBenefitLine, ByRef feedback As String) As Boolean Implements ISSMTechList.Add
 
            Dim initialCount As Integer = TechLines.Count
@@ -239,7 +252,6 @@ End Function
 
 
         End Function
-
   Public Sub Clear() Implements ISSMTechList.Clear
            
            If TechLines.Count>0 then _dirty=true
@@ -249,7 +261,6 @@ End Function
 
 
    End Sub
-
   Public Function Delete(item As ITechListBenefitLine, ByRef feedback As String) As Boolean Implements ISSMTechList.Delete
 
           Dim currentCount As Integer = TechLines.Count
@@ -286,18 +297,17 @@ End Function
            End If
 
         End Function
+  Public Function Modify( originalItem As ITechListBenefitLine, newItem As ITechListBenefitLine, ByRef feedback As String) As Boolean Implements ISSMTechList.Modify
 
-  Public Function Modify(item As ITechListBenefitLine, ByRef feedback As String) As Boolean Implements ISSMTechList.Modify
-
-           Dim fi As TechListBenefitLine = TechLines.Find( Function(f) f.Category= item.Category AndAlso item.BenefitName )
+           Dim fi As TechListBenefitLine = TechLines.Find( Function(f) (f.Category= originalitem.Category) AndAlso f.BenefitName= originalitem.BenefitName )
 
            If( Not fi is Nothing ) then
 
            try
 
-               fi.CloneFrom( item )
+               fi.CloneFrom( newItem )
                         
-               If item = fi then
+               If newItem = fi then
                   'This succeeded
                   _dirty=true
                   return True              
diff --git a/VECTOAux/VectoAuxiliaries/Hvac/TechListBenefitLine.vb b/VECTOAux/VectoAuxiliaries/Hvac/TechListBenefitLine.vb
index feb865ba7d..6a9c0195de 100644
--- a/VECTOAux/VectoAuxiliaries/Hvac/TechListBenefitLine.vb
+++ b/VECTOAux/VectoAuxiliaries/Hvac/TechListBenefitLine.vb
@@ -24,7 +24,7 @@ Public Class TechListBenefitLine
 
 
 Private _h,_vh,_vv,_vc,_c As Single
-Private inputSheet As ISSMGenInputs
+Public  inputSheet As ISSMGenInputs
 
 Public Property  Units  As string Implements ITechListBenefitLine.Units
 Public Property  Category As String Implements ITechListBenefitLine.Category
@@ -176,6 +176,11 @@ Public ReadOnly Property C As Single Implements ITechListBenefitLine.C
     End Get
 End Property
 
+
+Sub new()
+
+End Sub
+
 Sub new ( geninputs As ISSMGenInputs )
 
    Me.inputSheet     =   geninputs  
diff --git a/VECTOAux/VectoAuxiliaries/UI/frmAuxiliaryConfig.Designer.vb b/VECTOAux/VectoAuxiliaries/UI/frmAuxiliaryConfig.Designer.vb
index d0d6b055bc..c9df49e3f0 100644
--- a/VECTOAux/VectoAuxiliaries/UI/frmAuxiliaryConfig.Designer.vb
+++ b/VECTOAux/VectoAuxiliaries/UI/frmAuxiliaryConfig.Designer.vb
@@ -210,7 +210,7 @@ Partial Class frmAuxiliaryConfig
         Me.tabGeneralConfig.Location = New System.Drawing.Point(4, 22)
         Me.tabGeneralConfig.Name = "tabGeneralConfig"
         Me.tabGeneralConfig.Padding = New System.Windows.Forms.Padding(3)
-        Me.tabGeneralConfig.Size = New System.Drawing.Size(901, 704)
+        Me.tabGeneralConfig.Size = New System.Drawing.Size(901, 587)
         Me.tabGeneralConfig.TabIndex = 0
         Me.tabGeneralConfig.Text = "General"
         Me.tabGeneralConfig.UseVisualStyleBackColor = true
@@ -274,6 +274,7 @@ Partial Class frmAuxiliaryConfig
         '
         'tabElectricalConfig
         '
+        Me.tabElectricalConfig.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
         Me.tabElectricalConfig.Controls.Add(Me.btnAALTOpen)
         Me.tabElectricalConfig.Controls.Add(Me.btnAlternatorMapPath)
         Me.tabElectricalConfig.Controls.Add(Me.gvResultsCardOverrun)
@@ -563,7 +564,7 @@ Partial Class frmAuxiliaryConfig
         Me.tabPneumaticConfig.Controls.Add(Me.pnlPneumaticAuxillaries)
         Me.tabPneumaticConfig.Location = New System.Drawing.Point(4, 22)
         Me.tabPneumaticConfig.Name = "tabPneumaticConfig"
-        Me.tabPneumaticConfig.Size = New System.Drawing.Size(901, 704)
+        Me.tabPneumaticConfig.Size = New System.Drawing.Size(901, 587)
         Me.tabPneumaticConfig.TabIndex = 2
         Me.tabPneumaticConfig.Text = "Pneumatics"
         Me.tabPneumaticConfig.UseVisualStyleBackColor = true
@@ -1080,7 +1081,7 @@ Partial Class frmAuxiliaryConfig
         Me.tabHVACConfig.Controls.Add(Me.lblHVACElectricalLoadPowerWatts)
         Me.tabHVACConfig.Location = New System.Drawing.Point(4, 22)
         Me.tabHVACConfig.Name = "tabHVACConfig"
-        Me.tabHVACConfig.Size = New System.Drawing.Size(901, 704)
+        Me.tabHVACConfig.Size = New System.Drawing.Size(901, 587)
         Me.tabHVACConfig.TabIndex = 3
         Me.tabHVACConfig.Text = "HVAC"
         Me.tabHVACConfig.UseVisualStyleBackColor = true
diff --git a/VECTOAux/VectoAuxiliaries/UI/frmAuxiliaryConfig.resx b/VECTOAux/VectoAuxiliaries/UI/frmAuxiliaryConfig.resx
index 4d998fea3e..3d9bf05720 100644
--- a/VECTOAux/VectoAuxiliaries/UI/frmAuxiliaryConfig.resx
+++ b/VECTOAux/VectoAuxiliaries/UI/frmAuxiliaryConfig.resx
@@ -121,7 +121,7 @@
   <data name="btnAALTOpen.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAACw4AAAsOAUC+4UEAAAAGYktHRAD/AP8A/6C9p5MAAAAHdElNRQfdAw8KGzD/z7E3
+        YQUAAAAJcEhZcwAACw0AAAsNAe0HwCwAAAAGYktHRAD/AP8A/6C9p5MAAAAHdElNRQfdAw8KGzD/z7E3
         AAACLElEQVQ4T2OgCggMDGQysg5n1zcPZjewDGU3tApjB/GNbWAYxA9ld3V1ZoFqQQX+4UVO+XVrFxU0
         bN2QW7dpfVb1hvUZFevWp5evXZ9esR7I3rQ+v3b9yryS7mx3d1deqDYE8IpobUqsf/Dfp+DFf8+8Z//d
         c578d8169N8l4+F/p/QHQPzwf2DBzf9xuYtOMfBaykO1IUBadmXFpTs//x+9+O3f0Qtf/4PwkfNfwPjw
@@ -153,7 +153,7 @@
   <data name="btnOpenACMP.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAACw0AAAsNAe0HwCwAAAAGYktHRAD/AP8A/6C9p5MAAAAHdElNRQfdAw8KGzD/z7E3
+        YQUAAAAJcEhZcwAACwwAAAsMAT9AIsgAAAAGYktHRAD/AP8A/6C9p5MAAAAHdElNRQfdAw8KGzD/z7E3
         AAACLElEQVQ4T2OgCggMDGQysg5n1zcPZjewDGU3tApjB/GNbWAYxA9ld3V1ZoFqQQX+4UVO+XVrFxU0
         bN2QW7dpfVb1hvUZFevWp5evXZ9esR7I3rQ+v3b9yryS7mx3d1deqDYE8IpobUqsf/Dfp+DFf8+8Z//d
         c578d8169N8l4+F/p/QHQPzwf2DBzf9xuYtOMfBaykO1IUBadmXFpTs//x+9+O3f0Qtf/4PwkfNfwPjw
diff --git a/VECTOAux/VectoAuxiliaries/UI/frmAuxiliaryConfig.vb b/VECTOAux/VectoAuxiliaries/UI/frmAuxiliaryConfig.vb
index fbc4c8ed90..e139497722 100644
--- a/VECTOAux/VectoAuxiliaries/UI/frmAuxiliaryConfig.vb
+++ b/VECTOAux/VectoAuxiliaries/UI/frmAuxiliaryConfig.vb
@@ -25,19 +25,14 @@ Public  originalConfig As AuxiliaryConfig ' required to test if the form is dirt
 Private TabColors As Dictionary(Of TabPage, Color) = New Dictionary(Of TabPage, Color)()
 Private processing As Boolean = False
 Private SecondsIntoCycle As Integer = 0
-
 Private vectoFile As String = ""
 Private vectoPath As String = ""
 Private auxFile As string
-
 Private cmFilesList As String()
-
-
 Private SaveClicked As Boolean
 
 #End Region
 
-
 Private Function ValidateAuxFileName( filename As String ) As Boolean
 
        Dim message As String = String.Empty
@@ -50,6 +45,7 @@ Private Function ValidateAuxFileName( filename As String ) As Boolean
 
 End Function
 
+'Constructor
 Public Sub new( byval fileName As String, byval vectoFileName As String )
 
 
@@ -75,7 +71,7 @@ Public Sub new( byval fileName As String, byval vectoFileName As String )
 
     Catch ex As Exception
 
-       MessageBox.Show( "The filename you supplied {0} was invalid or could not be found ", fileName )
+     MessageBox.Show( "The filename you supplied {0} was invalid or could not be found ", fileName )
      Me.DialogResult=Windows.Forms.DialogResult.Abort
      Me.Close
 
@@ -85,207 +81,6 @@ Public Sub new( byval fileName As String, byval vectoFileName As String )
     
 End Sub
 
-
-Private Sub SetupControls()
-
-
-      Dim cIndex As Integer = 0
-
-      gvElectricalConsumables.AutoGenerateColumns = False
-
-     'ElectricalConsumerGrid 
-     'Columns
-     cIndex = gvElectricalConsumables.Columns.Add("Category", "Category")
-     gvElectricalConsumables.Columns(cIndex).DataPropertyName = "Category"
-     gvElectricalConsumables.Columns(cIndex).MinimumWidth = 150
-     gvElectricalConsumables.Columns(cIndex).ReadOnly = True
-     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Alignment = DataGridViewContentAlignment.TopCenter
-     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Padding = New Padding(1, 2, 1, 1)
-
-     cIndex = gvElectricalConsumables.Columns.Add("ConsumerName", "Name")
-
-     gvElectricalConsumables.Columns(cIndex).DataPropertyName = "ConsumerName"
-     gvElectricalConsumables.Columns(cIndex).MinimumWidth = 308
-     gvElectricalConsumables.Columns(cIndex).ReadOnly = True
-     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Alignment = DataGridViewContentAlignment.TopCenter
-     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Padding = New Padding(1, 2, 1, 1)
-
-     Dim baseVehicle As New DataGridViewCheckBoxColumn(False)
-     baseVehicle.HeaderText = "Base Vehicle"
-     cIndex = gvElectricalConsumables.Columns.Add(baseVehicle)
-     gvElectricalConsumables.Columns(cIndex).DataPropertyName = "BaseVehicle"
-     gvElectricalConsumables.Columns(cIndex).Width = 75
-     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Alignment = DataGridViewContentAlignment.TopCenter
-     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Padding = New Padding(1, 2, 1, 1)
-     gvElectricalConsumables.Columns(cIndex).HeaderCell.ToolTipText = "Energy included in the calculations of base vehicle"
-
-     cIndex = gvElectricalConsumables.Columns.Add("NominalConsumptionAmps", "Nominal Amps")
-     gvElectricalConsumables.Columns(cIndex).DataPropertyName = "NominalConsumptionAmps"
-     gvElectricalConsumables.Columns(cIndex).Width = 70
-     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Alignment = DataGridViewContentAlignment.TopCenter
-     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Padding = New Padding(1, 2, 1, 1)
-     gvElectricalConsumables.Columns(cIndex).HeaderCell.ToolTipText = "Nominal consumption in AMPS"
-
-     cIndex = gvElectricalConsumables.Columns.Add("PhaseIdle_TractionOn", "PhaseIdle/ TractionOn")
-     gvElectricalConsumables.Columns(cIndex).DataPropertyName = "PhaseIdle_TractionOn"
-     gvElectricalConsumables.Columns(cIndex).Width = 70
-     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Alignment = DataGridViewContentAlignment.TopCenter
-     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Padding = New Padding(1, 2, 1, 1)
-     gvElectricalConsumables.Columns(cIndex).HeaderCell.ToolTipText = "Represents the amount of time (during engine fueling) as " & vbCrLf & "percentage that the consumer is active during the cycle."
-
-     cIndex = gvElectricalConsumables.Columns.Add("NumberInActualVehicle", "Num in Vehicle")
-     gvElectricalConsumables.Columns(cIndex).DataPropertyName = "NumberInActualVehicle"
-     gvElectricalConsumables.Columns(cIndex).Width = 70
-     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Alignment = DataGridViewContentAlignment.TopCenter
-     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Padding = New Padding(1, 2, 1, 1)
-     gvElectricalConsumables.Columns(cIndex).HeaderCell.ToolTipText = "Number of consumables of this" & vbCrLf & "type installed on the vehicle."
-
-     'ResultCard Grids
-
-     'Handler for deleting rows.
-
-
-     'IDLE
-
-     cIndex = gvResultsCardIdle.Columns.Add("Amps", "Amps")
-     gvResultsCardIdle.Columns(cIndex).DataPropertyName = "Amps"
-     gvResultsCardIdle.Columns(cIndex).Width = 65
-
-     cIndex = gvResultsCardIdle.Columns.Add("SmartAmps", "SmartAmps")
-     gvResultsCardIdle.Columns(cIndex).DataPropertyName = "SmartAmps"
-     gvResultsCardIdle.Columns(cIndex).Width = 65
-
-     'TRACTION
-     cIndex = gvResultsCardTraction.Columns.Add("Amps", "Amps")
-     gvResultsCardTraction.Columns(cIndex).DataPropertyName = "Amps"
-     gvResultsCardTraction.Columns(cIndex).Width = 65
-
-     cIndex = gvResultsCardTraction.Columns.Add("SmartAmps", "SmartAmps")
-     gvResultsCardTraction.Columns(cIndex).DataPropertyName = "SmartAmps"
-     gvResultsCardTraction.Columns(cIndex).Width = 65
-
-     'OVERRUN
-     cIndex = gvResultsCardOverrun.Columns.Add("Amps", "Amps")
-     gvResultsCardOverrun.Columns(cIndex).DataPropertyName = "Amps"
-     gvResultsCardOverrun.Columns(cIndex).Width = 65
-
-     cIndex = gvResultsCardOverrun.Columns.Add("SmartAmps", "SmartAmps")
-     gvResultsCardOverrun.Columns(cIndex).DataPropertyName = "SmartAmps"
-     gvResultsCardOverrun.Columns(cIndex).Width = 65
-
-
-
-
-End Sub
-#Region "Binding Control"
-
-
-Private Sub CreateBindings()
-
-     'auxConfig.Vecto Bindings
-     txtPowernetVoltage.DataBindings.Add("Text", auxConfig.ElectricalUserInputsConfig, "PowerNetVoltage")
-     'txtVehicleWeightKG.DataBindings.Add("Text", auxConfig.VectoInputs, "VehicleWeightKG")
-     'cboCycle.DataBindings.Add("Text", auxConfig.VectoInputs, "Cycle")
-     txtFuelMap.DataBindings.Add("Text", auxConfig.VectoInputs, "FuelMap")
-
-     'Electricals General
-     txtAlternatorMapPath.DataBindings.Add("Text", auxConfig.ElectricalUserInputsConfig, "AlternatorMap")
-     txtAlternatorGearEfficiency.DataBindings.Add("Text", auxConfig.ElectricalUserInputsConfig, "AlternatorGearEfficiency")
-     txtDoorActuationTimeSeconds.DataBindings.Add("Text", auxConfig.ElectricalUserInputsConfig, "DoorActuationTimeSecond")
-     chkSmartElectricals.DataBindings.Add("Checked", auxConfig.ElectricalUserInputsConfig, "SmartElectrical", False, DataSourceUpdateMode.OnPropertyChanged)
-
-
-     'Electrical ConsumablesGrid
-     Dim electricalConsumerBinding As New BindingList(Of IElectricalConsumer)(auxConfig.ElectricalUserInputsConfig.ElectricalConsumers.Items)
-     gvElectricalConsumables.DataSource = electricalConsumerBinding
-
-
-
-     'ResultCards
-
-         'IDLE
-         Dim idleBinding as BindingList(Of SmartResult)
-         idleBinding = New BindingList(Of SmartResult)(auxConfig.ElectricalUserInputsConfig.ResultCardIdle.Results)
-         idleBinding.AllowNew = True
-         idleBinding.AllowRemove = True
-         gvResultsCardIdle.DataSource = idleBinding
-
-         'TRACTION
-         Dim tractionBinding As BindingList(Of SmartResult)
-         tractionBinding = New BindingList(Of SmartResult)(auxConfig.ElectricalUserInputsConfig.ResultCardTraction.Results)
-         tractionBinding.AllowNew = True
-         tractionBinding.AllowRemove = True
-         gvResultsCardTraction.DataSource = tractionBinding
-
-         'OVERRUN
-         Dim overrunBinding As BindingList(Of SmartResult)
-         overrunBinding = New BindingList(Of SmartResult)(auxConfig.ElectricalUserInputsConfig.ResultCardOverrun.Results)
-         overrunBinding.AllowNew = True
-         overrunBinding.AllowRemove = True
-         gvResultsCardOverrun.DataSource = overrunBinding
-
-
-        'Pneumatic Auxillaries Binding
-        txtAdBlueNIperMinute.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "AdBlueNIperMinute")
-
-        txtOverrunUtilisationForCompressionFraction.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "OverrunUtilisationForCompressionFraction")
-        txtBrakingWithRetarderNIperKG.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "BrakingWithRetarderNIperKG")
-        txtBrakingNoRetarderNIperKG.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "BrakingNoRetarderNIperKG")
-        txtBreakingPerKneelingNIperKGinMM.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "BreakingPerKneelingNIperKGinMM", True, DataSourceUpdateMode.OnPropertyChanged, Nothing, "0.########")
-        txtPerDoorOpeningNI.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "PerDoorOpeningNI")
-        txtPerStopBrakeActuationNIperKG.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "PerStopBrakeActuationNIperKG")
-        txtAirControlledSuspensionNIperMinute.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "AirControlledSuspensionNIperMinute")
-        txtNonSmartRegenFractionTotalAirDemand.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "NonSmartRegenFractionTotalAirDemand")
-        txtSmartRegenFractionTotalAirDemand.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "SmartRegenFractionTotalAirDemand")
-        txtDeadVolumeLitres.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "DeadVolumeLitres")
-        txtDeadVolBlowOutsPerLitresperHour.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "DeadVolBlowOutsPerLitresperHour")
-
-        'Pneumatic UserInputsConfig Binding    
-        txtCompressorMap.DataBindings.Add("Text", auxConfig.PneumaticUserInputsConfig, "CompressorMap")
-        txtCompressorGearEfficiency.DataBindings.Add("Text", auxConfig.PneumaticUserInputsConfig, "CompressorGearEfficiency")
-        txtCompressorGearRatio.DataBindings.Add("Text", auxConfig.PneumaticUserInputsConfig, "CompressorGearRatio")
-        txtActuationsMap.DataBindings.Add("Text", auxConfig.PneumaticUserInputsConfig, "ActuationsMap")
-        chkSmartAirCompression.DataBindings.Add("Checked", auxConfig.PneumaticUserInputsConfig, "SmartAirCompression", False, DataSourceUpdateMode.OnPropertyChanged)
-
-
-
-
-        chkSmartRegeneration.DataBindings.Add("Checked", auxConfig.PneumaticUserInputsConfig, "SmartRegeneration", False, DataSourceUpdateMode.OnPropertyChanged)
-        chkRetarderBrake.DataBindings.Add("Checked", auxConfig.PneumaticUserInputsConfig, "RetarderBrake")
-        txtKneelingHeightMillimeters.DataBindings.Add("Text", auxConfig.PneumaticUserInputsConfig, "KneelingHeightMillimeters")
-        cboAirSuspensionControl.DataBindings.Add("Text", auxConfig.PneumaticUserInputsConfig, "AirSuspensionControl", False)
-        cboAdBlueDosing.DataBindings.Add("Text", auxConfig.PneumaticUserInputsConfig, "AdBlueDosing")
-        cboDoors.DataBindings.Add("Text", auxConfig.PneumaticUserInputsConfig, "Doors")
-
-        'HVAC Bindings     
-        txtHVACElectricalLoadPowerWatts.DataBindings.Add("Text", auxConfig.HvacUserInputsConfig.SteadyStateModel, "HVACElectricalLoadPowerWatts",False,DataSourceUpdateMode.OnPropertyChanged)
-        txtHVACFuellingLitresPerHour.DataBindings.Add("Text", auxConfig.HvacUserInputsConfig.SteadyStateModel, "HVACFuellingLitresPerHour",False,DataSourceUpdateMode.OnPropertyChanged)
-        txtHVACMechanicalLoadPowerWatts.DataBindings.Add("Text", auxConfig.HvacUserInputsConfig.SteadyStateModel, "HVACMechanicalLoadPowerWatts",False,DataSourceUpdateMode.OnPropertyChanged)
-
-        txtSSMFilePath.DataBindings.Add( "Text", auxConfig.HvacUserInputsConfig,"SSMFilePath")
-
-
-        'Signals
-
-
-
-End Sub
-
-Private Sub EnsureBinding()
-        With tabMain
-            Dim lastSelectedTabIndex As Integer = .SelectedIndex
-            If lastSelectedTabIndex < 0 OrElse lastSelectedTabIndex > .TabCount Then lastSelectedTabIndex = 0
-            For currentTab As Integer = 0 To .TabCount - 1
-                .SelectedIndex = currentTab
-            Next
-            .SelectedIndex = 0
-        End With
-    End Sub
-
-
-#End Region
-
-
 'Validation
 #Region "Validation Helpers"
 
@@ -722,7 +517,6 @@ End Function
 
 #End Region
 
-
 'Form Controls & Events
 Private Sub Dashboard_Load(sender As Object, e As EventArgs) Handles MyBase.Load
 
@@ -756,74 +550,56 @@ Private Sub Dashboard_Load(sender As Object, e As EventArgs) Handles MyBase.Load
 
 
 End Sub
+Private Sub frmAuxiliaryConfig_FormClosing( sender As Object,  e As FormClosingEventArgs) Handles MyBase.FormClosing
 
-#Region "Tab Header Color Change"
-
-Private Sub UpdateTabStatus(pageName As String, resultGood As Boolean)
 
+  If Me.DialogResult=Windows.Forms.DialogResult.Cancel then return
 
-       Dim page As TabPage = tabMain.TabPages(pageName)
+  Dim result As DialogResult
 
-           If Not resultGood Then
+  If  Not auxConfig.ConfigValuesAreTheSameAs( originalConfig )
 
-       SetTabHeader(page, Color.Red)
+             result = (MessageBox.Show("Would you like to save changes before closing?","Save Changes", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question))
 
-       Else
-              SetTabHeader(page, Control.DefaultBackColor)
+            Select Case  result
+            
+                case DialogResult.Yes:
+                    'save 
+                    If NOT SaveFile()    then
+                      e.Cancel=true
+                    End If
 
-       End If
+                case DialogResult.No:
+                    'just allow the form to close
+                    'without saving
+                    Me.DialogResult=Windows.Forms.DialogResult.Cancel
 
 
+                case DialogResult.Cancel:
+                    'cancel the close
+                    e.Cancel = true
+                    Me.DialogResult=Windows.Forms.DialogResult.Cancel
 
 
-End Sub
+            end select
 
-Private Sub SetTabHeader(page As TabPage, color As Color)
 
-    TabColors(page) = color
-    tabMain.Invalidate()
+  End If
+ 
 
 End Sub
+#Region "GridHandlers"
 
-Private Sub tabMain_DrawItem(sender As Object, e As DrawItemEventArgs)
+Private Sub gvElectricalConsumables_CellValidating(sender As Object, e As DataGridViewCellValidatingEventArgs) Handles gvElectricalConsumables.CellValidating
 
-    Dim br As Brush = New SolidBrush(TabColors(tabMain.TabPages(e.Index)))
+   Dim column As DataGridViewColumn = gvElectricalConsumables.Columns(e.ColumnIndex)
+   Dim s As Single
 
 
-    Using (br)
+   If e.ColumnIndex = -1 Then
 
-        e.Graphics.FillRectangle(br, e.Bounds)
-        Dim sz As SizeF = e.Graphics.MeasureString(tabMain.TabPages(e.Index).Text, e.Font)
-        e.Graphics.DrawString(tabMain.TabPages(e.Index).Text, e.Font, Brushes.Black, e.Bounds.Left + (e.Bounds.Width - sz.Width) / 2, e.Bounds.Top + (e.Bounds.Height - sz.Height) / 2 + 1)
-
-        Dim rect As Rectangle = e.Bounds
-        rect.Offset(-1, -1)
-        rect.Inflate(1, 1)
-       ' e.Graphics.DrawRectangle(Pens.DarkGray, rect)
-        'e.DrawFocusRectangle()
-
-    End Using
-
-
-
-
-End Sub
-
-
-#End Region
-
-#Region "GridHandlers"
-
-Private Sub gvElectricalConsumables_CellValidating(sender As Object, e As DataGridViewCellValidatingEventArgs) Handles gvElectricalConsumables.CellValidating
-
-   Dim column As DataGridViewColumn = gvElectricalConsumables.Columns(e.ColumnIndex)
-   Dim s As Single
-
-
-   If e.ColumnIndex = -1 Then
-
-   e.Cancel = True
-   Exit Sub
+   e.Cancel = True
+   Exit Sub
 
    End If
 
@@ -959,7 +735,6 @@ Private Sub gvElectricalConsumables_CellBeginEdit(sender As Object, e As DataGri
 End Sub
 
 #End Region
-
 #Region "Button Handlers"
 
 Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
@@ -976,8 +751,6 @@ Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Clic
 
 
 End Sub
-
-
 Private function SaveFile() As Boolean
 
    Dim result As Boolean
@@ -993,7 +766,6 @@ Private function SaveFile() As Boolean
    Return result
 
 End Function
-
 Private Function  LoadFile() As boolean
 
   'JSON METHOD
@@ -1013,8 +785,6 @@ Private Function  LoadFile() As boolean
   Return result
 
 End function
-
-
 Private Sub btnFuelMap_Click(sender As Object, e As EventArgs) Handles btnFuelMap.Click
 
                Dim fbAux As New cFileBrowser(True, False)
@@ -1034,7 +804,6 @@ Private Sub btnFuelMap_Click(sender As Object, e As EventArgs) Handles btnFuelMa
 
 
 End Sub
-
 Private Sub btnAlternatorMapPath_Click(sender As Object, e As EventArgs) Handles btnAlternatorMapPath.Click
 
 
@@ -1059,7 +828,6 @@ Private Sub btnAlternatorMapPath_Click(sender As Object, e As EventArgs) Handles
                txtAlternatorMapPath.Focus()
 
 End Sub
-
 Private Sub btnCompressorMap_Click(sender As Object, e As EventArgs) Handles btnCompressorMap.Click
 
 
@@ -1084,7 +852,6 @@ Private Sub btnCompressorMap_Click(sender As Object, e As EventArgs) Handles btn
 
 
 End Sub
-
 Private Sub btnActuationsMap_Click(sender As Object, e As EventArgs) Handles btnActuationsMap.Click
 
                Dim fbAux As New cFileBrowser(True, False)
@@ -1105,7 +872,6 @@ Private Sub btnActuationsMap_Click(sender As Object, e As EventArgs) Handles btn
                 txtActuationsMap.Focus()
 
 End Sub
-
 Private Sub btnCancel_Click( sender As Object,  e As EventArgs) Handles btnCancel.Click
 
 
@@ -1114,7 +880,6 @@ Private Sub btnCancel_Click( sender As Object,  e As EventArgs) Handles btnCance
 
 
 End Sub
-
 Private Sub btnSSMBSource_Click( sender As Object,  e As EventArgs) Handles btnSSMBSource.Click
 
 
@@ -1163,9 +928,34 @@ Private Sub btnSSMBSource_Click( sender As Object,  e As EventArgs) Handles btnS
 End Sub
 
 #End Region
+#Region "File Viewer Button Events"
+
+Private Sub btnAALTOpen_Click( sender As Object,  e As EventArgs) Handles btnAALTOpen.Click
+
+        OpenFiles(fFileRepl(Me.txtAlternatorMapPath.Text, fPATH(VECTOfile)))    
+    
+End Sub
+Private Sub btnOpenACMP_Click( sender As Object,  e As EventArgs) Handles btnOpenACMP.Click
+
+
+         OpenFiles(fFileRepl(Me.txtCompressorMap.Text, fPATH(VECTOfile)))
+
+End Sub
+Private Sub btnOpenAPAC_Click( sender As Object,  e As EventArgs) Handles btnOpenAPAC.Click
 
+          OpenFiles(fFileRepl(Me.txtActuationsMap.Text, fPATH(VECTOfile)))
+
+End Sub
+Private Sub btnOpenAHSM_Click( sender As Object,  e As EventArgs) Handles btnOpenAHSM.Click
+
+          OpenFiles(fFileRepl(Me.txtSSMFilePath.Text, fPATH(VECTOfile)))
+
+
+End Sub
 
-'Form Overrides
+#end region
+
+'Overrides
 Protected Overrides Function ProcessCmdKey(ByRef msg As Message, keyData As Keys) As Boolean
 
         If keyData = Keys.Enter AndAlso Me.AcceptButton Is Nothing Then
@@ -1187,62 +977,100 @@ Protected Overrides Function ProcessCmdKey(ByRef msg As Message, keyData As Keys
 
     End Function
 
-Public Sub UnbindAllControls(ByRef container As Control)
-  'Clear all of the controls within the container object
-  'If "Recurse" is true, then also clear controls within any sub-containers
-  Dim ctrl As Control = Nothing
+'Helpers
+Private Sub OpenFiles(ParamArray files() As String)
 
-  For Each ctrl In container.Controls
+        If files.Length = 0 Then Exit Sub
 
-           ctrl.DataBindings.Clear()
+        CmFilesList = files
 
-           If ctrl.HasChildren Then
-              UnbindAllControls(ctrl)
-           End If
+        OpenWithToolStripMenuItem.Text = "Open with notepad"
 
-  Next
+        CmFiles.Show(Cursor.Position)
 
 End Sub
+Private Sub OpenWithToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles OpenWithToolStripMenuItem.Click
+    If Not FileOpenAlt(CmFilesList(0)) Then MsgBox("Failed to open file!")
+End Sub
+Private Sub ShowInFolderToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ShowInFolderToolStripMenuItem.Click
+    If IO.File.Exists(CmFilesList(0)) Then
+        Try
+            System.Diagnostics.Process.Start("explorer", "/select,""" & CmFilesList(0) & "")
+        Catch ex As Exception
+            MsgBox("Failed to open file!")
+        End Try
+    Else
+        MsgBox("File not found!")
+    End If
+End Sub
+#Region "Tab Header Color Change"
 
-Private Sub frmAuxiliaryConfig_FormClosing( sender As Object,  e As FormClosingEventArgs) Handles MyBase.FormClosing
+Private Sub UpdateTabStatus(pageName As String, resultGood As Boolean)
 
 
-  If Me.DialogResult=Windows.Forms.DialogResult.Cancel then return
+       Dim page As TabPage = tabMain.TabPages(pageName)
 
-  Dim result As DialogResult
+           If Not resultGood Then
 
-  If  Not auxConfig.ConfigValuesAreTheSameAs( originalConfig )
+       SetTabHeader(page, Color.Red)
 
-             result = (MessageBox.Show("Would you like to save changes before closing?","Save Changes", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question))
+       Else
+              SetTabHeader(page, Control.DefaultBackColor)
 
-            Select Case  result
-            
-                case DialogResult.Yes:
-                    'save 
-                    If NOT SaveFile()    then
-                      e.Cancel=true
-                    End If
+       End If
 
-                case DialogResult.No:
-                    'just allow the form to close
-                    'without saving
-                    Me.DialogResult=Windows.Forms.DialogResult.Cancel
 
 
-                case DialogResult.Cancel:
-                    'cancel the close
-                    e.Cancel = true
-                    Me.DialogResult=Windows.Forms.DialogResult.Cancel
 
+End Sub
+Private Sub SetTabHeader(page As TabPage, color As Color)
+
+    TabColors(page) = color
+    tabMain.Invalidate()
+
+End Sub
+Private Sub tabMain_DrawItem(sender As Object, e As DrawItemEventArgs)
+
+    Dim br As Brush = New SolidBrush(TabColors(tabMain.TabPages(e.Index)))
+
+
+    Using (br)
+
+        e.Graphics.FillRectangle(br, e.Bounds)
+        Dim sz As SizeF = e.Graphics.MeasureString(tabMain.TabPages(e.Index).Text, e.Font)
+        e.Graphics.DrawString(tabMain.TabPages(e.Index).Text, e.Font, Brushes.Black, e.Bounds.Left + (e.Bounds.Width - sz.Width) / 2, e.Bounds.Top + (e.Bounds.Height - sz.Height) / 2 + 1)
+
+        Dim rect As Rectangle = e.Bounds
+        rect.Offset(-1, -1)
+        rect.Inflate(1, 1)
+       ' e.Graphics.DrawRectangle(Pens.DarkGray, rect)
+        'e.DrawFocusRectangle()
+
+    End Using
 
-            end select
 
 
-  End If
- 
 
 End Sub
 
+
+#End Region
+Public Sub UnbindAllControls(ByRef container As Control)
+  'Clear all of the controls within the container object
+  'If "Recurse" is true, then also clear controls within any sub-containers
+  Dim ctrl As Control = Nothing
+
+  For Each ctrl In container.Controls
+
+           ctrl.DataBindings.Clear()
+
+           If ctrl.HasChildren Then
+              UnbindAllControls(ctrl)
+           End If
+
+  Next
+
+End Sub
 Private Function GetSSMMAP( ByVal filePath As String , byref message As string) As Hvac.IHVACSteadyStateModel
 
       Dim ssmMap As New Hvac.HVACSteadyStateModel()
@@ -1258,90 +1086,229 @@ Private Function GetSSMMAP( ByVal filePath As String , byref message As string)
 
        catch ex As Exception
 
-       'TODO:?
+       MessageBox.Show("Unable to retreive values from map")
         
       End Try
 
         Return Nothing
 
 End Function
+Private Sub SetupControls()
 
 
-'Anciliary helpers
-Private Sub OpenFiles(ParamArray files() As String)
+      Dim cIndex As Integer = 0
 
-        If files.Length = 0 Then Exit Sub
+      gvElectricalConsumables.AutoGenerateColumns = False
 
-        CmFilesList = files
+     'ElectricalConsumerGrid 
+     'Columns
+     cIndex = gvElectricalConsumables.Columns.Add("Category", "Category")
+     gvElectricalConsumables.Columns(cIndex).DataPropertyName = "Category"
+     gvElectricalConsumables.Columns(cIndex).MinimumWidth = 150
+     gvElectricalConsumables.Columns(cIndex).ReadOnly = True
+     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Alignment = DataGridViewContentAlignment.TopCenter
+     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Padding = New Padding(1, 2, 1, 1)
 
-        OpenWithToolStripMenuItem.Text = "Open with notepad"
+     cIndex = gvElectricalConsumables.Columns.Add("ConsumerName", "Name")
 
-        CmFiles.Show(Cursor.Position)
+     gvElectricalConsumables.Columns(cIndex).DataPropertyName = "ConsumerName"
+     gvElectricalConsumables.Columns(cIndex).MinimumWidth = 308
+     gvElectricalConsumables.Columns(cIndex).ReadOnly = True
+     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Alignment = DataGridViewContentAlignment.TopCenter
+     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Padding = New Padding(1, 2, 1, 1)
 
-End Sub
+     Dim baseVehicle As New DataGridViewCheckBoxColumn(False)
+     baseVehicle.HeaderText = "Base Vehicle"
+     cIndex = gvElectricalConsumables.Columns.Add(baseVehicle)
+     gvElectricalConsumables.Columns(cIndex).DataPropertyName = "BaseVehicle"
+     gvElectricalConsumables.Columns(cIndex).Width = 75
+     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Alignment = DataGridViewContentAlignment.TopCenter
+     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Padding = New Padding(1, 2, 1, 1)
+     gvElectricalConsumables.Columns(cIndex).HeaderCell.ToolTipText = "Energy included in the calculations of base vehicle"
 
-Private Sub OpenWithToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles OpenWithToolStripMenuItem.Click
-    If Not FileOpenAlt(CmFilesList(0)) Then MsgBox("Failed to open file!")
-End Sub
+     cIndex = gvElectricalConsumables.Columns.Add("NominalConsumptionAmps", "Nominal Amps")
+     gvElectricalConsumables.Columns(cIndex).DataPropertyName = "NominalConsumptionAmps"
+     gvElectricalConsumables.Columns(cIndex).Width = 70
+     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Alignment = DataGridViewContentAlignment.TopCenter
+     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Padding = New Padding(1, 2, 1, 1)
+     gvElectricalConsumables.Columns(cIndex).HeaderCell.ToolTipText = "Nominal consumption in AMPS"
 
-Private Sub ShowInFolderToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ShowInFolderToolStripMenuItem.Click
-    If IO.File.Exists(CmFilesList(0)) Then
-        Try
-            System.Diagnostics.Process.Start("explorer", "/select,""" & CmFilesList(0) & "")
-        Catch ex As Exception
-            MsgBox("Failed to open file!")
-        End Try
-    Else
-        MsgBox("File not found!")
-    End If
-End Sub
+     cIndex = gvElectricalConsumables.Columns.Add("PhaseIdle_TractionOn", "PhaseIdle/ TractionOn")
+     gvElectricalConsumables.Columns(cIndex).DataPropertyName = "PhaseIdle_TractionOn"
+     gvElectricalConsumables.Columns(cIndex).Width = 70
+     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Alignment = DataGridViewContentAlignment.TopCenter
+     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Padding = New Padding(1, 2, 1, 1)
+     gvElectricalConsumables.Columns(cIndex).HeaderCell.ToolTipText = "Represents the amount of time (during engine fueling) as " & vbCrLf & "percentage that the consumer is active during the cycle."
 
-'Open File with software defined in Config
-Public Function FileOpenAlt(ByVal file As String) As Boolean
-        Dim PSI As New ProcessStartInfo
+     cIndex = gvElectricalConsumables.Columns.Add("NumberInActualVehicle", "Num in Vehicle")
+     gvElectricalConsumables.Columns(cIndex).DataPropertyName = "NumberInActualVehicle"
+     gvElectricalConsumables.Columns(cIndex).Width = 70
+     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Alignment = DataGridViewContentAlignment.TopCenter
+     gvElectricalConsumables.Columns(cIndex).HeaderCell.Style.Padding = New Padding(1, 2, 1, 1)
+     gvElectricalConsumables.Columns(cIndex).HeaderCell.ToolTipText = "Number of consumables of this" & vbCrLf & "type installed on the vehicle."
 
-        If Not IO.File.Exists(file) Then Return False
+     'ResultCard Grids
 
-        PSI.FileName = "notepad.exe"
-        PSI.Arguments = ChrW(34) & file & ChrW(34)
-        Try
-            Process.Start(PSI)
-            Return True
-        Catch ex As Exception
-            Return False
-        End Try
+     'Handler for deleting rows.
 
-    End Function
 
-#Region "File Viewer Button Events"
+     'IDLE
+
+     cIndex = gvResultsCardIdle.Columns.Add("Amps", "Amps")
+     gvResultsCardIdle.Columns(cIndex).DataPropertyName = "Amps"
+     gvResultsCardIdle.Columns(cIndex).Width = 65
 
+     cIndex = gvResultsCardIdle.Columns.Add("SmartAmps", "SmartAmps")
+     gvResultsCardIdle.Columns(cIndex).DataPropertyName = "SmartAmps"
+     gvResultsCardIdle.Columns(cIndex).Width = 65
 
-Private Sub btnAALTOpen_Click( sender As Object,  e As EventArgs) Handles btnAALTOpen.Click
+     'TRACTION
+     cIndex = gvResultsCardTraction.Columns.Add("Amps", "Amps")
+     gvResultsCardTraction.Columns(cIndex).DataPropertyName = "Amps"
+     gvResultsCardTraction.Columns(cIndex).Width = 65
 
-        OpenFiles(fFileRepl(Me.txtAlternatorMapPath.Text, fPATH(VECTOfile)))    
-    
-End Sub
-Private Sub btnOpenACMP_Click( sender As Object,  e As EventArgs) Handles btnOpenACMP.Click
+     cIndex = gvResultsCardTraction.Columns.Add("SmartAmps", "SmartAmps")
+     gvResultsCardTraction.Columns(cIndex).DataPropertyName = "SmartAmps"
+     gvResultsCardTraction.Columns(cIndex).Width = 65
 
+     'OVERRUN
+     cIndex = gvResultsCardOverrun.Columns.Add("Amps", "Amps")
+     gvResultsCardOverrun.Columns(cIndex).DataPropertyName = "Amps"
+     gvResultsCardOverrun.Columns(cIndex).Width = 65
+
+     cIndex = gvResultsCardOverrun.Columns.Add("SmartAmps", "SmartAmps")
+     gvResultsCardOverrun.Columns(cIndex).DataPropertyName = "SmartAmps"
+     gvResultsCardOverrun.Columns(cIndex).Width = 65
 
-         OpenFiles(fFileRepl(Me.txtCompressorMap.Text, fPATH(VECTOfile)))
 
-End Sub
-Private Sub btnOpenAPAC_Click( sender As Object,  e As EventArgs) Handles btnOpenAPAC.Click
 
-          OpenFiles(fFileRepl(Me.txtActuationsMap.Text, fPATH(VECTOfile)))
 
 End Sub
-Private Sub btnOpenAHSM_Click( sender As Object,  e As EventArgs) Handles btnOpenAHSM.Click
+#Region "Binding Control"
+
+
+Private Sub CreateBindings()
+
+     'auxConfig.Vecto Bindings
+     txtPowernetVoltage.DataBindings.Add("Text", auxConfig.ElectricalUserInputsConfig, "PowerNetVoltage")
+     'txtVehicleWeightKG.DataBindings.Add("Text", auxConfig.VectoInputs, "VehicleWeightKG")
+     'cboCycle.DataBindings.Add("Text", auxConfig.VectoInputs, "Cycle")
+     txtFuelMap.DataBindings.Add("Text", auxConfig.VectoInputs, "FuelMap")
+
+     'Electricals General
+     txtAlternatorMapPath.DataBindings.Add("Text", auxConfig.ElectricalUserInputsConfig, "AlternatorMap")
+     txtAlternatorGearEfficiency.DataBindings.Add("Text", auxConfig.ElectricalUserInputsConfig, "AlternatorGearEfficiency")
+     txtDoorActuationTimeSeconds.DataBindings.Add("Text", auxConfig.ElectricalUserInputsConfig, "DoorActuationTimeSecond")
+     chkSmartElectricals.DataBindings.Add("Checked", auxConfig.ElectricalUserInputsConfig, "SmartElectrical", False, DataSourceUpdateMode.OnPropertyChanged)
+
+
+     'Electrical ConsumablesGrid
+     Dim electricalConsumerBinding As New BindingList(Of IElectricalConsumer)(auxConfig.ElectricalUserInputsConfig.ElectricalConsumers.Items)
+     gvElectricalConsumables.DataSource = electricalConsumerBinding
+
+
+
+     'ResultCards
+
+         'IDLE
+         Dim idleBinding as BindingList(Of SmartResult)
+         idleBinding = New BindingList(Of SmartResult)(auxConfig.ElectricalUserInputsConfig.ResultCardIdle.Results)
+         idleBinding.AllowNew = True
+         idleBinding.AllowRemove = True
+         gvResultsCardIdle.DataSource = idleBinding
+
+         'TRACTION
+         Dim tractionBinding As BindingList(Of SmartResult)
+         tractionBinding = New BindingList(Of SmartResult)(auxConfig.ElectricalUserInputsConfig.ResultCardTraction.Results)
+         tractionBinding.AllowNew = True
+         tractionBinding.AllowRemove = True
+         gvResultsCardTraction.DataSource = tractionBinding
+
+         'OVERRUN
+         Dim overrunBinding As BindingList(Of SmartResult)
+         overrunBinding = New BindingList(Of SmartResult)(auxConfig.ElectricalUserInputsConfig.ResultCardOverrun.Results)
+         overrunBinding.AllowNew = True
+         overrunBinding.AllowRemove = True
+         gvResultsCardOverrun.DataSource = overrunBinding
+
+
+        'Pneumatic Auxillaries Binding
+        txtAdBlueNIperMinute.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "AdBlueNIperMinute")
+
+        txtOverrunUtilisationForCompressionFraction.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "OverrunUtilisationForCompressionFraction")
+        txtBrakingWithRetarderNIperKG.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "BrakingWithRetarderNIperKG")
+        txtBrakingNoRetarderNIperKG.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "BrakingNoRetarderNIperKG")
+        txtBreakingPerKneelingNIperKGinMM.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "BreakingPerKneelingNIperKGinMM", True, DataSourceUpdateMode.OnPropertyChanged, Nothing, "0.########")
+        txtPerDoorOpeningNI.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "PerDoorOpeningNI")
+        txtPerStopBrakeActuationNIperKG.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "PerStopBrakeActuationNIperKG")
+        txtAirControlledSuspensionNIperMinute.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "AirControlledSuspensionNIperMinute")
+        txtNonSmartRegenFractionTotalAirDemand.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "NonSmartRegenFractionTotalAirDemand")
+        txtSmartRegenFractionTotalAirDemand.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "SmartRegenFractionTotalAirDemand")
+        txtDeadVolumeLitres.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "DeadVolumeLitres")
+        txtDeadVolBlowOutsPerLitresperHour.DataBindings.Add("Text", auxConfig.PneumaticAuxillariesConfig, "DeadVolBlowOutsPerLitresperHour")
+
+        'Pneumatic UserInputsConfig Binding    
+        txtCompressorMap.DataBindings.Add("Text", auxConfig.PneumaticUserInputsConfig, "CompressorMap")
+        txtCompressorGearEfficiency.DataBindings.Add("Text", auxConfig.PneumaticUserInputsConfig, "CompressorGearEfficiency")
+        txtCompressorGearRatio.DataBindings.Add("Text", auxConfig.PneumaticUserInputsConfig, "CompressorGearRatio")
+        txtActuationsMap.DataBindings.Add("Text", auxConfig.PneumaticUserInputsConfig, "ActuationsMap")
+        chkSmartAirCompression.DataBindings.Add("Checked", auxConfig.PneumaticUserInputsConfig, "SmartAirCompression", False, DataSourceUpdateMode.OnPropertyChanged)
+
+
+
+
+        chkSmartRegeneration.DataBindings.Add("Checked", auxConfig.PneumaticUserInputsConfig, "SmartRegeneration", False, DataSourceUpdateMode.OnPropertyChanged)
+        chkRetarderBrake.DataBindings.Add("Checked", auxConfig.PneumaticUserInputsConfig, "RetarderBrake")
+        txtKneelingHeightMillimeters.DataBindings.Add("Text", auxConfig.PneumaticUserInputsConfig, "KneelingHeightMillimeters")
+        cboAirSuspensionControl.DataBindings.Add("Text", auxConfig.PneumaticUserInputsConfig, "AirSuspensionControl", False)
+        cboAdBlueDosing.DataBindings.Add("Text", auxConfig.PneumaticUserInputsConfig, "AdBlueDosing")
+        cboDoors.DataBindings.Add("Text", auxConfig.PneumaticUserInputsConfig, "Doors")
+
+        'HVAC Bindings     
+        txtHVACElectricalLoadPowerWatts.DataBindings.Add("Text", auxConfig.HvacUserInputsConfig.SteadyStateModel, "HVACElectricalLoadPowerWatts",False,DataSourceUpdateMode.OnPropertyChanged)
+        txtHVACFuellingLitresPerHour.DataBindings.Add("Text", auxConfig.HvacUserInputsConfig.SteadyStateModel, "HVACFuellingLitresPerHour",False,DataSourceUpdateMode.OnPropertyChanged)
+        txtHVACMechanicalLoadPowerWatts.DataBindings.Add("Text", auxConfig.HvacUserInputsConfig.SteadyStateModel, "HVACMechanicalLoadPowerWatts",False,DataSourceUpdateMode.OnPropertyChanged)
+
+        txtSSMFilePath.DataBindings.Add( "Text", auxConfig.HvacUserInputsConfig,"SSMFilePath")
+
+
+        'Signals
 
-          OpenFiles(fFileRepl(Me.txtSSMFilePath.Text, fPATH(VECTOfile)))
 
 
 End Sub
 
+Private Sub EnsureBinding()
+        With tabMain
+            Dim lastSelectedTabIndex As Integer = .SelectedIndex
+            If lastSelectedTabIndex < 0 OrElse lastSelectedTabIndex > .TabCount Then lastSelectedTabIndex = 0
+            For currentTab As Integer = 0 To .TabCount - 1
+                .SelectedIndex = currentTab
+            Next
+            .SelectedIndex = 0
+        End With
+    End Sub
+
 
-#end region
+#End Region
+
+
+'Open File with software defined in Config
+Public Function FileOpenAlt(ByVal file As String) As Boolean
+        Dim PSI As New ProcessStartInfo
 
+        If Not IO.File.Exists(file) Then Return False
+
+        PSI.FileName = "notepad.exe"
+        PSI.Arguments = ChrW(34) & file & ChrW(34)
+        Try
+            Process.Start(PSI)
+            Return True
+        Catch ex As Exception
+            Return False
+        End Try
+
+    End Function
 
 
 End Class
\ No newline at end of file
diff --git a/VECTOAux/VectoAuxiliaries/UI/frmHVACTool.Designer.vb b/VECTOAux/VectoAuxiliaries/UI/frmHVACTool.Designer.vb
index da35aec69c..2e4f7eb8be 100644
--- a/VECTOAux/VectoAuxiliaries/UI/frmHVACTool.Designer.vb
+++ b/VECTOAux/VectoAuxiliaries/UI/frmHVACTool.Designer.vb
@@ -127,25 +127,12 @@ Partial Class frmHVACTool
         Me.lblPassengerBoundaryTemp = New System.Windows.Forms.Label()
         Me.txtBC_SolarClouding = New System.Windows.Forms.TextBox()
         Me.lblSolarClouding = New System.Windows.Forms.Label()
-        Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
-        Me.ErrorProvider1 = New System.Windows.Forms.ErrorProvider(Me.components)
         Me.tabGeneralInputsOther = New System.Windows.Forms.TabPage()
-        Me.tabTechBenefits = New System.Windows.Forms.TabPage()
-        Me.grpEnvironmentConditions = New System.Windows.Forms.GroupBox()
-        Me.txtEC_EnviromentalTemperature = New System.Windows.Forms.TextBox()
-        Me.lbltxtEC_EnviromentalTemperature = New System.Windows.Forms.Label()
-        Me.txtEC_Solar = New System.Windows.Forms.TextBox()
-        Me.lbltxtEC_Solar = New System.Windows.Forms.Label()
-        Me.lblUnitstxtEC_EnviromentalTemperature = New System.Windows.Forms.Label()
-        Me.lblUnitstxtEC_Solar = New System.Windows.Forms.Label()
-        Me.grpACSystem = New System.Windows.Forms.GroupBox()
-        Me.cboAC_CompressorType = New System.Windows.Forms.ComboBox()
-        Me.chkAC_InCabinRoomAC_System = New System.Windows.Forms.CheckBox()
-        Me.lblChkAC_InCabinRoomAC_System = New System.Windows.Forms.Label()
-        Me.txtAC_CompressorCapacitykW = New System.Windows.Forms.TextBox()
-        Me.lbltxtAC_CompressorCapacitykW = New System.Windows.Forms.Label()
-        Me.lblUnitstxtAC_CompressorCapacitykW = New System.Windows.Forms.Label()
-        Me.lblcboAC_CompressorType = New System.Windows.Forms.Label()
+        Me.grpAuxHeater = New System.Windows.Forms.GroupBox()
+        Me.txtAH_EngineWasteHeatkW = New System.Windows.Forms.TextBox()
+        Me.lbltxtAH_EngineWasteHeatkW = New System.Windows.Forms.Label()
+        Me.txtAH_FuelFiredHeaterkW = New System.Windows.Forms.TextBox()
+        Me.lbltxtAH_FuelFiredHeaterkW = New System.Windows.Forms.Label()
         Me.grpVentilation = New System.Windows.Forms.GroupBox()
         Me.cboVEN_VentilationDuringCooling = New System.Windows.Forms.ComboBox()
         Me.cboVEN_VentilationDuringHeating = New System.Windows.Forms.ComboBox()
@@ -159,22 +146,76 @@ Partial Class frmHVACTool
         Me.lblchkVEN_VentilationOnDuringHeating = New System.Windows.Forms.Label()
         Me.lblchkVEN_VentilationDuringAC = New System.Windows.Forms.Label()
         Me.lblchkVEN_VentilationWhenBothHeatingAndACInactive = New System.Windows.Forms.Label()
-        Me.grpAuxHeater = New System.Windows.Forms.GroupBox()
-        Me.txtAH_EngineWasteHeatkW = New System.Windows.Forms.TextBox()
-        Me.lbltxtAH_EngineWasteHeatkW = New System.Windows.Forms.Label()
-        Me.txtAH_FuelFiredHeaterkW = New System.Windows.Forms.TextBox()
-        Me.lbltxtAH_FuelFiredHeaterkW = New System.Windows.Forms.Label()
+        Me.grpACSystem = New System.Windows.Forms.GroupBox()
+        Me.cboAC_CompressorType = New System.Windows.Forms.ComboBox()
+        Me.chkAC_InCabinRoomAC_System = New System.Windows.Forms.CheckBox()
+        Me.lblChkAC_InCabinRoomAC_System = New System.Windows.Forms.Label()
+        Me.txtAC_CompressorCapacitykW = New System.Windows.Forms.TextBox()
+        Me.lbltxtAC_CompressorCapacitykW = New System.Windows.Forms.Label()
+        Me.lblUnitstxtAC_CompressorCapacitykW = New System.Windows.Forms.Label()
+        Me.lblcboAC_CompressorType = New System.Windows.Forms.Label()
+        Me.grpEnvironmentConditions = New System.Windows.Forms.GroupBox()
+        Me.txtEC_EnviromentalTemperature = New System.Windows.Forms.TextBox()
+        Me.lbltxtEC_EnviromentalTemperature = New System.Windows.Forms.Label()
+        Me.txtEC_Solar = New System.Windows.Forms.TextBox()
+        Me.lbltxtEC_Solar = New System.Windows.Forms.Label()
+        Me.lblUnitstxtEC_EnviromentalTemperature = New System.Windows.Forms.Label()
+        Me.lblUnitstxtEC_Solar = New System.Windows.Forms.Label()
+        Me.tabTechBenefits = New System.Windows.Forms.TabPage()
+        Me.btnUpdate = New System.Windows.Forms.Button()
+        Me.lblLineType = New System.Windows.Forms.Label()
+        Me.chkActiveVC = New System.Windows.Forms.CheckBox()
+        Me.lblCoolingColumn = New System.Windows.Forms.Label()
+        Me.chkActiveVV = New System.Windows.Forms.CheckBox()
+        Me.txtBenefitName = New System.Windows.Forms.TextBox()
+        Me.chkActiveVH = New System.Windows.Forms.CheckBox()
+        Me.lblBenefitName = New System.Windows.Forms.Label()
+        Me.chkOnVehicle = New System.Windows.Forms.CheckBox()
+        Me.lblVentelationColumn = New System.Windows.Forms.Label()
+        Me.lblHeatingColumn = New System.Windows.Forms.Label()
+        Me.cboLineType = New System.Windows.Forms.ComboBox()
+        Me.pnlRaisedFloorRow = New System.Windows.Forms.Panel()
+        Me.txtRaisedFloorH = New System.Windows.Forms.TextBox()
+        Me.txtRaisedFloorC = New System.Windows.Forms.TextBox()
+        Me.txtRaisedFloorV = New System.Windows.Forms.TextBox()
+        Me.lblRaisedFloorRow = New System.Windows.Forms.Label()
+        Me.pnlSemiLowFloorRow = New System.Windows.Forms.Panel()
+        Me.txtSemiLowFloorH = New System.Windows.Forms.TextBox()
+        Me.txtSemiLowFloorC = New System.Windows.Forms.TextBox()
+        Me.txtSemiLowFloorV = New System.Windows.Forms.TextBox()
+        Me.lblSemiLowFloorRow = New System.Windows.Forms.Label()
+        Me.pnlLowFloorRow = New System.Windows.Forms.Panel()
+        Me.txtLowFloorH = New System.Windows.Forms.TextBox()
+        Me.txtLowFloorC = New System.Windows.Forms.TextBox()
+        Me.txtLowFloorV = New System.Windows.Forms.TextBox()
+        Me.lblLowFloorRow = New System.Windows.Forms.Label()
+        Me.lblCategory = New System.Windows.Forms.Label()
+        Me.cboCategory = New System.Windows.Forms.ComboBox()
+        Me.gvTechBenefitLines = New System.Windows.Forms.DataGridView()
+        Me.lblUnits = New System.Windows.Forms.Label()
+        Me.cboUnits = New System.Windows.Forms.ComboBox()
+        Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
+        Me.ErrorProvider1 = New System.Windows.Forms.ErrorProvider(Me.components)
+        Me.txtIndex = New System.Windows.Forms.TextBox()
+        Me.lblIndex = New System.Windows.Forms.Label()
+        Me.btnSave = New System.Windows.Forms.Button()
+        Me.btnCancel = New System.Windows.Forms.Button()
         Me.tabMain.SuspendLayout
         Me.tabGeneralInputsBP.SuspendLayout
         Me.GroupBox1.SuspendLayout
         Me.tabGeneralInputsBC.SuspendLayout
         Me.GroupBox2.SuspendLayout
-        CType(Me.ErrorProvider1,System.ComponentModel.ISupportInitialize).BeginInit
         Me.tabGeneralInputsOther.SuspendLayout
-        Me.grpEnvironmentConditions.SuspendLayout
-        Me.grpACSystem.SuspendLayout
-        Me.grpVentilation.SuspendLayout
         Me.grpAuxHeater.SuspendLayout
+        Me.grpVentilation.SuspendLayout
+        Me.grpACSystem.SuspendLayout
+        Me.grpEnvironmentConditions.SuspendLayout
+        Me.tabTechBenefits.SuspendLayout
+        Me.pnlRaisedFloorRow.SuspendLayout
+        Me.pnlSemiLowFloorRow.SuspendLayout
+        Me.pnlLowFloorRow.SuspendLayout
+        CType(Me.gvTechBenefitLines,System.ComponentModel.ISupportInitialize).BeginInit
+        CType(Me.ErrorProvider1,System.ComponentModel.ISupportInitialize).BeginInit
         Me.SuspendLayout
         '
         'tabMain
@@ -232,7 +273,7 @@ Partial Class frmHVACTool
         Me.GroupBox1.Controls.Add(Me.lblRegisteredPassengers)
         Me.GroupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Popup
         Me.GroupBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 10!)
-        Me.GroupBox1.ForeColor = System.Drawing.Color.Green
+        Me.GroupBox1.ForeColor = System.Drawing.SystemColors.MenuHighlight
         Me.GroupBox1.Location = New System.Drawing.Point(34, 47)
         Me.GroupBox1.Name = "GroupBox1"
         Me.GroupBox1.Size = New System.Drawing.Size(416, 294)
@@ -576,7 +617,7 @@ Partial Class frmHVACTool
         Me.GroupBox2.Controls.Add(Me.lblSolarClouding)
         Me.GroupBox2.FlatStyle = System.Windows.Forms.FlatStyle.Popup
         Me.GroupBox2.Font = New System.Drawing.Font("Microsoft Sans Serif", 10!)
-        Me.GroupBox2.ForeColor = System.Drawing.Color.Green
+        Me.GroupBox2.ForeColor = System.Drawing.SystemColors.MenuHighlight
         Me.GroupBox2.Location = New System.Drawing.Point(34, 47)
         Me.GroupBox2.Name = "GroupBox2"
         Me.GroupBox2.Size = New System.Drawing.Size(890, 534)
@@ -1328,10 +1369,6 @@ Partial Class frmHVACTool
         Me.lblSolarClouding.TabIndex = 0
         Me.lblSolarClouding.Text = "Solar Clouding"
         '
-        'ErrorProvider1
-        '
-        Me.ErrorProvider1.ContainerControl = Me
-        '
         'tabGeneralInputsOther
         '
         Me.tabGeneralInputsOther.Controls.Add(Me.grpAuxHeater)
@@ -1345,185 +1382,61 @@ Partial Class frmHVACTool
         Me.tabGeneralInputsOther.Text = " INP - Other "
         Me.tabGeneralInputsOther.UseVisualStyleBackColor = true
         '
-        'tabTechBenefits
-        '
-        Me.tabTechBenefits.Location = New System.Drawing.Point(4, 22)
-        Me.tabTechBenefits.Name = "tabTechBenefits"
-        Me.tabTechBenefits.Padding = New System.Windows.Forms.Padding(3)
-        Me.tabTechBenefits.Size = New System.Drawing.Size(937, 617)
-        Me.tabTechBenefits.TabIndex = 5
-        Me.tabTechBenefits.Text = " Tech List Input "
-        Me.tabTechBenefits.UseVisualStyleBackColor = true
-        '
-        'grpEnvironmentConditions
-        '
-        Me.grpEnvironmentConditions.BackColor = System.Drawing.Color.Transparent
-        Me.grpEnvironmentConditions.Controls.Add(Me.txtEC_EnviromentalTemperature)
-        Me.grpEnvironmentConditions.Controls.Add(Me.lbltxtEC_EnviromentalTemperature)
-        Me.grpEnvironmentConditions.Controls.Add(Me.txtEC_Solar)
-        Me.grpEnvironmentConditions.Controls.Add(Me.lbltxtEC_Solar)
-        Me.grpEnvironmentConditions.Controls.Add(Me.lblUnitstxtEC_EnviromentalTemperature)
-        Me.grpEnvironmentConditions.Controls.Add(Me.lblUnitstxtEC_Solar)
-        Me.grpEnvironmentConditions.FlatStyle = System.Windows.Forms.FlatStyle.Popup
-        Me.grpEnvironmentConditions.Font = New System.Drawing.Font("Microsoft Sans Serif", 10!)
-        Me.grpEnvironmentConditions.ForeColor = System.Drawing.Color.Green
-        Me.grpEnvironmentConditions.Location = New System.Drawing.Point(34, 47)
-        Me.grpEnvironmentConditions.Name = "grpEnvironmentConditions"
-        Me.grpEnvironmentConditions.Size = New System.Drawing.Size(409, 96)
-        Me.grpEnvironmentConditions.TabIndex = 29
-        Me.grpEnvironmentConditions.TabStop = false
-        Me.grpEnvironmentConditions.Text = "Environmental Conditions"
-        '
-        'txtEC_EnviromentalTemperature
-        '
-        Me.txtEC_EnviromentalTemperature.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
-        Me.txtEC_EnviromentalTemperature.Location = New System.Drawing.Point(220, 30)
-        Me.txtEC_EnviromentalTemperature.Name = "txtEC_EnviromentalTemperature"
-        Me.txtEC_EnviromentalTemperature.Size = New System.Drawing.Size(97, 21)
-        Me.txtEC_EnviromentalTemperature.TabIndex = 25
-        '
-        'lbltxtEC_EnviromentalTemperature
-        '
-        Me.lbltxtEC_EnviromentalTemperature.AutoSize = true
-        Me.lbltxtEC_EnviromentalTemperature.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
-        Me.lbltxtEC_EnviromentalTemperature.ForeColor = System.Drawing.Color.Black
-        Me.lbltxtEC_EnviromentalTemperature.Location = New System.Drawing.Point(14, 33)
-        Me.lbltxtEC_EnviromentalTemperature.Name = "lbltxtEC_EnviromentalTemperature"
-        Me.lbltxtEC_EnviromentalTemperature.Size = New System.Drawing.Size(153, 15)
-        Me.lbltxtEC_EnviromentalTemperature.TabIndex = 24
-        Me.lbltxtEC_EnviromentalTemperature.Text = "Enviromental Temperature"
-        '
-        'txtEC_Solar
-        '
-        Me.txtEC_Solar.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
-        Me.txtEC_Solar.Location = New System.Drawing.Point(218, 59)
-        Me.txtEC_Solar.Name = "txtEC_Solar"
-        Me.txtEC_Solar.Size = New System.Drawing.Size(97, 21)
-        Me.txtEC_Solar.TabIndex = 1
-        '
-        'lbltxtEC_Solar
-        '
-        Me.lbltxtEC_Solar.AutoSize = true
-        Me.lbltxtEC_Solar.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
-        Me.lbltxtEC_Solar.ForeColor = System.Drawing.Color.Black
-        Me.lbltxtEC_Solar.Location = New System.Drawing.Point(14, 62)
-        Me.lbltxtEC_Solar.Name = "lbltxtEC_Solar"
-        Me.lbltxtEC_Solar.Size = New System.Drawing.Size(36, 15)
-        Me.lbltxtEC_Solar.TabIndex = 0
-        Me.lbltxtEC_Solar.Text = "Solar"
-        '
-        'lblUnitstxtEC_EnviromentalTemperature
-        '
-        Me.lblUnitstxtEC_EnviromentalTemperature.AutoSize = true
-        Me.lblUnitstxtEC_EnviromentalTemperature.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
-        Me.lblUnitstxtEC_EnviromentalTemperature.Location = New System.Drawing.Point(348, 33)
-        Me.lblUnitstxtEC_EnviromentalTemperature.Name = "lblUnitstxtEC_EnviromentalTemperature"
-        Me.lblUnitstxtEC_EnviromentalTemperature.Size = New System.Drawing.Size(22, 15)
-        Me.lblUnitstxtEC_EnviromentalTemperature.TabIndex = 16
-        Me.lblUnitstxtEC_EnviromentalTemperature.Text = "oC"
-        Me.ToolTip1.SetToolTip(Me.lblUnitstxtEC_EnviromentalTemperature, "Degrees Centigrade")
-        '
-        'lblUnitstxtEC_Solar
-        '
-        Me.lblUnitstxtEC_Solar.AutoSize = true
-        Me.lblUnitstxtEC_Solar.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
-        Me.lblUnitstxtEC_Solar.Location = New System.Drawing.Point(348, 59)
-        Me.lblUnitstxtEC_Solar.Name = "lblUnitstxtEC_Solar"
-        Me.lblUnitstxtEC_Solar.Size = New System.Drawing.Size(45, 15)
-        Me.lblUnitstxtEC_Solar.TabIndex = 26
-        Me.lblUnitstxtEC_Solar.Text = "W/m^3"
-        Me.ToolTip1.SetToolTip(Me.lblUnitstxtEC_Solar, "Watts/Metre Cubed")
-        '
-        'grpACSystem
-        '
-        Me.grpACSystem.BackColor = System.Drawing.Color.Transparent
-        Me.grpACSystem.Controls.Add(Me.cboAC_CompressorType)
-        Me.grpACSystem.Controls.Add(Me.chkAC_InCabinRoomAC_System)
-        Me.grpACSystem.Controls.Add(Me.lblChkAC_InCabinRoomAC_System)
-        Me.grpACSystem.Controls.Add(Me.txtAC_CompressorCapacitykW)
-        Me.grpACSystem.Controls.Add(Me.lbltxtAC_CompressorCapacitykW)
-        Me.grpACSystem.Controls.Add(Me.lblUnitstxtAC_CompressorCapacitykW)
-        Me.grpACSystem.Controls.Add(Me.lblcboAC_CompressorType)
-        Me.grpACSystem.FlatStyle = System.Windows.Forms.FlatStyle.Popup
-        Me.grpACSystem.Font = New System.Drawing.Font("Microsoft Sans Serif", 10!)
-        Me.grpACSystem.ForeColor = System.Drawing.Color.Green
-        Me.grpACSystem.Location = New System.Drawing.Point(34, 149)
-        Me.grpACSystem.Name = "grpACSystem"
-        Me.grpACSystem.Size = New System.Drawing.Size(409, 135)
-        Me.grpACSystem.TabIndex = 30
-        Me.grpACSystem.TabStop = false
-        Me.grpACSystem.Text = "AC-System"
-        '
-        'cboAC_CompressorType
-        '
-        Me.cboAC_CompressorType.FormattingEnabled = true
-        Me.cboAC_CompressorType.Items.AddRange(New Object() {"Mechanical", "Electrical"})
-        Me.cboAC_CompressorType.Location = New System.Drawing.Point(217, 62)
-        Me.cboAC_CompressorType.Name = "cboAC_CompressorType"
-        Me.cboAC_CompressorType.Size = New System.Drawing.Size(100, 24)
-        Me.cboAC_CompressorType.TabIndex = 26
-        '
-        'chkAC_InCabinRoomAC_System
-        '
-        Me.chkAC_InCabinRoomAC_System.AutoSize = true
-        Me.chkAC_InCabinRoomAC_System.Location = New System.Drawing.Point(220, 33)
-        Me.chkAC_InCabinRoomAC_System.Name = "chkAC_InCabinRoomAC_System"
-        Me.chkAC_InCabinRoomAC_System.Size = New System.Drawing.Size(31, 21)
-        Me.chkAC_InCabinRoomAC_System.TabIndex = 25
-        Me.chkAC_InCabinRoomAC_System.Text = " "
-        Me.chkAC_InCabinRoomAC_System.UseVisualStyleBackColor = true
-        '
-        'lblChkAC_InCabinRoomAC_System
+        'grpAuxHeater
         '
-        Me.lblChkAC_InCabinRoomAC_System.AutoSize = true
-        Me.lblChkAC_InCabinRoomAC_System.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
-        Me.lblChkAC_InCabinRoomAC_System.ForeColor = System.Drawing.Color.Black
-        Me.lblChkAC_InCabinRoomAC_System.Location = New System.Drawing.Point(14, 33)
-        Me.lblChkAC_InCabinRoomAC_System.Name = "lblChkAC_InCabinRoomAC_System"
-        Me.lblChkAC_InCabinRoomAC_System.Size = New System.Drawing.Size(154, 15)
-        Me.lblChkAC_InCabinRoomAC_System.TabIndex = 24
-        Me.lblChkAC_InCabinRoomAC_System.Text = "In Cabin Room AC_System"
+        Me.grpAuxHeater.BackColor = System.Drawing.Color.Transparent
+        Me.grpAuxHeater.Controls.Add(Me.txtAH_EngineWasteHeatkW)
+        Me.grpAuxHeater.Controls.Add(Me.lbltxtAH_EngineWasteHeatkW)
+        Me.grpAuxHeater.Controls.Add(Me.txtAH_FuelFiredHeaterkW)
+        Me.grpAuxHeater.Controls.Add(Me.lbltxtAH_FuelFiredHeaterkW)
+        Me.grpAuxHeater.FlatStyle = System.Windows.Forms.FlatStyle.Popup
+        Me.grpAuxHeater.Font = New System.Drawing.Font("Microsoft Sans Serif", 10!)
+        Me.grpAuxHeater.ForeColor = System.Drawing.SystemColors.MenuHighlight
+        Me.grpAuxHeater.Location = New System.Drawing.Point(34, 512)
+        Me.grpAuxHeater.Name = "grpAuxHeater"
+        Me.grpAuxHeater.Size = New System.Drawing.Size(409, 96)
+        Me.grpAuxHeater.TabIndex = 32
+        Me.grpAuxHeater.TabStop = false
+        Me.grpAuxHeater.Text = "Aux Heater"
         '
-        'txtAC_CompressorCapacitykW
+        'txtAH_EngineWasteHeatkW
         '
-        Me.txtAC_CompressorCapacitykW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
-        Me.txtAC_CompressorCapacitykW.Location = New System.Drawing.Point(218, 92)
-        Me.txtAC_CompressorCapacitykW.Name = "txtAC_CompressorCapacitykW"
-        Me.txtAC_CompressorCapacitykW.Size = New System.Drawing.Size(99, 21)
-        Me.txtAC_CompressorCapacitykW.TabIndex = 23
+        Me.txtAH_EngineWasteHeatkW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
+        Me.txtAH_EngineWasteHeatkW.Location = New System.Drawing.Point(220, 30)
+        Me.txtAH_EngineWasteHeatkW.Name = "txtAH_EngineWasteHeatkW"
+        Me.txtAH_EngineWasteHeatkW.Size = New System.Drawing.Size(97, 21)
+        Me.txtAH_EngineWasteHeatkW.TabIndex = 25
         '
-        'lbltxtAC_CompressorCapacitykW
+        'lbltxtAH_EngineWasteHeatkW
         '
-        Me.lbltxtAC_CompressorCapacitykW.AutoSize = true
-        Me.lbltxtAC_CompressorCapacitykW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
-        Me.lbltxtAC_CompressorCapacitykW.ForeColor = System.Drawing.Color.Black
-        Me.lbltxtAC_CompressorCapacitykW.Location = New System.Drawing.Point(14, 91)
-        Me.lbltxtAC_CompressorCapacitykW.Name = "lbltxtAC_CompressorCapacitykW"
-        Me.lbltxtAC_CompressorCapacitykW.Size = New System.Drawing.Size(140, 15)
-        Me.lbltxtAC_CompressorCapacitykW.TabIndex = 22
-        Me.lbltxtAC_CompressorCapacitykW.Text = "AC-Compressor capacity"
+        Me.lbltxtAH_EngineWasteHeatkW.AutoSize = true
+        Me.lbltxtAH_EngineWasteHeatkW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
+        Me.lbltxtAH_EngineWasteHeatkW.ForeColor = System.Drawing.Color.Black
+        Me.lbltxtAH_EngineWasteHeatkW.Location = New System.Drawing.Point(14, 33)
+        Me.lbltxtAH_EngineWasteHeatkW.Name = "lbltxtAH_EngineWasteHeatkW"
+        Me.lbltxtAH_EngineWasteHeatkW.Size = New System.Drawing.Size(112, 15)
+        Me.lbltxtAH_EngineWasteHeatkW.TabIndex = 24
+        Me.lbltxtAH_EngineWasteHeatkW.Text = "Engine Waste Heat"
         '
-        'lblUnitstxtAC_CompressorCapacitykW
+        'txtAH_FuelFiredHeaterkW
         '
-        Me.lblUnitstxtAC_CompressorCapacitykW.AutoSize = true
-        Me.lblUnitstxtAC_CompressorCapacitykW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
-        Me.lblUnitstxtAC_CompressorCapacitykW.Location = New System.Drawing.Point(352, 99)
-        Me.lblUnitstxtAC_CompressorCapacitykW.Name = "lblUnitstxtAC_CompressorCapacitykW"
-        Me.lblUnitstxtAC_CompressorCapacitykW.Size = New System.Drawing.Size(24, 15)
-        Me.lblUnitstxtAC_CompressorCapacitykW.TabIndex = 16
-        Me.lblUnitstxtAC_CompressorCapacitykW.Text = "Kw"
-        Me.ToolTip1.SetToolTip(Me.lblUnitstxtAC_CompressorCapacitykW, "Kilo Watts")
+        Me.txtAH_FuelFiredHeaterkW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
+        Me.txtAH_FuelFiredHeaterkW.Location = New System.Drawing.Point(218, 59)
+        Me.txtAH_FuelFiredHeaterkW.Name = "txtAH_FuelFiredHeaterkW"
+        Me.txtAH_FuelFiredHeaterkW.ReadOnly = true
+        Me.txtAH_FuelFiredHeaterkW.Size = New System.Drawing.Size(97, 21)
+        Me.txtAH_FuelFiredHeaterkW.TabIndex = 1
         '
-        'lblcboAC_CompressorType
+        'lbltxtAH_FuelFiredHeaterkW
         '
-        Me.lblcboAC_CompressorType.AutoSize = true
-        Me.lblcboAC_CompressorType.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
-        Me.lblcboAC_CompressorType.ForeColor = System.Drawing.Color.Black
-        Me.lblcboAC_CompressorType.Location = New System.Drawing.Point(14, 62)
-        Me.lblcboAC_CompressorType.Name = "lblcboAC_CompressorType"
-        Me.lblcboAC_CompressorType.Size = New System.Drawing.Size(122, 15)
-        Me.lblcboAC_CompressorType.TabIndex = 0
-        Me.lblcboAC_CompressorType.Text = "AC-Compressor Type"
+        Me.lbltxtAH_FuelFiredHeaterkW.AutoSize = true
+        Me.lbltxtAH_FuelFiredHeaterkW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
+        Me.lbltxtAH_FuelFiredHeaterkW.ForeColor = System.Drawing.Color.Black
+        Me.lbltxtAH_FuelFiredHeaterkW.Location = New System.Drawing.Point(14, 62)
+        Me.lbltxtAH_FuelFiredHeaterkW.Name = "lbltxtAH_FuelFiredHeaterkW"
+        Me.lbltxtAH_FuelFiredHeaterkW.Size = New System.Drawing.Size(102, 15)
+        Me.lbltxtAH_FuelFiredHeaterkW.TabIndex = 0
+        Me.lbltxtAH_FuelFiredHeaterkW.Text = "Fuel Fired Heater"
         '
         'grpVentilation
         '
@@ -1542,7 +1455,7 @@ Partial Class frmHVACTool
         Me.grpVentilation.Controls.Add(Me.lblchkVEN_VentilationWhenBothHeatingAndACInactive)
         Me.grpVentilation.FlatStyle = System.Windows.Forms.FlatStyle.Popup
         Me.grpVentilation.Font = New System.Drawing.Font("Microsoft Sans Serif", 10!)
-        Me.grpVentilation.ForeColor = System.Drawing.Color.Green
+        Me.grpVentilation.ForeColor = System.Drawing.SystemColors.MenuHighlight
         Me.grpVentilation.Location = New System.Drawing.Point(34, 290)
         Me.grpVentilation.Name = "grpVentilation"
         Me.grpVentilation.Size = New System.Drawing.Size(409, 216)
@@ -1673,67 +1586,545 @@ Partial Class frmHVACTool
         Me.lblchkVEN_VentilationWhenBothHeatingAndACInactive.TabIndex = 0
         Me.lblchkVEN_VentilationWhenBothHeatingAndACInactive.Text = "Ventilation When Both Heating And ACInactive"
         '
-        'grpAuxHeater
+        'grpACSystem
         '
-        Me.grpAuxHeater.BackColor = System.Drawing.Color.Transparent
-        Me.grpAuxHeater.Controls.Add(Me.txtAH_EngineWasteHeatkW)
-        Me.grpAuxHeater.Controls.Add(Me.lbltxtAH_EngineWasteHeatkW)
-        Me.grpAuxHeater.Controls.Add(Me.txtAH_FuelFiredHeaterkW)
-        Me.grpAuxHeater.Controls.Add(Me.lbltxtAH_FuelFiredHeaterkW)
-        Me.grpAuxHeater.FlatStyle = System.Windows.Forms.FlatStyle.Popup
-        Me.grpAuxHeater.Font = New System.Drawing.Font("Microsoft Sans Serif", 10!)
-        Me.grpAuxHeater.ForeColor = System.Drawing.Color.Green
-        Me.grpAuxHeater.Location = New System.Drawing.Point(34, 512)
-        Me.grpAuxHeater.Name = "grpAuxHeater"
-        Me.grpAuxHeater.Size = New System.Drawing.Size(409, 96)
-        Me.grpAuxHeater.TabIndex = 32
-        Me.grpAuxHeater.TabStop = false
-        Me.grpAuxHeater.Text = "Aux Heater"
+        Me.grpACSystem.BackColor = System.Drawing.Color.Transparent
+        Me.grpACSystem.Controls.Add(Me.cboAC_CompressorType)
+        Me.grpACSystem.Controls.Add(Me.chkAC_InCabinRoomAC_System)
+        Me.grpACSystem.Controls.Add(Me.lblChkAC_InCabinRoomAC_System)
+        Me.grpACSystem.Controls.Add(Me.txtAC_CompressorCapacitykW)
+        Me.grpACSystem.Controls.Add(Me.lbltxtAC_CompressorCapacitykW)
+        Me.grpACSystem.Controls.Add(Me.lblUnitstxtAC_CompressorCapacitykW)
+        Me.grpACSystem.Controls.Add(Me.lblcboAC_CompressorType)
+        Me.grpACSystem.FlatStyle = System.Windows.Forms.FlatStyle.Popup
+        Me.grpACSystem.Font = New System.Drawing.Font("Microsoft Sans Serif", 10!)
+        Me.grpACSystem.ForeColor = System.Drawing.SystemColors.MenuHighlight
+        Me.grpACSystem.Location = New System.Drawing.Point(34, 149)
+        Me.grpACSystem.Name = "grpACSystem"
+        Me.grpACSystem.Size = New System.Drawing.Size(409, 135)
+        Me.grpACSystem.TabIndex = 30
+        Me.grpACSystem.TabStop = false
+        Me.grpACSystem.Text = "AC-System"
         '
-        'txtAH_EngineWasteHeatkW
+        'cboAC_CompressorType
         '
-        Me.txtAH_EngineWasteHeatkW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
-        Me.txtAH_EngineWasteHeatkW.Location = New System.Drawing.Point(220, 30)
-        Me.txtAH_EngineWasteHeatkW.Name = "txtAH_EngineWasteHeatkW"
-        Me.txtAH_EngineWasteHeatkW.Size = New System.Drawing.Size(97, 21)
-        Me.txtAH_EngineWasteHeatkW.TabIndex = 25
+        Me.cboAC_CompressorType.FormattingEnabled = true
+        Me.cboAC_CompressorType.Items.AddRange(New Object() {"Mechanical", "Electrical"})
+        Me.cboAC_CompressorType.Location = New System.Drawing.Point(217, 62)
+        Me.cboAC_CompressorType.Name = "cboAC_CompressorType"
+        Me.cboAC_CompressorType.Size = New System.Drawing.Size(100, 24)
+        Me.cboAC_CompressorType.TabIndex = 26
         '
-        'lbltxtAH_EngineWasteHeatkW
+        'chkAC_InCabinRoomAC_System
         '
-        Me.lbltxtAH_EngineWasteHeatkW.AutoSize = true
-        Me.lbltxtAH_EngineWasteHeatkW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
-        Me.lbltxtAH_EngineWasteHeatkW.ForeColor = System.Drawing.Color.Black
-        Me.lbltxtAH_EngineWasteHeatkW.Location = New System.Drawing.Point(14, 33)
-        Me.lbltxtAH_EngineWasteHeatkW.Name = "lbltxtAH_EngineWasteHeatkW"
-        Me.lbltxtAH_EngineWasteHeatkW.Size = New System.Drawing.Size(112, 15)
-        Me.lbltxtAH_EngineWasteHeatkW.TabIndex = 24
-        Me.lbltxtAH_EngineWasteHeatkW.Text = "Engine Waste Heat"
+        Me.chkAC_InCabinRoomAC_System.AutoSize = true
+        Me.chkAC_InCabinRoomAC_System.Location = New System.Drawing.Point(220, 33)
+        Me.chkAC_InCabinRoomAC_System.Name = "chkAC_InCabinRoomAC_System"
+        Me.chkAC_InCabinRoomAC_System.Size = New System.Drawing.Size(31, 21)
+        Me.chkAC_InCabinRoomAC_System.TabIndex = 25
+        Me.chkAC_InCabinRoomAC_System.Text = " "
+        Me.chkAC_InCabinRoomAC_System.UseVisualStyleBackColor = true
         '
-        'txtAH_FuelFiredHeaterkW
+        'lblChkAC_InCabinRoomAC_System
         '
-        Me.txtAH_FuelFiredHeaterkW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
-        Me.txtAH_FuelFiredHeaterkW.Location = New System.Drawing.Point(218, 59)
-        Me.txtAH_FuelFiredHeaterkW.Name = "txtAH_FuelFiredHeaterkW"
-        Me.txtAH_FuelFiredHeaterkW.ReadOnly = true
-        Me.txtAH_FuelFiredHeaterkW.Size = New System.Drawing.Size(97, 21)
-        Me.txtAH_FuelFiredHeaterkW.TabIndex = 1
+        Me.lblChkAC_InCabinRoomAC_System.AutoSize = true
+        Me.lblChkAC_InCabinRoomAC_System.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
+        Me.lblChkAC_InCabinRoomAC_System.ForeColor = System.Drawing.Color.Black
+        Me.lblChkAC_InCabinRoomAC_System.Location = New System.Drawing.Point(14, 33)
+        Me.lblChkAC_InCabinRoomAC_System.Name = "lblChkAC_InCabinRoomAC_System"
+        Me.lblChkAC_InCabinRoomAC_System.Size = New System.Drawing.Size(154, 15)
+        Me.lblChkAC_InCabinRoomAC_System.TabIndex = 24
+        Me.lblChkAC_InCabinRoomAC_System.Text = "In Cabin Room AC_System"
         '
-        'lbltxtAH_FuelFiredHeaterkW
+        'txtAC_CompressorCapacitykW
         '
-        Me.lbltxtAH_FuelFiredHeaterkW.AutoSize = true
-        Me.lbltxtAH_FuelFiredHeaterkW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
-        Me.lbltxtAH_FuelFiredHeaterkW.ForeColor = System.Drawing.Color.Black
-        Me.lbltxtAH_FuelFiredHeaterkW.Location = New System.Drawing.Point(14, 62)
-        Me.lbltxtAH_FuelFiredHeaterkW.Name = "lbltxtAH_FuelFiredHeaterkW"
-        Me.lbltxtAH_FuelFiredHeaterkW.Size = New System.Drawing.Size(102, 15)
-        Me.lbltxtAH_FuelFiredHeaterkW.TabIndex = 0
-        Me.lbltxtAH_FuelFiredHeaterkW.Text = "Fuel Fired Heater"
+        Me.txtAC_CompressorCapacitykW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
+        Me.txtAC_CompressorCapacitykW.Location = New System.Drawing.Point(218, 92)
+        Me.txtAC_CompressorCapacitykW.Name = "txtAC_CompressorCapacitykW"
+        Me.txtAC_CompressorCapacitykW.Size = New System.Drawing.Size(99, 21)
+        Me.txtAC_CompressorCapacitykW.TabIndex = 23
+        '
+        'lbltxtAC_CompressorCapacitykW
+        '
+        Me.lbltxtAC_CompressorCapacitykW.AutoSize = true
+        Me.lbltxtAC_CompressorCapacitykW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
+        Me.lbltxtAC_CompressorCapacitykW.ForeColor = System.Drawing.Color.Black
+        Me.lbltxtAC_CompressorCapacitykW.Location = New System.Drawing.Point(14, 91)
+        Me.lbltxtAC_CompressorCapacitykW.Name = "lbltxtAC_CompressorCapacitykW"
+        Me.lbltxtAC_CompressorCapacitykW.Size = New System.Drawing.Size(140, 15)
+        Me.lbltxtAC_CompressorCapacitykW.TabIndex = 22
+        Me.lbltxtAC_CompressorCapacitykW.Text = "AC-Compressor capacity"
+        '
+        'lblUnitstxtAC_CompressorCapacitykW
+        '
+        Me.lblUnitstxtAC_CompressorCapacitykW.AutoSize = true
+        Me.lblUnitstxtAC_CompressorCapacitykW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
+        Me.lblUnitstxtAC_CompressorCapacitykW.Location = New System.Drawing.Point(352, 99)
+        Me.lblUnitstxtAC_CompressorCapacitykW.Name = "lblUnitstxtAC_CompressorCapacitykW"
+        Me.lblUnitstxtAC_CompressorCapacitykW.Size = New System.Drawing.Size(24, 15)
+        Me.lblUnitstxtAC_CompressorCapacitykW.TabIndex = 16
+        Me.lblUnitstxtAC_CompressorCapacitykW.Text = "Kw"
+        Me.ToolTip1.SetToolTip(Me.lblUnitstxtAC_CompressorCapacitykW, "Kilo Watts")
+        '
+        'lblcboAC_CompressorType
+        '
+        Me.lblcboAC_CompressorType.AutoSize = true
+        Me.lblcboAC_CompressorType.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
+        Me.lblcboAC_CompressorType.ForeColor = System.Drawing.Color.Black
+        Me.lblcboAC_CompressorType.Location = New System.Drawing.Point(14, 62)
+        Me.lblcboAC_CompressorType.Name = "lblcboAC_CompressorType"
+        Me.lblcboAC_CompressorType.Size = New System.Drawing.Size(122, 15)
+        Me.lblcboAC_CompressorType.TabIndex = 0
+        Me.lblcboAC_CompressorType.Text = "AC-Compressor Type"
+        '
+        'grpEnvironmentConditions
+        '
+        Me.grpEnvironmentConditions.BackColor = System.Drawing.Color.Transparent
+        Me.grpEnvironmentConditions.Controls.Add(Me.txtEC_EnviromentalTemperature)
+        Me.grpEnvironmentConditions.Controls.Add(Me.lbltxtEC_EnviromentalTemperature)
+        Me.grpEnvironmentConditions.Controls.Add(Me.txtEC_Solar)
+        Me.grpEnvironmentConditions.Controls.Add(Me.lbltxtEC_Solar)
+        Me.grpEnvironmentConditions.Controls.Add(Me.lblUnitstxtEC_EnviromentalTemperature)
+        Me.grpEnvironmentConditions.Controls.Add(Me.lblUnitstxtEC_Solar)
+        Me.grpEnvironmentConditions.FlatStyle = System.Windows.Forms.FlatStyle.Popup
+        Me.grpEnvironmentConditions.Font = New System.Drawing.Font("Microsoft Sans Serif", 10!)
+        Me.grpEnvironmentConditions.ForeColor = System.Drawing.SystemColors.MenuHighlight
+        Me.grpEnvironmentConditions.Location = New System.Drawing.Point(34, 47)
+        Me.grpEnvironmentConditions.Name = "grpEnvironmentConditions"
+        Me.grpEnvironmentConditions.Size = New System.Drawing.Size(409, 96)
+        Me.grpEnvironmentConditions.TabIndex = 29
+        Me.grpEnvironmentConditions.TabStop = false
+        Me.grpEnvironmentConditions.Text = "Environmental Conditions"
+        '
+        'txtEC_EnviromentalTemperature
+        '
+        Me.txtEC_EnviromentalTemperature.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
+        Me.txtEC_EnviromentalTemperature.Location = New System.Drawing.Point(220, 30)
+        Me.txtEC_EnviromentalTemperature.Name = "txtEC_EnviromentalTemperature"
+        Me.txtEC_EnviromentalTemperature.Size = New System.Drawing.Size(97, 21)
+        Me.txtEC_EnviromentalTemperature.TabIndex = 25
+        '
+        'lbltxtEC_EnviromentalTemperature
+        '
+        Me.lbltxtEC_EnviromentalTemperature.AutoSize = true
+        Me.lbltxtEC_EnviromentalTemperature.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
+        Me.lbltxtEC_EnviromentalTemperature.ForeColor = System.Drawing.Color.Black
+        Me.lbltxtEC_EnviromentalTemperature.Location = New System.Drawing.Point(14, 33)
+        Me.lbltxtEC_EnviromentalTemperature.Name = "lbltxtEC_EnviromentalTemperature"
+        Me.lbltxtEC_EnviromentalTemperature.Size = New System.Drawing.Size(153, 15)
+        Me.lbltxtEC_EnviromentalTemperature.TabIndex = 24
+        Me.lbltxtEC_EnviromentalTemperature.Text = "Enviromental Temperature"
+        '
+        'txtEC_Solar
+        '
+        Me.txtEC_Solar.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
+        Me.txtEC_Solar.Location = New System.Drawing.Point(218, 59)
+        Me.txtEC_Solar.Name = "txtEC_Solar"
+        Me.txtEC_Solar.Size = New System.Drawing.Size(97, 21)
+        Me.txtEC_Solar.TabIndex = 1
+        '
+        'lbltxtEC_Solar
+        '
+        Me.lbltxtEC_Solar.AutoSize = true
+        Me.lbltxtEC_Solar.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!)
+        Me.lbltxtEC_Solar.ForeColor = System.Drawing.Color.Black
+        Me.lbltxtEC_Solar.Location = New System.Drawing.Point(14, 62)
+        Me.lbltxtEC_Solar.Name = "lbltxtEC_Solar"
+        Me.lbltxtEC_Solar.Size = New System.Drawing.Size(36, 15)
+        Me.lbltxtEC_Solar.TabIndex = 0
+        Me.lbltxtEC_Solar.Text = "Solar"
+        '
+        'lblUnitstxtEC_EnviromentalTemperature
+        '
+        Me.lblUnitstxtEC_EnviromentalTemperature.AutoSize = true
+        Me.lblUnitstxtEC_EnviromentalTemperature.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
+        Me.lblUnitstxtEC_EnviromentalTemperature.Location = New System.Drawing.Point(348, 33)
+        Me.lblUnitstxtEC_EnviromentalTemperature.Name = "lblUnitstxtEC_EnviromentalTemperature"
+        Me.lblUnitstxtEC_EnviromentalTemperature.Size = New System.Drawing.Size(22, 15)
+        Me.lblUnitstxtEC_EnviromentalTemperature.TabIndex = 16
+        Me.lblUnitstxtEC_EnviromentalTemperature.Text = "oC"
+        Me.ToolTip1.SetToolTip(Me.lblUnitstxtEC_EnviromentalTemperature, "Degrees Centigrade")
+        '
+        'lblUnitstxtEC_Solar
+        '
+        Me.lblUnitstxtEC_Solar.AutoSize = true
+        Me.lblUnitstxtEC_Solar.Font = New System.Drawing.Font("Microsoft Sans Serif", 9!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
+        Me.lblUnitstxtEC_Solar.Location = New System.Drawing.Point(348, 59)
+        Me.lblUnitstxtEC_Solar.Name = "lblUnitstxtEC_Solar"
+        Me.lblUnitstxtEC_Solar.Size = New System.Drawing.Size(45, 15)
+        Me.lblUnitstxtEC_Solar.TabIndex = 26
+        Me.lblUnitstxtEC_Solar.Text = "W/m^3"
+        Me.ToolTip1.SetToolTip(Me.lblUnitstxtEC_Solar, "Watts/Metre Cubed")
+        '
+        'tabTechBenefits
+        '
+        Me.tabTechBenefits.CausesValidation = false
+        Me.tabTechBenefits.Controls.Add(Me.lblIndex)
+        Me.tabTechBenefits.Controls.Add(Me.txtIndex)
+        Me.tabTechBenefits.Controls.Add(Me.btnUpdate)
+        Me.tabTechBenefits.Controls.Add(Me.lblLineType)
+        Me.tabTechBenefits.Controls.Add(Me.chkActiveVC)
+        Me.tabTechBenefits.Controls.Add(Me.lblCoolingColumn)
+        Me.tabTechBenefits.Controls.Add(Me.chkActiveVV)
+        Me.tabTechBenefits.Controls.Add(Me.txtBenefitName)
+        Me.tabTechBenefits.Controls.Add(Me.chkActiveVH)
+        Me.tabTechBenefits.Controls.Add(Me.lblBenefitName)
+        Me.tabTechBenefits.Controls.Add(Me.chkOnVehicle)
+        Me.tabTechBenefits.Controls.Add(Me.lblVentelationColumn)
+        Me.tabTechBenefits.Controls.Add(Me.lblHeatingColumn)
+        Me.tabTechBenefits.Controls.Add(Me.cboLineType)
+        Me.tabTechBenefits.Controls.Add(Me.pnlRaisedFloorRow)
+        Me.tabTechBenefits.Controls.Add(Me.pnlSemiLowFloorRow)
+        Me.tabTechBenefits.Controls.Add(Me.pnlLowFloorRow)
+        Me.tabTechBenefits.Controls.Add(Me.lblCategory)
+        Me.tabTechBenefits.Controls.Add(Me.cboCategory)
+        Me.tabTechBenefits.Controls.Add(Me.gvTechBenefitLines)
+        Me.tabTechBenefits.Controls.Add(Me.lblUnits)
+        Me.tabTechBenefits.Controls.Add(Me.cboUnits)
+        Me.tabTechBenefits.Location = New System.Drawing.Point(4, 22)
+        Me.tabTechBenefits.Name = "tabTechBenefits"
+        Me.tabTechBenefits.Padding = New System.Windows.Forms.Padding(3)
+        Me.tabTechBenefits.Size = New System.Drawing.Size(937, 617)
+        Me.tabTechBenefits.TabIndex = 5
+        Me.tabTechBenefits.Text = " Tech List Input "
+        Me.tabTechBenefits.UseVisualStyleBackColor = true
+        '
+        'btnUpdate
+        '
+        Me.btnUpdate.Location = New System.Drawing.Point(814, 18)
+        Me.btnUpdate.Name = "btnUpdate"
+        Me.btnUpdate.Size = New System.Drawing.Size(75, 23)
+        Me.btnUpdate.TabIndex = 25
+        Me.btnUpdate.Text = "Update/Add"
+        Me.btnUpdate.UseVisualStyleBackColor = true
+        '
+        'lblLineType
+        '
+        Me.lblLineType.AutoSize = true
+        Me.lblLineType.Location = New System.Drawing.Point(415, 74)
+        Me.lblLineType.Name = "lblLineType"
+        Me.lblLineType.Size = New System.Drawing.Size(51, 13)
+        Me.lblLineType.TabIndex = 31
+        Me.lblLineType.Text = "LineType"
+        '
+        'chkActiveVC
+        '
+        Me.chkActiveVC.AutoSize = true
+        Me.chkActiveVC.Location = New System.Drawing.Point(490, 173)
+        Me.chkActiveVC.Name = "chkActiveVC"
+        Me.chkActiveVC.Size = New System.Drawing.Size(73, 17)
+        Me.chkActiveVC.TabIndex = 16
+        Me.chkActiveVC.Text = "Active VC"
+        Me.chkActiveVC.UseVisualStyleBackColor = true
+        '
+        'lblCoolingColumn
+        '
+        Me.lblCoolingColumn.AutoSize = true
+        Me.lblCoolingColumn.Location = New System.Drawing.Point(316, 100)
+        Me.lblCoolingColumn.Name = "lblCoolingColumn"
+        Me.lblCoolingColumn.Size = New System.Drawing.Size(42, 13)
+        Me.lblCoolingColumn.TabIndex = 30
+        Me.lblCoolingColumn.Text = "Cooling"
+        '
+        'chkActiveVV
+        '
+        Me.chkActiveVV.AutoSize = true
+        Me.chkActiveVV.Location = New System.Drawing.Point(490, 145)
+        Me.chkActiveVV.Name = "chkActiveVV"
+        Me.chkActiveVV.Size = New System.Drawing.Size(73, 17)
+        Me.chkActiveVV.TabIndex = 15
+        Me.chkActiveVV.Text = "Active VV"
+        Me.chkActiveVV.UseVisualStyleBackColor = true
+        '
+        'txtBenefitName
+        '
+        Me.txtBenefitName.Location = New System.Drawing.Point(488, 41)
+        Me.txtBenefitName.Name = "txtBenefitName"
+        Me.txtBenefitName.Size = New System.Drawing.Size(270, 20)
+        Me.txtBenefitName.TabIndex = 2
+        '
+        'chkActiveVH
+        '
+        Me.chkActiveVH.AutoSize = true
+        Me.chkActiveVH.Location = New System.Drawing.Point(490, 117)
+        Me.chkActiveVH.Name = "chkActiveVH"
+        Me.chkActiveVH.Size = New System.Drawing.Size(74, 17)
+        Me.chkActiveVH.TabIndex = 14
+        Me.chkActiveVH.Text = "Active VH"
+        Me.chkActiveVH.UseVisualStyleBackColor = true
+        '
+        'lblBenefitName
+        '
+        Me.lblBenefitName.AutoSize = true
+        Me.lblBenefitName.Location = New System.Drawing.Point(411, 44)
+        Me.lblBenefitName.Name = "lblBenefitName"
+        Me.lblBenefitName.Size = New System.Drawing.Size(71, 13)
+        Me.lblBenefitName.TabIndex = 18
+        Me.lblBenefitName.Text = "Benefit Name"
+        '
+        'chkOnVehicle
+        '
+        Me.chkOnVehicle.AutoSize = true
+        Me.chkOnVehicle.Location = New System.Drawing.Point(490, 202)
+        Me.chkOnVehicle.Name = "chkOnVehicle"
+        Me.chkOnVehicle.Size = New System.Drawing.Size(78, 17)
+        Me.chkOnVehicle.TabIndex = 17
+        Me.chkOnVehicle.Text = "On Vehicle"
+        Me.chkOnVehicle.UseVisualStyleBackColor = true
+        '
+        'lblVentelationColumn
+        '
+        Me.lblVentelationColumn.AutoSize = true
+        Me.lblVentelationColumn.Location = New System.Drawing.Point(215, 100)
+        Me.lblVentelationColumn.Name = "lblVentelationColumn"
+        Me.lblVentelationColumn.Size = New System.Drawing.Size(56, 13)
+        Me.lblVentelationColumn.TabIndex = 29
+        Me.lblVentelationColumn.Text = "Ventilation"
+        '
+        'lblHeatingColumn
+        '
+        Me.lblHeatingColumn.AutoSize = true
+        Me.lblHeatingColumn.Location = New System.Drawing.Point(122, 100)
+        Me.lblHeatingColumn.Name = "lblHeatingColumn"
+        Me.lblHeatingColumn.Size = New System.Drawing.Size(44, 13)
+        Me.lblHeatingColumn.TabIndex = 28
+        Me.lblHeatingColumn.Text = "Heating"
+        '
+        'cboLineType
+        '
+        Me.cboLineType.AutoCompleteCustomSource.AddRange(New String() {"Normal", "Active Ventelation"})
+        Me.cboLineType.FormattingEnabled = true
+        Me.cboLineType.Items.AddRange(New Object() {"Normal", "ActiveVentilation"})
+        Me.cboLineType.Location = New System.Drawing.Point(488, 71)
+        Me.cboLineType.Name = "cboLineType"
+        Me.cboLineType.Size = New System.Drawing.Size(270, 21)
+        Me.cboLineType.TabIndex = 4
+        '
+        'pnlRaisedFloorRow
+        '
+        Me.pnlRaisedFloorRow.BackColor = System.Drawing.Color.Lavender
+        Me.pnlRaisedFloorRow.Controls.Add(Me.txtRaisedFloorH)
+        Me.pnlRaisedFloorRow.Controls.Add(Me.txtRaisedFloorC)
+        Me.pnlRaisedFloorRow.Controls.Add(Me.txtRaisedFloorV)
+        Me.pnlRaisedFloorRow.Controls.Add(Me.lblRaisedFloorRow)
+        Me.pnlRaisedFloorRow.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+        Me.pnlRaisedFloorRow.ForeColor = System.Drawing.Color.Black
+        Me.pnlRaisedFloorRow.Location = New System.Drawing.Point(26, 193)
+        Me.pnlRaisedFloorRow.Name = "pnlRaisedFloorRow"
+        Me.pnlRaisedFloorRow.Size = New System.Drawing.Size(379, 33)
+        Me.pnlRaisedFloorRow.TabIndex = 9
+        '
+        'txtRaisedFloorH
+        '
+        Me.txtRaisedFloorH.Location = New System.Drawing.Point(84, 6)
+        Me.txtRaisedFloorH.Name = "txtRaisedFloorH"
+        Me.txtRaisedFloorH.Size = New System.Drawing.Size(70, 20)
+        Me.txtRaisedFloorH.TabIndex = 11
+        '
+        'txtRaisedFloorC
+        '
+        Me.txtRaisedFloorC.Location = New System.Drawing.Point(281, 6)
+        Me.txtRaisedFloorC.Name = "txtRaisedFloorC"
+        Me.txtRaisedFloorC.Size = New System.Drawing.Size(70, 20)
+        Me.txtRaisedFloorC.TabIndex = 13
+        '
+        'txtRaisedFloorV
+        '
+        Me.txtRaisedFloorV.Location = New System.Drawing.Point(184, 6)
+        Me.txtRaisedFloorV.Name = "txtRaisedFloorV"
+        Me.txtRaisedFloorV.Size = New System.Drawing.Size(70, 20)
+        Me.txtRaisedFloorV.TabIndex = 12
+        '
+        'lblRaisedFloorRow
+        '
+        Me.lblRaisedFloorRow.AutoSize = true
+        Me.lblRaisedFloorRow.Location = New System.Drawing.Point(3, 9)
+        Me.lblRaisedFloorRow.Name = "lblRaisedFloorRow"
+        Me.lblRaisedFloorRow.Size = New System.Drawing.Size(66, 13)
+        Me.lblRaisedFloorRow.TabIndex = 23
+        Me.lblRaisedFloorRow.Text = "Raised Floor"
+        '
+        'pnlSemiLowFloorRow
+        '
+        Me.pnlSemiLowFloorRow.BackColor = System.Drawing.Color.Lavender
+        Me.pnlSemiLowFloorRow.Controls.Add(Me.txtSemiLowFloorH)
+        Me.pnlSemiLowFloorRow.Controls.Add(Me.txtSemiLowFloorC)
+        Me.pnlSemiLowFloorRow.Controls.Add(Me.txtSemiLowFloorV)
+        Me.pnlSemiLowFloorRow.Controls.Add(Me.lblSemiLowFloorRow)
+        Me.pnlSemiLowFloorRow.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+        Me.pnlSemiLowFloorRow.ForeColor = System.Drawing.Color.Black
+        Me.pnlSemiLowFloorRow.Location = New System.Drawing.Point(26, 155)
+        Me.pnlSemiLowFloorRow.Name = "pnlSemiLowFloorRow"
+        Me.pnlSemiLowFloorRow.Size = New System.Drawing.Size(379, 33)
+        Me.pnlSemiLowFloorRow.TabIndex = 8
+        '
+        'txtSemiLowFloorH
+        '
+        Me.txtSemiLowFloorH.Location = New System.Drawing.Point(84, 6)
+        Me.txtSemiLowFloorH.Name = "txtSemiLowFloorH"
+        Me.txtSemiLowFloorH.Size = New System.Drawing.Size(70, 20)
+        Me.txtSemiLowFloorH.TabIndex = 8
+        '
+        'txtSemiLowFloorC
+        '
+        Me.txtSemiLowFloorC.Location = New System.Drawing.Point(281, 6)
+        Me.txtSemiLowFloorC.Name = "txtSemiLowFloorC"
+        Me.txtSemiLowFloorC.Size = New System.Drawing.Size(70, 20)
+        Me.txtSemiLowFloorC.TabIndex = 10
+        '
+        'txtSemiLowFloorV
+        '
+        Me.txtSemiLowFloorV.Location = New System.Drawing.Point(184, 6)
+        Me.txtSemiLowFloorV.Name = "txtSemiLowFloorV"
+        Me.txtSemiLowFloorV.Size = New System.Drawing.Size(70, 20)
+        Me.txtSemiLowFloorV.TabIndex = 9
+        '
+        'lblSemiLowFloorRow
+        '
+        Me.lblSemiLowFloorRow.AutoSize = true
+        Me.lblSemiLowFloorRow.Location = New System.Drawing.Point(3, 9)
+        Me.lblSemiLowFloorRow.Name = "lblSemiLowFloorRow"
+        Me.lblSemiLowFloorRow.Size = New System.Drawing.Size(79, 13)
+        Me.lblSemiLowFloorRow.TabIndex = 22
+        Me.lblSemiLowFloorRow.Text = "Semi Low Floor"
+        '
+        'pnlLowFloorRow
+        '
+        Me.pnlLowFloorRow.BackColor = System.Drawing.Color.Lavender
+        Me.pnlLowFloorRow.Controls.Add(Me.txtLowFloorH)
+        Me.pnlLowFloorRow.Controls.Add(Me.txtLowFloorC)
+        Me.pnlLowFloorRow.Controls.Add(Me.txtLowFloorV)
+        Me.pnlLowFloorRow.Controls.Add(Me.lblLowFloorRow)
+        Me.pnlLowFloorRow.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
+        Me.pnlLowFloorRow.ForeColor = System.Drawing.Color.Black
+        Me.pnlLowFloorRow.Location = New System.Drawing.Point(26, 116)
+        Me.pnlLowFloorRow.Name = "pnlLowFloorRow"
+        Me.pnlLowFloorRow.Size = New System.Drawing.Size(379, 33)
+        Me.pnlLowFloorRow.TabIndex = 5
+        '
+        'txtLowFloorH
+        '
+        Me.txtLowFloorH.Location = New System.Drawing.Point(84, 6)
+        Me.txtLowFloorH.Name = "txtLowFloorH"
+        Me.txtLowFloorH.Size = New System.Drawing.Size(70, 20)
+        Me.txtLowFloorH.TabIndex = 5
+        '
+        'txtLowFloorC
+        '
+        Me.txtLowFloorC.Location = New System.Drawing.Point(280, 6)
+        Me.txtLowFloorC.Name = "txtLowFloorC"
+        Me.txtLowFloorC.Size = New System.Drawing.Size(70, 20)
+        Me.txtLowFloorC.TabIndex = 7
+        '
+        'txtLowFloorV
+        '
+        Me.txtLowFloorV.Location = New System.Drawing.Point(184, 6)
+        Me.txtLowFloorV.Name = "txtLowFloorV"
+        Me.txtLowFloorV.Size = New System.Drawing.Size(70, 20)
+        Me.txtLowFloorV.TabIndex = 6
+        '
+        'lblLowFloorRow
+        '
+        Me.lblLowFloorRow.AutoSize = true
+        Me.lblLowFloorRow.Location = New System.Drawing.Point(7, 9)
+        Me.lblLowFloorRow.Name = "lblLowFloorRow"
+        Me.lblLowFloorRow.Size = New System.Drawing.Size(53, 13)
+        Me.lblLowFloorRow.TabIndex = 21
+        Me.lblLowFloorRow.Text = "Low Floor"
+        '
+        'lblCategory
+        '
+        Me.lblCategory.AutoSize = true
+        Me.lblCategory.Location = New System.Drawing.Point(26, 71)
+        Me.lblCategory.Name = "lblCategory"
+        Me.lblCategory.Size = New System.Drawing.Size(49, 13)
+        Me.lblCategory.TabIndex = 19
+        Me.lblCategory.Text = "Category"
+        '
+        'cboCategory
+        '
+        Me.cboCategory.FormattingEnabled = true
+        Me.cboCategory.Location = New System.Drawing.Point(81, 71)
+        Me.cboCategory.Name = "cboCategory"
+        Me.cboCategory.Size = New System.Drawing.Size(324, 21)
+        Me.cboCategory.TabIndex = 3
+        '
+        'gvTechBenefitLines
+        '
+        Me.gvTechBenefitLines.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
+        Me.gvTechBenefitLines.Location = New System.Drawing.Point(21, 238)
+        Me.gvTechBenefitLines.Name = "gvTechBenefitLines"
+        Me.gvTechBenefitLines.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect
+        Me.gvTechBenefitLines.Size = New System.Drawing.Size(885, 356)
+        Me.gvTechBenefitLines.TabIndex = 30
+        '
+        'lblUnits
+        '
+        Me.lblUnits.AutoSize = true
+        Me.lblUnits.Location = New System.Drawing.Point(26, 44)
+        Me.lblUnits.Name = "lblUnits"
+        Me.lblUnits.Size = New System.Drawing.Size(31, 13)
+        Me.lblUnits.TabIndex = 20
+        Me.lblUnits.Text = "Units"
+        '
+        'cboUnits
+        '
+        Me.cboUnits.AutoCompleteCustomSource.AddRange(New String() {"Fraction"})
+        Me.cboUnits.FormattingEnabled = true
+        Me.cboUnits.Items.AddRange(New Object() {"Fraction"})
+        Me.cboUnits.Location = New System.Drawing.Point(81, 44)
+        Me.cboUnits.Name = "cboUnits"
+        Me.cboUnits.Size = New System.Drawing.Size(324, 21)
+        Me.cboUnits.TabIndex = 1
+        '
+        'ErrorProvider1
+        '
+        Me.ErrorProvider1.ContainerControl = Me
+        '
+        'txtIndex
+        '
+        Me.txtIndex.Location = New System.Drawing.Point(81, 15)
+        Me.txtIndex.Name = "txtIndex"
+        Me.txtIndex.ReadOnly = true
+        Me.txtIndex.Size = New System.Drawing.Size(58, 20)
+        Me.txtIndex.TabIndex = 32
+        '
+        'lblIndex
+        '
+        Me.lblIndex.AutoSize = true
+        Me.lblIndex.Location = New System.Drawing.Point(29, 18)
+        Me.lblIndex.Name = "lblIndex"
+        Me.lblIndex.Size = New System.Drawing.Size(33, 13)
+        Me.lblIndex.TabIndex = 33
+        Me.lblIndex.Text = "Index"
+        '
+        'btnSave
+        '
+        Me.btnSave.Location = New System.Drawing.Point(721, 694)
+        Me.btnSave.Name = "btnSave"
+        Me.btnSave.Size = New System.Drawing.Size(75, 23)
+        Me.btnSave.TabIndex = 1
+        Me.btnSave.Text = "Save"
+        Me.btnSave.UseVisualStyleBackColor = true
+        '
+        'btnCancel
+        '
+        Me.btnCancel.Location = New System.Drawing.Point(826, 694)
+        Me.btnCancel.Name = "btnCancel"
+        Me.btnCancel.Size = New System.Drawing.Size(75, 23)
+        Me.btnCancel.TabIndex = 2
+        Me.btnCancel.Text = "Cancel"
+        Me.btnCancel.UseVisualStyleBackColor = true
         '
         'frmHVACTool
         '
         Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!)
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+        Me.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange
+        Me.CausesValidation = false
         Me.ClientSize = New System.Drawing.Size(965, 729)
+        Me.Controls.Add(Me.btnCancel)
+        Me.Controls.Add(Me.btnSave)
         Me.Controls.Add(Me.tabMain)
         Me.Name = "frmHVACTool"
         Me.Text = "frmHVACTool"
@@ -1744,16 +2135,25 @@ Partial Class frmHVACTool
         Me.tabGeneralInputsBC.ResumeLayout(false)
         Me.GroupBox2.ResumeLayout(false)
         Me.GroupBox2.PerformLayout
-        CType(Me.ErrorProvider1,System.ComponentModel.ISupportInitialize).EndInit
         Me.tabGeneralInputsOther.ResumeLayout(false)
-        Me.grpEnvironmentConditions.ResumeLayout(false)
-        Me.grpEnvironmentConditions.PerformLayout
-        Me.grpACSystem.ResumeLayout(false)
-        Me.grpACSystem.PerformLayout
-        Me.grpVentilation.ResumeLayout(false)
-        Me.grpVentilation.PerformLayout
         Me.grpAuxHeater.ResumeLayout(false)
         Me.grpAuxHeater.PerformLayout
+        Me.grpVentilation.ResumeLayout(false)
+        Me.grpVentilation.PerformLayout
+        Me.grpACSystem.ResumeLayout(false)
+        Me.grpACSystem.PerformLayout
+        Me.grpEnvironmentConditions.ResumeLayout(false)
+        Me.grpEnvironmentConditions.PerformLayout
+        Me.tabTechBenefits.ResumeLayout(false)
+        Me.tabTechBenefits.PerformLayout
+        Me.pnlRaisedFloorRow.ResumeLayout(false)
+        Me.pnlRaisedFloorRow.PerformLayout
+        Me.pnlSemiLowFloorRow.ResumeLayout(false)
+        Me.pnlSemiLowFloorRow.PerformLayout
+        Me.pnlLowFloorRow.ResumeLayout(false)
+        Me.pnlLowFloorRow.PerformLayout
+        CType(Me.gvTechBenefitLines,System.ComponentModel.ISupportInitialize).EndInit
+        CType(Me.ErrorProvider1,System.ComponentModel.ISupportInitialize).EndInit
         Me.ResumeLayout(false)
 
 End Sub
@@ -1898,4 +2298,40 @@ End Sub
     Friend WithEvents lblUnitstxtEC_EnviromentalTemperature As System.Windows.Forms.Label
     Friend WithEvents lblUnitstxtEC_Solar As System.Windows.Forms.Label
     Friend WithEvents tabTechBenefits As System.Windows.Forms.TabPage
+    Friend WithEvents gvTechBenefitLines As System.Windows.Forms.DataGridView
+    Friend WithEvents lblCategory As System.Windows.Forms.Label
+    Friend WithEvents lblRaisedFloorRow As System.Windows.Forms.Label
+    Friend WithEvents chkActiveVC As System.Windows.Forms.CheckBox
+    Friend WithEvents cboCategory As System.Windows.Forms.ComboBox
+    Friend WithEvents chkActiveVV As System.Windows.Forms.CheckBox
+    Friend WithEvents lblSemiLowFloorRow As System.Windows.Forms.Label
+    Friend WithEvents chkActiveVH As System.Windows.Forms.CheckBox
+    Friend WithEvents lblUnits As System.Windows.Forms.Label
+    Friend WithEvents chkOnVehicle As System.Windows.Forms.CheckBox
+    Friend WithEvents lblLowFloorRow As System.Windows.Forms.Label
+    Friend WithEvents cboUnits As System.Windows.Forms.ComboBox
+    Friend WithEvents txtRaisedFloorC As System.Windows.Forms.TextBox
+    Friend WithEvents cboLineType As System.Windows.Forms.ComboBox
+    Friend WithEvents txtLowFloorH As System.Windows.Forms.TextBox
+    Friend WithEvents txtRaisedFloorV As System.Windows.Forms.TextBox
+    Friend WithEvents txtLowFloorV As System.Windows.Forms.TextBox
+    Friend WithEvents txtRaisedFloorH As System.Windows.Forms.TextBox
+    Friend WithEvents txtLowFloorC As System.Windows.Forms.TextBox
+    Friend WithEvents txtSemiLowFloorC As System.Windows.Forms.TextBox
+    Friend WithEvents txtSemiLowFloorH As System.Windows.Forms.TextBox
+    Friend WithEvents txtSemiLowFloorV As System.Windows.Forms.TextBox
+    Friend WithEvents lblBenefitName As System.Windows.Forms.Label
+    Friend WithEvents txtBenefitName As System.Windows.Forms.TextBox
+    Friend WithEvents lblCoolingColumn As System.Windows.Forms.Label
+    Friend WithEvents lblVentelationColumn As System.Windows.Forms.Label
+    Friend WithEvents lblHeatingColumn As System.Windows.Forms.Label
+    Friend WithEvents pnlRaisedFloorRow As System.Windows.Forms.Panel
+    Friend WithEvents pnlSemiLowFloorRow As System.Windows.Forms.Panel
+    Friend WithEvents pnlLowFloorRow As System.Windows.Forms.Panel
+    Friend WithEvents btnUpdate As System.Windows.Forms.Button
+    Friend WithEvents lblLineType As System.Windows.Forms.Label
+    Friend WithEvents lblIndex As System.Windows.Forms.Label
+    Friend WithEvents txtIndex As System.Windows.Forms.TextBox
+    Friend WithEvents btnCancel As System.Windows.Forms.Button
+    Friend WithEvents btnSave As System.Windows.Forms.Button
 End Class
diff --git a/VECTOAux/VectoAuxiliaries/UI/frmHVACTool.vb b/VECTOAux/VectoAuxiliaries/UI/frmHVACTool.vb
index 8524b7d7bd..6e082f3aa0 100644
--- a/VECTOAux/VectoAuxiliaries/UI/frmHVACTool.vb
+++ b/VECTOAux/VectoAuxiliaries/UI/frmHVACTool.vb
@@ -11,6 +11,46 @@ Public Class frmHVACTool
   Private buses As IBusDatabase
   Private ssmTOOL As SSMTOOL
   Private TabColors As Dictionary(Of TabPage, Color) = New Dictionary(Of TabPage, Color)()
+  Private editTechLine As ITechListBenefitLine = New TechListBenefitLine(Nothing)
+  Private gvTechListBinding As BindingList(Of ITechListBenefitLine)
+  Private DefaultCategories As String() = {"Cooling","Heating","Insulation","Ventiliation"}
+
+
+  Private sub BindGrid(  )
+
+      Dim gvTechListBinding As New BindingList(Of ITechListBenefitLine)(ssmTOOL.techList.TechLines.OrderBy( Function(o) o.Category).ThenBy( Function(t) t.BenefitName).ToList())
+      Me.gvTechBenefitLines.DataSource = gvTechListBinding
+
+
+  End Sub
+
+  Private function GetCategories( ) As List(Of String)
+
+     If Not ssmTOOL is Nothing AndAlso Not ssmTOOL.techList is Nothing AndAlso ssmTOOL.techList.TechLines.Count>0
+
+        'Fuse Lists          
+        Dim fusedList As new List(Of String )
+        
+        For Each s As String In ssmTOOL.techList.TechLines.Select( Function(sel) sel.Category)
+
+          If Not fusedList.Contains(s) then
+           fusedList.Add(s)
+          End If
+
+        Next
+          
+          Return fusedList.OrderBy( Function(o) o.ToString()).ToList()
+
+      Else
+
+          Return New List(Of String)(DefaultCategories)
+
+     End If
+
+
+  End Function
+
+
 
 
 
@@ -24,6 +64,10 @@ Public Class frmHVACTool
     Me.ahsmFilePath = ahsmFilePath
 
     ssmTOOL = New SSMTOOL(ahsmFilePath)
+    ssmTOOL.Load(ahsmFilePath)
+
+
+   ' ssmTOOL.techList.in("SSMTechBenefitsALLON.csv")
 
     setupBuses()
     setupControls()
@@ -46,10 +90,111 @@ End Sub
 End Sub
   Private Sub setupControls()
 
+     'gvTechBenefitLines
+     gvTechBenefitLines.AutoGenerateColumns=false
+
+     Dim cIndex As Integer
+
+     'Column - Category
+     cIndex = gvTechBenefitLines.Columns.Add("Category", "Category")
+     gvTechBenefitLines.Columns(cIndex).DataPropertyName = "Category"
+     gvTechBenefitLines.Columns(cIndex).Width = 70
+     gvTechBenefitLines.Columns(cIndex).ReadOnly = True
+     gvTechBenefitLines.Columns(cIndex).HeaderCell.Style.Alignment = DataGridViewContentAlignment.TopCenter
+     gvTechBenefitLines.Columns(cIndex).HeaderCell.Style.Padding = New Padding(1, 2, 1, 1)
+
+     'Column - BenefitName
+     cIndex = gvTechBenefitLines.Columns.Add("BenefitName", "BenefitName")
+     gvTechBenefitLines.Columns(cIndex).DataPropertyName = "BenefitName"
+     gvTechBenefitLines.Columns(cIndex).Width = 330
+     gvTechBenefitLines.Columns(cIndex).ReadOnly = True
+     gvTechBenefitLines.Columns(cIndex).HeaderCell.Style.Alignment = DataGridViewContentAlignment.TopCenter
+     gvTechBenefitLines.Columns(cIndex).HeaderCell.Style.Padding = New Padding(1, 2, 1, 1)
+
+     'Column - H
+     cIndex = gvTechBenefitLines.Columns.Add("H", "H")
+     gvTechBenefitLines.Columns(cIndex).DataPropertyName = "H"
+     gvTechBenefitLines.Columns(cIndex).Width = 60
+     gvTechBenefitLines.Columns(cIndex).ReadOnly = True
+     gvTechBenefitLines.Columns(cIndex).HeaderCell.Style.Alignment = DataGridViewContentAlignment.TopCenter
+     gvTechBenefitLines.Columns(cIndex).HeaderCell.Style.Padding = New Padding(1, 2, 1, 1)
+
+     'Column - VH
+     cIndex = gvTechBenefitLines.Columns.Add("VH", "VH")
+     gvTechBenefitLines.Columns(cIndex).DataPropertyName = "VH"
+     gvTechBenefitLines.Columns(cIndex).Width = 60
+     gvTechBenefitLines.Columns(cIndex).ReadOnly = True
+     gvTechBenefitLines.Columns(cIndex).HeaderCell.Style.Alignment = DataGridViewContentAlignment.TopCenter
+     gvTechBenefitLines.Columns(cIndex).HeaderCell.Style.Padding = New Padding(1, 2, 1, 1)
+
+
+     'Column - VV
+     cIndex = gvTechBenefitLines.Columns.Add("VV", "VV")
+     gvTechBenefitLines.Columns(cIndex).DataPropertyName = "VV"
+     gvTechBenefitLines.Columns(cIndex).Width = 60
+     gvTechBenefitLines.Columns(cIndex).ReadOnly = True
+     gvTechBenefitLines.Columns(cIndex).HeaderCell.Style.Alignment = DataGridViewContentAlignment.TopCenter
+     gvTechBenefitLines.Columns(cIndex).HeaderCell.Style.Padding = New Padding(1, 2, 1, 1)
+
+     'Column - VC
+     cIndex = gvTechBenefitLines.Columns.Add("VC", "VC")
+     gvTechBenefitLines.Columns(cIndex).DataPropertyName = "VC"
+     gvTechBenefitLines.Columns(cIndex).Width = 60
+     gvTechBenefitLines.Columns(cIndex).ReadOnly = True
+     gvTechBenefitLines.Columns(cIndex).HeaderCell.Style.Alignment = DataGridViewContentAlignment.TopCenter
+     gvTechBenefitLines.Columns(cIndex).HeaderCell.Style.Padding = New Padding(1, 2, 1, 1)
+
+     'Column - C
+     cIndex = gvTechBenefitLines.Columns.Add("C", "C")
+     gvTechBenefitLines.Columns(cIndex).DataPropertyName = "C"
+     gvTechBenefitLines.Columns(cIndex).Width = 60
+     gvTechBenefitLines.Columns(cIndex).ReadOnly = True
+     gvTechBenefitLines.Columns(cIndex).HeaderCell.Style.Alignment = DataGridViewContentAlignment.TopCenter
+     gvTechBenefitLines.Columns(cIndex).HeaderCell.Style.Padding = New Padding(1, 2, 1, 1)
+
+     'Column - OnVehicle
+     cIndex = gvTechBenefitLines.Columns.Add("OnVehicle", "OnVehicle")
+     gvTechBenefitLines.Columns(cIndex).DataPropertyName = "OnVehicle"
+     gvTechBenefitLines.Columns(cIndex).Width = 60
+     gvTechBenefitLines.Columns(cIndex).ReadOnly = True
+     gvTechBenefitLines.Columns(cIndex).HeaderCell.Style.Alignment = DataGridViewContentAlignment.TopCenter
+     gvTechBenefitLines.Columns(cIndex).HeaderCell.Style.Padding = New Padding(1, 2, 1, 1)
+
+
+     Dim deleteColumn As New DataGridViewButtonColumn()
+
+     With deleteColumn
+
+       .HeaderText=""
+       .ToolTipText="Delete this row"
+       .Name="Delete"
+       .Text="Del"
+       .UseColumnTextForButtonValue=true
+       .Width=55
+       .DefaultCellStyle.Padding= New Padding(5,1,5,1)
+       .DefaultCellStyle.Alignment= DataGridViewContentAlignment.MiddleCenter
+       .DefaultCellStyle.ForeColor= Color.Red
+       .AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells
+       .FlatStyle = FlatStyle.Standard
+       .CellTemplate.Style.BackColor = Color.Honeydew
+        '.DisplayIndex = 0
+
+     end with
+     gvTechBenefitLines.Columns.Add(deleteColumn)
+
+     'Techlist Edit Panel
+     cboCategory.DataSource= GetCategories()
+     cboUnits.DataSource= {"Fraction"}
+     cboLineType.DataSource={"Normal","ActiveVentilation"}
 
-End Sub
+
+  End Sub
   Private Sub setupBindings()
 
+  'TechBenefitLines
+   BindGrid()
+
+
   'Bus Parameterisation
   txtBusModel.DataBindings.Add("Text", ssmTOOL.genInputs, "BP_BusModel", False, DataSourceUpdateMode.OnPropertyChanged)
   txtRegisteredPassengers.DataBindings.Add("Text", ssmTOOL.genInputs, "BP_NumberOfPassengers", False, DataSourceUpdateMode.OnPropertyChanged)
@@ -139,20 +284,22 @@ End Sub
 
 End Sub
 
-
   'Validators
   Public Sub Validating_GeneralInputsBP(sender As Object, e As CancelEventArgs) Handles txtRegisteredPassengers.Validating, txtBusWidth.Validating, txtBusVolume.Validating, txtBusSurfaceArea.Validating, txtBusModel.Validating, txtBusLength.Validating, txtBusFloorSurfaceArea.Validating, txtBC_PassengerBoundaryTemperature.Validated
 
     e.Cancel = Not Validate_GeneralInputsBP()
 
   End Sub
-
   Public Sub Validating_GeneralInputsBC(sender As Object, e As CancelEventArgs) Handles  txtBC_GFactor.Validating, txtBC_VolumicMassDieselOrHeatingOil.Validating, txtBC_SpecificVentilationPower.Validating, txtBC_PassengerDensitySemiLowFloor.Validating, txtBC_PassengerDensityRaisedFloor.Validating, txtBC_PassengerDensityLowFloor.Validating, txtBC_MaxTemperatureDeltaForLowFloorBusses.Validating, txtBC_MaxPossibleBenefitFromTechnologyList.Validating, txtBC_lowVentilation.Validating, txtBC_HighVentilation.Validating, txtBC_HeatingBoundaryTemperature.Validating, txtBC_GCVDieselOrHeatingOil.Validating, txtBC_COP.Validating, txtBC_CoolingBoundaryTemperature.Validating, txtBC_AuxHeaterEfficiency.Validating
 
     e.Cancel = Not Validate_GeneralInputsBC()
 
-  End Sub
+  End Sub   
+  Public Sub Validating_GeneralInputsOther(sender As Object, e As CancelEventArgs) Handles txtEC_Solar.Validating, txtEC_EnviromentalTemperature.Validating, txtAH_FuelFiredHeaterkW.Validating, txtAH_EngineWasteHeatkW.Validating, txtAC_CompressorCapacitykW.Validating 
+
+    e.Cancel = Not Validate_GeneralInputsOther()
 
+  End Sub
   Public Function Validate_GeneralInputsBP() As Boolean
 
        Dim result As Boolean = True
@@ -231,91 +378,28 @@ End Function
         'BOUNDARY CONDITIONS
         '*******************
 
-        'txtBC_GFactor		
-        If Not IsNumeric(txtBC_GFactor.Text) Then
-         ErrorProvider1.SetError(txtBC_GFactor, "Please enter a number ( GFactor )")
-         result = False
-        Else
-         ErrorProvider1.SetError(txtBC_GFactor, String.Empty)
-        End If  
-          		              
+         'txtBC_GFactor		
+         IsTextBoxNumber(txtBC_GFactor,"Please enter a number ( GFactor )",result) 
         'BC_SolarClouding				      : Calculated    
-        'BC_HeatPerPassengerIntoCabinW	      : Calculated
-             
+        'BC_HeatPerPassengerIntoCabinW	      : Calculated             
         'txtBC_PassengerBoundaryTemperature    
-        If Not IsNumeric(txtBC_PassengerBoundaryTemperature.Text) Then
-         ErrorProvider1.SetError(txtBC_PassengerBoundaryTemperature, "Please enter a number ( Passenger Boundary Temperature )")
-         result = False
-        Else
-         ErrorProvider1.SetError(txtBC_PassengerBoundaryTemperature, String.Empty)
-        End If  
-               
+         IsTextBoxNumber(txtBC_PassengerBoundaryTemperature,"Please enter a number ( Passenger Boundary Temperature )",result)
         'txtBC_PassengerDensityLowFloor   
-        If Not IsNumeric(txtBC_PassengerDensityLowFloor.Text) Then
-         ErrorProvider1.SetError(txtBC_PassengerDensityLowFloor, "Please enter a number ( Passenger Density Low Floor )")
-         result = False
-        Else
-         ErrorProvider1.SetError(txtBC_PassengerDensityLowFloor, String.Empty)
-        End If
-        
-                         
+         IsTextBoxNumber(txtBC_PassengerDensityLowFloor,"Please enter a number ( Passenger Density Low Floor )",result)
         'txtBC_PassengerDensitySemiLowFloor	 
-        If Not IsNumeric(txtBC_PassengerDensitySemiLowFloor.Text) Then
-         ErrorProvider1.SetError(txtBC_PassengerDensitySemiLowFloor, "Please enter a number ( Passenger Density Semi Low Floor )")
-         result = False
-        Else
-         ErrorProvider1.SetError(txtBC_PassengerDensitySemiLowFloor, String.Empty)
-        End If
-
-             
+         IsTextBoxNumber(txtBC_PassengerDensitySemiLowFloor,"Please enter a number ( Passenger Density Semi Low Floor )",result)
         'txtBC_PassengerDensityRaisedFloor	
-        If Not IsNumeric(txtBC_PassengerDensityRaisedFloor.Text) Then
-         ErrorProvider1.SetError(txtBC_PassengerDensityRaisedFloor, "Please enter a number ( Passenger Density Raised Floor )")
-         result = False
-        Else
-         ErrorProvider1.SetError(txtBC_PassengerDensityRaisedFloor, String.Empty)
-        End If
-               
-              
+         IsTextBoxNumber(txtBC_PassengerDensityRaisedFloor,"Please enter a number ( Passenger Density Raised Floor )",result)
         'txtBC_CalculatedPassengerNumber	: Calculated          
-        'txtBC_UValues                      : Calculated
-        
-                                 
+        'txtBC_UValues                      : Calculated                            
         'txtBC_HeatingBoundaryTemperature	
-        If Not IsNumeric(txtBC_HeatingBoundaryTemperature.Text) Then
-         ErrorProvider1.SetError(txtBC_HeatingBoundaryTemperature, "Please enter a number ( Heating Boundary Temperature )")
-         result = False
-        Else
-         ErrorProvider1.SetError(txtBC_HeatingBoundaryTemperature, String.Empty)
-        End If        
-        
-              
+         IsTextBoxNumber(txtBC_HeatingBoundaryTemperature,"Please enter a number ( Heating Boundary Temperature )",result)             
         'txtBC_CoolingBoundaryTemperature 
-        If Not IsNumeric(txtBC_CoolingBoundaryTemperature.Text) Then
-         ErrorProvider1.SetError(txtBC_CoolingBoundaryTemperature, "Please enter a number ( Cooling Boundary Temperature )")
-         result = False
-        Else
-         ErrorProvider1.SetError(txtBC_CoolingBoundaryTemperature, String.Empty)
-        End If          
-        
-                 
+         IsTextBoxNumber(txtBC_CoolingBoundaryTemperature,"Please enter a number ( Cooling Boundary Temperature )",result)                 
         'txtBC_HighVentilation    
-        If Not IsNumeric(txtBC_HighVentilation.Text) Then
-         ErrorProvider1.SetError(txtBC_HighVentilation, "Please enter a number ( High Ventilation )")
-         result = False
-        Else
-         ErrorProvider1.SetError(txtBC_HighVentilation, String.Empty)
-        End If      
-        
-                         
+         IsTextBoxNumber(txtBC_HighVentilation,"Please enter a number ( High Ventilation )",result)                    
         'txtBC_lowVentilation	
-        If Not IsNumeric(txtBC_lowVentilation.Text) Then
-         ErrorProvider1.SetError(txtBC_lowVentilation, "Please enter a number ( Low Ventilation )")
-         result = False
-        Else
-         ErrorProvider1.SetError(txtBC_lowVentilation, String.Empty)
-        End If         
-                          
+         IsTextBoxNumber(txtBC_lowVentilation,"Please enter a number ( Low Ventilation )",result)                  
         'txtBC_High             : Calculated                                     
         'txtBC_Low	            : Calculated                                
         'txtBC_HighVentPowerW   : Calculated                  
@@ -333,12 +417,11 @@ End Function
         'txtBC_WindowAreaPerUnitBusLength	     : Calculated 
         'txtBC_FrontRearWindowArea               : Calculated                      
         'txtBC_MaxTemperatureDeltaForLowFloorBusses
-         IsTextBoxNumber(txtBC_MaxTemperatureDeltaForLowFloorBusses,"Please enter a number ( tMax Temp Delta For Low Floor Busses )",result)   
+         IsTextBoxNumber(txtBC_MaxTemperatureDeltaForLowFloorBusses,"Please enter a number ( Max Temp Delta For Low Floor Busses )",result)   
         'txtBC_MaxPossibleBenefitFromTechnologyList
          IsTextBoxNumber(txtBC_MaxPossibleBenefitFromTechnologyList,"Please enter a number ( Max Benefit From Technology List )",result)   
 
         'Set Tab Color
-
         UpdateTabStatus("tabGeneralInputsBC", result)
 
         Return result
@@ -348,34 +431,66 @@ End Function
 
       Dim result As Boolean = true
 
-    ' 'EnviromentalConditions				
-    'txtEC_EnviromentalTemperature                      
+    'EnviromentalConditions				
+     IsTextBoxNumber(txtEC_EnviromentalTemperature,"Please enter a number (Environmental Temperature)",result)                  
     'txtEC_Solar   	                                  
-    					                                         
+     IsTextBoxNumber(txtEC_Solar,"Please enter a number (Solar)",result) 
+         					                                         
     ''AC-system				                                     
-    'chkAC_InCabinRoomAC_System	                       
-    'txtAC_CompressorType			                   
-    'cboAC_CompressorCapacitykW	                       
+    'chkAC_InCabinRoomAC_System	     : Selection                  
+    'cboAC_CompressorType			 : Selection                
+    'txtAC_CompressorCapacitykW	 
+     IsTextBoxNumber(txtAC_CompressorCapacitykW,"Please enter a number ( Compressor Capacity )",result)                      
     					
     ''Ventilation				
-    'chkVEN_VentilationOnDuringHeating	
-			          
-    'chkVEN_VentilationWhenBothHeatingAndACInactive		 
-    'chkVEN_VentilationDuringAC			                 
-    'cboVEN_VentilationFlowSettingWhenHeatingAndACInactive
-    'cboVEN_VentilationDuringHeating			          
-    'cboVEN_VentilationDuringCooling				      
+    'chkVEN_VentilationOnDuringHeating				          : Selection
+    'chkVEN_VentilationWhenBothHeatingAndACInactive		      : Selection
+    'chkVEN_VentilationDuringAC			                      : Selection
+    'cboVEN_VentilationFlowSettingWhenHeatingAndACInactive    : Selection
+    'cboVEN_VentilationDuringHeating			              : Selection
+    'cboVEN_VentilationDuringCooling				          : Selection
     					
     ''Aux. Heater				
-    'txtAH_EngineWasteHeatkW	                            
+    ' txtAH_EngineWasteHeatkW	
+     IsTextBoxNumber(txtAH_EngineWasteHeatkW,"Please enter a number ( Engine waste heat )",result)                                                          
     'txtAH_FuelFiredHeaterkW  
+     IsTextBoxNumber(txtAH_FuelFiredHeaterkW,"Please enter a number ( Fuel fired heater )",result)
     
-    
+     'Set Tab Color
+     UpdateTabStatus("tabGeneralInputsOther", result)
+
      Return result                             
 
   End Function
 
+  Public Sub Validating_TechLineEdit(sender As Object, e As CancelEventArgs) 'Handles txtSemiLowFloorV.Validating, txtSemiLowFloorH.Validating, txtSemiLowFloorC.Validating, txtRaisedFloorV.Validating, txtRaisedFloorH.Validating, txtRaisedFloorC.Validating, txtLowFloorV.Validating, txtLowFloorH.Validating, txtLowFloorC.Validating, txtBenefitName.Validating, chkOnVehicle.Validating, chkActiveVV.Validating, chkActiveVH.Validating, chkActiveVC.Validating, cboUnits.Validating, cboLineType.Validating, cboCategory.Validating
 
+    e.Cancel = Not Validate_TechLineEdit()
+
+  End Sub
+
+  Public Function Validate_TechLineEdit() As Boolean
+
+     Dim result As Boolean = True
+     
+      IsEmptyString(cboCategory.Text      ,cboCategory     ,"Please enter a valid category"                       ,result)
+      IsEmptyString(txtBenefitName.Text   ,txtBenefitName  ,"Please enter a valid Benefit Name"                   ,result)
+      IsEmptyString(cboUnits.Text         ,cboUnits        ,"Please enter valid units"                            ,result)
+      IsEmptyString(cboLineType.Text      , cboLineType    ,"Please enter a valid line type"                      ,result)
+      IsTextBoxNumber(txtLowFloorH                         ,"Please enter a valid number for this floor variable" ,result)
+      IsTextBoxNumber(txtLowFloorV                         ,"Please enter a valid number for this floor variable" ,result)
+      IsTextBoxNumber(txtLowFloorC                         ,"Please enter a valid number for this floor variable" ,result)
+      IsTextBoxNumber(txtSemiLowFloorH                     ,"Please enter a valid number for this floor variable" ,result)
+      IsTextBoxNumber(txtSemiLowFloorV                     ,"Please enter a valid number for this floor variable" ,result)
+      IsTextBoxNumber(txtSemiLowFloorC                     ,"Please enter a valid number for this floor variable" ,result)
+      IsTextBoxNumber(txtRaisedFloorH                      ,"Please enter a valid number for this floor variable" ,result)
+      IsTextBoxNumber(txtRaisedFloorV                      ,"Please enter a valid number for this floor variable" ,result)
+      IsTextBoxNumber(txtRaisedFloorC                      ,"Please enter a valid number for this floor variable" ,result)
+
+       
+     Return result
+  
+  End Function
 
   'Validation Helpers
   Private Sub IsTextBoxNumber( control As TextBox, errorProviderMessage As String , ByRef result As Boolean) 
@@ -389,6 +504,18 @@ End Function
         End If 
 
   End sub
+  Private Sub IsEmptyString( text as  String, control As control, errorProviderMessage As String , ByRef result As Boolean) 
+
+      If String.IsNullOrEmpty( text ) Then
+         ErrorProvider1.SetError(control, errorProviderMessage)
+         result =  False
+        Else
+         ErrorProvider1.SetError(control, String.Empty)
+
+        End If 
+
+  End sub
+
 
   Private Function IsPostiveInteger(ByVal test As String) As Boolean
 
@@ -539,16 +666,187 @@ End Function
     'For Tab Coloring, this is the place where the background will get filled on the tab when attention is required.
     AddHandler tabMain.DrawItem, New System.Windows.Forms.DrawItemEventHandler(AddressOf tabMain_DrawItem)
 
-
+    gvTechBenefitLines.ClearSelection()
  
   End Sub
 
+  
+  
+  
+  Private Sub FillTechLineEditPanel( index As Integer)
+
+     Dim techline As ITechListBenefitLine
+     Dim benefitName , category As String
+     benefitName = gvTechBenefitLines.Rows(index).Cells("BenefitName").Value
+     category = gvTechBenefitLines.Rows(index).Cells("Category").Value
+
+     techline = ssmTOOL.techList.TechLines.First( Function(f) f.BenefitName=benefitName AndAlso f.Category=category)
+
+     txtIndex.Text=index
+     cboCategory.Text= techline.Category
+     txtBenefitName.Text=techline.BenefitName
+     cboUnits.Text = techline.Units
+     cboLineType.Text = If( techline.LineType=0, "Normal","ActiveVentilation")
+     txtLowFloorH    .Text = techline.LowFloorH
+     txtLowFloorV    .Text = techline.LowFloorV    
+     txtLowFloorC    .Text = techline.LowFloorC    
+     txtSemiLowFloorH.Text = techline.SemiLowFloorH
+     txtSemiLowFloorV.Text = techline.SemiLowFloorV
+     txtSemiLowFloorC.Text = techline.SemiLowFloorC
+     txtRaisedFloorH .Text = techline.RaisedFloorH 
+     txtRaisedFloorV .Text = techline.RaisedFloorV 
+     txtRaisedFloorC .Text = techline.RaisedFloorC 
+     chkActiveVH.Checked   = techline.ActiveVH
+     chkActiveVV.Checked   = techline.ActiveVV
+     chkActiveVC.Checked   = techline.ActiveVC
+     chkOnVehicle.Checked  = techline.OnVehicle
+
+                        
+
+  End Sub
+
+
+Private Sub gvTechBenefitLines_DoubleClick( sender As Object,  e As EventArgs) Handles gvTechBenefitLines.DoubleClick
+
+     Dim row As Integer = gvTechBenefitLines.SelectedCells(0).OwningRow.Index
+
+     Dim benefitName , category As String
+     benefitName = gvTechBenefitLines.Rows(row).Cells("BenefitName").Value
+     category = gvTechBenefitLines.Rows(row).Cells("Category").Value
+
+     editTechLine = ssmTOOL.techList.TechLines.First( Function(f) f.BenefitName=benefitName AndAlso f.Category=category)
+
+     FillTechLineEditPanel( row )
+
+
+
+End Sub
+
+
+private function GetTechLineFromPanel() as ITechListBenefitLine
+
+  Dim tl As ITechListBenefitLine  = New TechListBenefitLine( ssmTOOL.genInputs)
+   
+
+  tl.Category      = cboCategory.Text
+  tl.BenefitName   = txtBenefitName.Text
+  tl.Units         = cboUnits.Text
+  tl.LineType      = If( cboLineType.Text= "Normal",0,3)
+  tl.LowFloorH     = txtLowFloorH      .Text
+  tl.LowFloorV     = txtLowFloorV      .Text
+  tl.LowFloorC     = txtLowFloorC      .Text
+  tl.SemiLowFloorH = txtSemiLowFloorH  .Text
+  tl.SemiLowFloorV = txtSemiLowFloorV  .Text
+  tl.SemiLowFloorC = txtSemiLowFloorC  .Text
+  tl.RaisedFloorH  = txtRaisedFloorH   .Text
+  tl.RaisedFloorV  = txtRaisedFloorV   .Text
+  tl.RaisedFloorC  = txtRaisedFloorC   .Text
+  tl.ActiveVH      = chkActiveVH       .Checked
+  tl.ActiveVV      = chkActiveVV       .Checked
+  tl.ActiveVC      = chkActiveVC       .Checked
+  tl.OnVehicle     = chkOnVehicle      .Checked
+
+
+  Return tl
+
+End Function
+
+Private Sub ClearEditPanel()
+
+  txtIndex.Text                     = String.Empty
+  cboCategory.Text                  = String.Empty
+  txtBenefitName.Text               = String.Empty
+  cboUnits.Text                     = String.Empty
+  cboLineType.Text                  = String.Empty
+  txtLowFloorH      .Text           = String.Empty
+  txtLowFloorV      .Text           = String.Empty
+  txtLowFloorC      .Text           = String.Empty
+  txtSemiLowFloorH  .Text           = String.Empty
+  txtSemiLowFloorV  .Text           = String.Empty
+  txtSemiLowFloorC  .Text           = String.Empty
+  txtRaisedFloorH   .Text           = String.Empty
+  txtRaisedFloorV   .Text           = String.Empty
+  txtRaisedFloorC   .Text           = String.Empty
+  chkActiveVH       .Checked        = False
+  chkActiveVV       .Checked        = False
+  chkActiveVC       .Checked        = False
+  chkOnVehicle      .Checked        = False
+
+End Sub
+
 
-Private Sub Validating_GeneralInputs( sender As Object,  e As EventArgs)
+Private Sub btnUpdate_Click( sender As Object,  e As EventArgs) Handles btnUpdate.Click
+ 
+  Dim feedback As String = String.Empty
+
+  If NOT Validate_TechLineEdit() then Return
+  
+  If txtIndex.Text.Trim.Length=0 then 
+  'This is an Add
+   If Not ssmTOOL.techList.Add( GetTechLineFromPanel(), feedback) then
+     MessageBox.Show( feedback )
+     Else
+      BindGrid()
+
+      cboCategory.DataSource= GetCategories()
+
+   End if
+
+  Else
+  'This is an update
+    If Not ssmTOOL.techList.Modify( editTechLine, GetTechLineFromPanel() , feedback) then
+        MessageBox.Show( feedback )
+     Else
+       gvTechBenefitLines.Refresh()
+       ClearEditPanel()
+      
+    End If
+
+  End If
 
 End Sub
 
-Private Sub Validating_GeneralInputsBP( sender As Object,  e As EventArgs)
+
+
+
+Private Sub btnSave_Click( sender As Object,  e As EventArgs) Handles btnSave.Click
+
+
+     ssmTOOL.Save( ahsmFilePath )
+
 
 End Sub
+
+
+
+Private Sub gvTechBenefitLines_CellClick( sender As Object,  e As DataGridViewCellEventArgs) Handles gvTechBenefitLines.CellClick
+
+
+   If gvTechBenefitLines.Columns( e.ColumnIndex).Name="Delete" then
+
+      Dim benefit As String = gvTechBenefitLines.Rows( e.RowIndex).Cells(1).Value
+      Dim category As String = gvTechBenefitLines.Rows( e.RowIndex).Cells(0).Value
+      Dim feedback As String = String.Empty
+
+      Dim dr As DialogResult = MessageBox.Show(String.Format("Do you want to delete benefit '{0}' ?", benefit),"", MessageBoxButtons.YesNo)
+
+      If dr= Windows.Forms.DialogResult.Yes then
+      
+       If  ssmTOOL.techList.Delete( New TechListBenefitLine With {.BenefitName= benefit, .Category=category}, feedback) then
+
+         BindGrid
+
+       End If
+
+
+
+      End If
+
+
+   End If
+
+End Sub
+
+
+
 End Class
-- 
GitLab