diff --git a/VECTO/GUI/MainForm.vb b/VECTO/GUI/MainForm.vb index a1edebe4c2848950e7063ff79439c071634948f6..cd0b0880cf521c5a26dc0cf08dcac2620e06154f 100644 --- a/VECTO/GUI/MainForm.vb +++ b/VECTO/GUI/MainForm.vb @@ -1421,13 +1421,11 @@ lbFound: Try Dim jobDataProvider As IInputDataProvider = JSONInputDataFactory.ReadComponentData(filePathOrType) - 'Declaration is the base class for EngineeringJobInputData, hence is valid for both Eng. and Decl. - If jobType = Nothing Then jobType = TryCast(jobDataProvider, IDeclarationJobInputData).JobType - Dim vtpEngineeringJob As IVTPEngineeringInputDataProvider = TryCast(jobDataProvider, IVTPEngineeringInputDataProvider) Dim vtpDeclarationJob As IVTPDeclarationInputDataProvider = TryCast(jobDataProvider, IVTPDeclarationInputDataProvider) If vtpEngineeringJob Is Nothing AndAlso vtpDeclarationJob Is Nothing Then + If jobType = Nothing Then jobType = TryCast(jobDataProvider, IDeclarationJobInputData).JobType ShowVectoJobForm(jobType) VectoJobForm.VECTOload2Form(filePathOrType) Else diff --git a/VECTO/GUI/VectoVTPJobForm.vb b/VECTO/GUI/VectoVTPJobForm.vb index ea14535989102ad9c2408b16b809ac00ebf232d8..66307ecb983710552ec1d1dfc84588a2868cf736 100644 --- a/VECTO/GUI/VectoVTPJobForm.vb +++ b/VECTO/GUI/VectoVTPJobForm.vb @@ -207,7 +207,7 @@ Public Class VectoVTPJobForm 'Files ----------------------------- TbVEH.Text = GetRelativePath(inputData.JobInputData.Vehicle.DataSource.SourceFile, _basePath) tbManufacturerRecord.Text = - If(Cfg.DeclMode, GetRelativePath(inputData.JobInputData.ManufacturerReportInputData.Source, _basePath), "") + If(Cfg.DeclMode, inputData.JobInputData.ManufacturerReportInputData.Source, "") Dim auxInput As IAuxiliariesDeclarationInputData = inputData.JobInputData.Vehicle.Components.AuxiliaryInputData @@ -408,6 +408,8 @@ Public Class VectoVTPJobForm ToolStripStatusLabelGEN.Text = "" _changed = False UpdatePic() + _tqDriftLeftTextbox.Text = "0" + _tqDriftRightTextbox.Text = "0" End Sub Private Sub DeclInit() @@ -446,7 +448,7 @@ Public Class VectoVTPJobForm If File.Exists(vehicleFile) Then Try Dim inputData As IDeclarationInputDataProvider = - _xmlInputReader.CreateDeclaration(XmlReader.Create(vehicleFile)) + _xmlInputReader.CreateDeclaration(vehicleFile, True) Dim auxiliaries As IList(Of IAuxiliaryDeclarationInputData) = inputData.JobInputData.Vehicle.Components.AuxiliaryInputData.Auxiliaries @@ -495,7 +497,7 @@ Public Class VectoVTPJobForm If File.Exists(vehicleFile) Then Try Dim inputData As IDeclarationInputDataProvider = - _xmlInputReader.CreateDeclaration(XmlReader.Create(vehicleFile)) + _xmlInputReader.CreateDeclaration(vehicleFile, True) Dim fuels As IList(Of IEngineFuelDeclarationInputData) = inputData.JobInputData.Vehicle.Components.EngineInputData.EngineModes.First().Fuels @@ -550,7 +552,7 @@ Public Class VectoVTPJobForm If File.Exists(vehicleFile) Then Try Dim inputData As IDeclarationInputDataProvider = - _xmlInputReader.CreateDeclaration(XmlReader.Create(vehicleFile)) + _xmlInputReader.CreateDeclaration(vehicleFile, True) Dim auxInput As IAuxiliariesDeclarationInputData = inputData.JobInputData.Vehicle.Components.AuxiliaryInputData PopulateAuxiliaryList(auxInput) Catch @@ -733,7 +735,7 @@ Public Class VectoVTPJobForm If File.Exists(vehicleFile) Then Try Dim inputData As IDeclarationInputDataProvider = - _xmlInputReader.CreateDeclaration(XmlReader.Create(vehicleFile)) + _xmlInputReader.CreateDeclaration(vehicleFile, True) gearbox = inputData.JobInputData.Vehicle.Components.GearboxInputData Catch End Try @@ -757,7 +759,7 @@ Public Class VectoVTPJobForm If File.Exists(vehicleFile) Then Try Dim inputData As IDeclarationInputDataProvider = - _xmlInputReader.CreateDeclaration(XmlReader.Create(vehicleFile)) + _xmlInputReader.CreateDeclaration(vehicleFile, True) engine = inputData.JobInputData.Vehicle.Components.EngineInputData Catch Return @@ -848,7 +850,7 @@ Public Class VectoVTPJobForm If File.Exists(vehicleFile) Then Try Dim inputData As IDeclarationInputDataProvider = - _xmlInputReader.CreateDeclaration(XmlReader.Create(vehicleFile)) + _xmlInputReader.CreateDeclaration(vehicleFile, True) vehicle = inputData.JobInputData.Vehicle Catch End Try diff --git a/VECTO/Input Files/VectoEPTPJob.vb b/VECTO/Input Files/VectoEPTPJob.vb index 8a2ed5dbf7cd0dadf00dd1e1998f96a80f2a2cc4..bb85debae7ba786c2ece5078ec10a30f2877e3b7 100644 --- a/VECTO/Input Files/VectoEPTPJob.vb +++ b/VECTO/Input Files/VectoEPTPJob.vb @@ -122,7 +122,7 @@ Public Class VectoVTPJob Get If Not File.Exists(_vehicleFile.FullPath) Then Return Nothing 'Return New JSONComponentInputData(_vehicleFile.FullPath).JobInputData.Vehicle - Return _xmlInputReader.CreateDeclaration(_vehicleFile.FullPath).JobInputData.Vehicle + Return _xmlInputReader.CreateDeclaration(_vehicleFile.FullPath, True).JobInputData.Vehicle End Get End Property