From 60efb5f79998c7a29efa30103d97661dcb98afaf Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <quaritsch@ivt.tugraz.at> Date: Thu, 16 Feb 2023 11:56:33 +0100 Subject: [PATCH] set jobtype in engine form and do not read gearbox type for serial hybrids --- VECTO/GUI/EngineForm.vb | 6 +++--- VECTO/GUI/VectoJobForm.vb | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/VECTO/GUI/EngineForm.vb b/VECTO/GUI/EngineForm.vb index e058b3223b..d555e8eced 100644 --- a/VECTO/GUI/EngineForm.vb +++ b/VECTO/GUI/EngineForm.vb @@ -36,10 +36,10 @@ Public Class EngineForm Private SecondFuelTab As TabPage private MechanicalWhrTab as TabPage private ElectricalWhrTab as TabPage + Public JobType As VectoSimulationJobType - - 'Before closing Editor: Check if file was changed and ask to save. + 'Before closing Editor: Check if file was changed and ask to save. Private Sub F_ENG_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing If e.CloseReason <> CloseReason.ApplicationExitCall And e.CloseReason <> CloseReason.WindowsShutDown Then e.Cancel = ChangeCheckCancel() @@ -99,7 +99,7 @@ Public Class EngineForm Dim gbxType as GearboxType = GearboxType.AMT Dim jobFile As String = VectoJobForm.VectoFile - If Not jobFile Is Nothing AndAlso File.Exists(jobFile) Then + If not JobType.IsOneOf(VectoSimulationJobType.SerialHybridVehicle, VectoSimulationJobType.IEPC_S) andalso Not jobFile Is Nothing AndAlso File.Exists(jobFile) Then Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadJsonJob(jobFile, true), IEngineeringInputDataProvider) diff --git a/VECTO/GUI/VectoJobForm.vb b/VECTO/GUI/VectoJobForm.vb index 165a3bacfe..81f9a9a681 100644 --- a/VECTO/GUI/VectoJobForm.vb +++ b/VECTO/GUI/VectoJobForm.vb @@ -313,6 +313,7 @@ Public Class VectoJobForm 'Thus Veh-file is returned EngineForm.JobDir = GetPath(VectoFile) EngineForm.AutoSendTo = True + EngineForm.JobType = JobType If Not Trim(f) = "" Then If Not File.Exists(f) Then @@ -1111,7 +1112,7 @@ Public Class VectoJobForm Case VectoSimulationJobType.IEPC_S pnEngine.Enabled = True pnGearbox.Enabled = True - GrAuxMech.Enabled = False + GrAuxMech.Enabled = Cfg.DeclMode pnShiftParams.Enabled = not Cfg.DeclMode gbEngineStopStart.Enabled = False pnHybridStrategy.Enabled = not Cfg.DeclMode -- GitLab