diff --git a/VECTO/GUI/EngineForm.vb b/VECTO/GUI/EngineForm.vb index e058b3223b0e79a65d33b23667fc63c2d354481f..d555e8eced9a403f5bd495b8a1f9a53fdc7606e4 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 165a3bacfecba34901a3c7454f2653a18c99d874..81f9a9a681567055275e3a91942e31ec858246e3 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