Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit d5370e71 authored by Raphael Kalchgruber's avatar Raphael Kalchgruber
Browse files

gearbox transmisson types

parent fc53984a
Branches
Tags
No related merge requests found
...@@ -81,17 +81,54 @@ Public Class GearboxForm ...@@ -81,17 +81,54 @@ Public Class GearboxForm
CbGStype.ValueMember = "Value" CbGStype.ValueMember = "Value"
CbGStype.DisplayMember = "Label" CbGStype.DisplayMember = "Label"
CbGStype.DataSource = [Enum].GetValues(GetType(GearboxType)) _ ' CbGStype.DataSource = [Enum].GetValues(GetType(GearboxType)) _
.Cast(Of GearboxType)() _ ' .Cast(Of GearboxType)() _
.Where(Function(type) type.ManualTransmission() OrElse type.AutomaticTransmission() OrElse type = GearboxType.IHPC OrElse type = GearboxType.IEPC) _ ' .Where(Function(type) type.ManualTransmission() OrElse type.AutomaticTransmission() OrElse type = GearboxType.IHPC OrElse type = GearboxType.IEPC) _
.Select(Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList() ' .Select(Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList()
SetupTransmissionTypes()
DeclInit() DeclInit()
_changed = False _changed = False
NewGbx() NewGbx()
End Sub End Sub
private sub SetupTransmissionTypes()
Select case VectoJobForm.JobType
Case VectoSimulationJobType.ConventionalVehicle
CbGStype.DataSource = [Enum].GetValues(GetType(GearboxType)) _
.Cast(Of GearboxType)() _
.Where(Function(type) Not type = GearboxType.APTN And (type.ManualTransmission() OrElse type = GearboxType.ATSerial)) _
.Select(Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList()
Case VectoSimulationJobType.IHPC
CbGStype.DataSource = [Enum].GetValues(GetType(GearboxType)) _
.Cast(Of GearboxType)() _
.Where(Function(type) type = GearboxType.IHPC ) _
.Select(Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList()
Case VectoSimulationJobType.IEPC_E,VectoSimulationJobType.IEPC_S
CbGStype.DataSource = [Enum].GetValues(GetType(GearboxType)) _
.Cast(Of GearboxType)() _
.Where(Function(type) type = GearboxType.IEPC) _
.Select(Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList()
Case VectoSimulationJobType.ParallelHybridVehicle, VectoSimulationJobType.SerialHybridVehicle
CbGStype.DataSource = [Enum].GetValues(GetType(GearboxType)) _
.Cast(Of GearboxType)() _
.Where(Function(type) type.ManualTransmission() OrElse type.AutomaticTransmission() and not type = GearboxType.IHPC ) _
.Select(Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList()
Case Else
CbGStype.DataSource = [Enum].GetValues(GetType(GearboxType)) _
.Cast(Of GearboxType)() _
.Where(Function(type) type.ManualTransmission() OrElse type.AutomaticTransmission() OrElse type = GearboxType.IHPC OrElse type = GearboxType.IEPC) _
.Select(Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList()
End Select
End sub
'Set generic values for Declaration mode. 'Set generic values for Declaration mode.
Private Sub DeclInit() Private Sub DeclInit()
Dim gbxType As GearboxType Dim gbxType As GearboxType
......
...@@ -848,5 +848,5 @@ Public Class IEPCForm ...@@ -848,5 +848,5 @@ Public Class IEPCForm
Else Else
MsgBox("File not found!") MsgBox("File not found!")
End If End If
End Subs End Sub
End Class End Class
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment