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 ...@@ -329,7 +329,7 @@ Public Class CombinedAlternator
End If End If
'add values to map '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 Else
firstline = False firstline = False
......
Namespace Electrics Namespace Electrics
'This class is reflective of the stored entries for the combined alternator
'This class is reflective of the stored entries for the combined alternator 'And is used by the Combined Alternator Form and any related classes.
'And is used by the Combined Alternator Form and any related classes.
Public Class CombinedAlternatorMapRow
Public Class CombinedAlternatorMapRow Implements ICombinedAlternatorMapRow
Implements ICombinedAlternatorMapRow
Public Property AlternatorName As String Implements ICombinedAlternatorMapRow.AlternatorName
Public Property AlternatorName As String implements ICombinedAlternatorMapRow.AlternatorName Public Property RPM As Single Implements ICombinedAlternatorMapRow.RPM
Public Property RPM As Single implements ICombinedAlternatorMapRow.RPM Public Property Amps As Single Implements ICombinedAlternatorMapRow.Amps
Public Property Amps As Single implements ICombinedAlternatorMapRow.Amps Public Property Efficiency As Single Implements ICombinedAlternatorMapRow.Efficiency
Public Property Efficiency As Single implements ICombinedAlternatorMapRow.Efficiency Public Property PulleyRatio As Single Implements ICombinedAlternatorMapRow.PulleyRatio
Public Property PulleyRatio As Single implements ICombinedAlternatorMapRow.PulleyRatio
'Constructors
'Constructors Sub New()
Sub new () End Sub
Sub New(AlternatorName As String, RPM As Single, Amps As Single, Efficiency As Single, PulleyRatio As Single)
End Sub
'Sanity Check
Sub new (AlternatorName As string, RPM As single ,Amps As single, Efficiency As single , PulleyRatio As single ) If AlternatorName.Trim.Length = 0 Then Throw New ArgumentException("Alternator name cannot be zero length")
If Efficiency < 0 Or Efficiency > 100 Then _
'Sanity Check Throw New ArgumentException("Alternator Efficiency must be between 0 and 100")
If AlternatorName.Trim.Length=0 then Throw New ArgumentException("Alternator name cannot be zero length") If PulleyRatio <= 0 Then Throw New ArgumentException("Alternator Pully ratio must be a positive number")
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
'Assignments Me.RPM = RPM
Me.AlternatorName = AlternatorName Me.Amps = Amps
Me.RPM = RPM Me.Efficiency = Efficiency
Me.Amps = Amps Me.PulleyRatio = PulleyRatio
Me.Efficiency = Efficiency End Sub
Me.PulleyRatio = PulleyRatio End Class
End Sub
End Class
End Namespace 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