Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 48d55fc9 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

code formatting

parent e046c662
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment