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

Skip to content
Snippets Groups Projects
Commit 5fb416dd authored by Michael KRISPER's avatar Michael KRISPER
Browse files

VehicleForm: Enable/Disable field ATEcoRollLockupClutch and Cleaned up UpdateForm

parent 20a365e2
No related branches found
No related tags found
No related merge requests found
......@@ -521,69 +521,122 @@ Public Class VehicleForm
Private Sub UpdateForm(vehType As VectoSimulationJobType)
VehicleType = vehType
gbVehicleIdlingSpeed.Enabled = True
gbTankSystem.Enabled = True
gbAngledrive.Enabled = True
tcVehicleComponents.TabPages.Remove(tpGensetComponents)
tcVehicleComponents.TabPages.Remove(tpElectricComponents)
If Not tcVehicleComponents.TabPages.Contains(tpElectricComponents) Then
tcVehicleComponents.TabPages.Insert(2, tpElectricComponents)
tpElectricComponents.BindingContext = BindingContext
End If
If Not tcVehicleComponents.TabPages.Contains(tpGensetComponents) Then
tcVehicleComponents.TabPages.Insert(3, tpGensetComponents)
tpGensetComponents.BindingContext = BindingContext
End If
If Not tcVehicleComponents.TabPages.Contains(tpTorqueLimits) Then
tcVehicleComponents.TabPages.Insert(4, tpTorqueLimits)
tpTorqueLimits.BindingContext = BindingContext
End If
Select Case vehType
Case VectoSimulationJobType.ConventionalVehicle
lblTitle.Text = "Conventional Vehicle"
'Powertrain ---------------------------------------------------------------
gbVehicleIdlingSpeed.Enabled = True
gbTankSystem.Enabled = True
gbRetarderLosses.Enabled = True
cbEmPos.DataSource = EnumHelper.GetKeyValuePairs(Of PowertrainPosition) _
(Function(t) t.GetLabel(), Function(t) t = PowertrainPosition.HybridPositionNotSet)
gbAngledrive.Enabled = True
'Electric Powertrain Components -------------------------------------------
tcVehicleComponents.TabPages.Remove(tpElectricComponents)
'GenSet Components --------------------------------------------------------
tcVehicleComponents.TabPages.Remove(tpGensetComponents)
'Torque Limits ------------------------------------------------------------
gbEMTorqueLimits.Enabled = False
'ADAS ---------------------------------------------------------------------
cbEngineStopStart.Enabled = True
cbAtEcoRollReleaseLockupClutch.Enabled = True
cbEcoRoll.DataSource = EnumHelper.GetKeyValuePairs(Of EcoRollType)(Function(t) t.GetName())
cbEcoRoll.Enabled = True
gbEMTorqueLimits.Enabled = False
Case VectoSimulationJobType.ParallelHybridVehicle
gbRetarderLosses.Enabled = True
lblTitle.Text = "Parallel Hybrid Vehicle"
'Powertrain ---------------------------------------------------------------
gbVehicleIdlingSpeed.Enabled = True
gbTankSystem.Enabled = True
gbRetarderLosses.Enabled = True
gbAngledrive.Enabled = True
'Electric Powertrain Components -------------------------------------------
cbEmPos.DataSource = EnumHelper.GetKeyValuePairs(Of PowertrainPosition) _
(Function(t) t.GetLabel(), Function(x) x.IsParallelHybrid())
'GenSet Components --------------------------------------------------------
tcVehicleComponents.TabPages.Remove(tpGensetComponents)
'Torque Limits ------------------------------------------------------------
gbEMTorqueLimits.Enabled = True
'ADAS ---------------------------------------------------------------------
cbEngineStopStart.Enabled = True
cbAtEcoRollReleaseLockupClutch.Enabled = False
cbEcoRoll.DataSource = EnumHelper.GetKeyValuePairs(Of EcoRollType)(Function(t) t.GetName())
cbEcoRoll.Enabled = True
If Not tcVehicleComponents.TabPages.Contains(tpElectricComponents) Then
tcVehicleComponents.TabPages.Insert(2, tpElectricComponents)
tpElectricComponents.BindingContext = BindingContext
End If
Case VectoSimulationJobType.SerialHybridVehicle
gbRetarderLosses.Enabled = False
lblTitle.Text = "Serial Hybrid Vehicle"
'Powertrain ---------------------------------------------------------------
gbVehicleIdlingSpeed.Enabled = True
gbTankSystem.Enabled = True
gbRetarderLosses.Enabled = False
gbAngledrive.Enabled = True
'Electric Powertrain Components -------------------------------------------
cbEmPos.DataSource = EnumHelper.GetKeyValuePairs(Of PowertrainPosition) _
(Function(t) t.GetLabel(), Function(x) x.IsSerialHybrid())
'GenSet Components --------------------------------------------------------
'-
'Torque Limits ------------------------------------------------------------
gbEMTorqueLimits.Enabled = False
tpTorqueLimits.Enabled = False
cbEngineStopStart.Checked = False
'ADAS ---------------------------------------------------------------------
cbEngineStopStart.Enabled = False
cbEcoRoll.DataSource = {New With {.Key = EcoRollType.None, .Value = EcoRollType.None.GetName()}}
cbAtEcoRollReleaseLockupClutch.Enabled = False
cbEcoRoll.Enabled = False
gbEMTorqueLimits.Enabled = False
If Not tcVehicleComponents.TabPages.Contains(tpElectricComponents) Then
tcVehicleComponents.TabPages.Insert(2, tpElectricComponents)
tpElectricComponents.BindingContext = BindingContext
End If
If Not tcVehicleComponents.TabPages.Contains(tpGensetComponents) Then
tcVehicleComponents.TabPages.Insert(3, tpGensetComponents)
End If
cbEcoRoll.SelectedIndex = -1
Case VectoSimulationJobType.BatteryElectricVehicle
gbRetarderLosses.Enabled = False
lblTitle.Text = "Battery Electric Vehicle"
'Powertrain ---------------------------------------------------------------
gbVehicleIdlingSpeed.Enabled = False
gbTankSystem.Enabled = False
gbRetarderLosses.Enabled = False
gbAngledrive.Enabled = False
tpTorqueLimits.Enabled = False
'Electric Powertrain Components -------------------------------------------
cbEmPos.DataSource = EnumHelper.GetKeyValuePairs(Of PowertrainPosition) _
(Function(t) t.GetLabel(), Function(x) x.IsBatteryElectric())
cbEngineStopStart.Checked = False
'GenSet Components --------------------------------------------------------
tcVehicleComponents.TabPages.Remove(tpGensetComponents)
'Torque Limits ------------------------------------------------------------
gbEMTorqueLimits.Enabled = False
tcVehicleComponents.TabPages.Remove(tpTorqueLimits)
'ADAS ---------------------------------------------------------------------
cbEngineStopStart.Enabled = False
cbEcoRoll.DataSource = {New With {.Key = EcoRollType.None, .Value = EcoRollType.None.GetName()}}
cbAtEcoRollReleaseLockupClutch.Enabled = False
cbEcoRoll.Enabled = False
gbEMTorqueLimits.Enabled = False
If Not tcVehicleComponents.TabPages.Contains(tpElectricComponents) Then
tcVehicleComponents.TabPages.Insert(2, tpElectricComponents)
tpElectricComponents.BindingContext = BindingContext
End If
cbEcoRoll.SelectedIndex = -1
Case Else
If Not tcVehicleComponents.TabPages.Contains(tpElectricComponents) Then
tcVehicleComponents.TabPages.Insert(2, tpElectricComponents)
......@@ -595,6 +648,7 @@ Public Class VehicleForm
End If
End Select
End Sub
Private Function CreateListViewItem(axleNumber As Integer, share As Double, twinTire As Boolean, rrc As Double,
......@@ -1247,7 +1301,7 @@ Public Class VehicleForm
gbRetarderLosses.Enabled = False
TbRtRatio.Text = ""
TbRtPath.Text = ""
CbRtType.SelectedIndex = 0
CbRtType.SelectedIndex = -1
CType(CbRtType.DataSource, DataView).RowFilter = $"Key <> {CInt(RetarderType.AxlegearInputRetarder)}"
ElseIf PowertrainPosition.BatteryElectricE3.Equals(cbEmPos.SelectedValue) Then
gbRetarderLosses.Enabled = True
......
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