diff --git a/VECTOAux/VectoAuxiliaries/Electrics/CombinedAlternator.vb b/VECTOAux/VectoAuxiliaries/Electrics/CombinedAlternator.vb index d40afbd73a3aac36a9a3a54940200199408457f7..0c29952fdc2ba703649200129b55775673700d10 100644 --- a/VECTOAux/VectoAuxiliaries/Electrics/CombinedAlternator.vb +++ b/VECTOAux/VectoAuxiliaries/Electrics/CombinedAlternator.vb @@ -329,7 +329,7 @@ Public Class CombinedAlternator End If 'add values to map - map.Add(New CombinedAlternatorMapRow(elements(0), CType(elements(1), Single), CType(elements(2), Single), CType(elements(3), Single), CType(elements(4), Single))) + map.Add(New CombinedAlternatorMapRow(elements(0), CType(elements(1), Single), CType(elements(2), Single), CType(elements(3), Single), CType(elements(4), Single))) Else firstline = False diff --git a/VECTOAux/VectoAuxiliaries/Electrics/CombinedAlternatorMapRow.vb b/VECTOAux/VectoAuxiliaries/Electrics/CombinedAlternatorMapRow.vb index eb0b9f748808e3f49130ac2d15000291cc78cda5..d9a141dbbd2b959de8f0744863fc880c92c78d71 100644 --- a/VECTOAux/VectoAuxiliaries/Electrics/CombinedAlternatorMapRow.vb +++ b/VECTOAux/VectoAuxiliaries/Electrics/CombinedAlternatorMapRow.vb @@ -1,44 +1,36 @@ Namespace Electrics - -'This class is reflective of the stored entries for the combined alternator -'And is used by the Combined Alternator Form and any related classes. - - Public Class CombinedAlternatorMapRow - Implements ICombinedAlternatorMapRow - - Public Property AlternatorName As String implements ICombinedAlternatorMapRow.AlternatorName - Public Property RPM As Single implements ICombinedAlternatorMapRow.RPM - Public Property Amps As Single implements ICombinedAlternatorMapRow.Amps - Public Property Efficiency As Single implements ICombinedAlternatorMapRow.Efficiency - Public Property PulleyRatio As Single implements ICombinedAlternatorMapRow.PulleyRatio - - 'Constructors - Sub new () - - - End Sub - - Sub new (AlternatorName As string, RPM As single ,Amps As single, Efficiency As single , PulleyRatio As single ) - - 'Sanity Check - If AlternatorName.Trim.Length=0 then Throw New ArgumentException("Alternator name cannot be zero length") - If Efficiency<0 or Efficiency>100 then Throw New ArgumentException("Efficiency must be between 0 and 100") - If PulleyRatio<=0 then Throw New ArgumentException("Pully ratio must be a positive number") - - 'Assignments - Me.AlternatorName = AlternatorName - Me.RPM = RPM - Me.Amps = Amps - Me.Efficiency = Efficiency - Me.PulleyRatio = PulleyRatio - - End Sub - - -End Class - - + 'This class is reflective of the stored entries for the combined alternator + 'And is used by the Combined Alternator Form and any related classes. + + Public Class CombinedAlternatorMapRow + Implements ICombinedAlternatorMapRow + + Public Property AlternatorName As String Implements ICombinedAlternatorMapRow.AlternatorName + Public Property RPM As Single Implements ICombinedAlternatorMapRow.RPM + Public Property Amps As Single Implements ICombinedAlternatorMapRow.Amps + Public Property Efficiency As Single Implements ICombinedAlternatorMapRow.Efficiency + Public Property PulleyRatio As Single Implements ICombinedAlternatorMapRow.PulleyRatio + + 'Constructors + Sub New() + End Sub + + Sub New(AlternatorName As String, RPM As Single, Amps As Single, Efficiency As Single, PulleyRatio As Single) + + 'Sanity Check + If AlternatorName.Trim.Length = 0 Then Throw New ArgumentException("Alternator name cannot be zero length") + If Efficiency < 0 Or Efficiency > 100 Then _ + Throw New ArgumentException("Alternator Efficiency must be between 0 and 100") + If PulleyRatio <= 0 Then Throw New ArgumentException("Alternator Pully ratio must be a positive number") + + 'Assignments + Me.AlternatorName = AlternatorName + Me.RPM = RPM + Me.Amps = Amps + Me.Efficiency = Efficiency + Me.PulleyRatio = PulleyRatio + End Sub + End Class End Namespace -