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 ce034075 authored by Michael KRISPER's avatar Michael KRISPER
Browse files

VehicleForm: Enable/Disable field ATEcoRollLockupClutch and Cleaned up UpdateForm

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