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 ccf2a11d authored by Stefanos DOUMPOULAKIS's avatar Stefanos DOUMPOULAKIS
Browse files

Merge branch 'issue-475' into 'amdm2/develop'

fix #475: fixed bugs in VTP job editor

See merge request vecto/vecto!180
parents ca18ec5c 5633ecb3
Branches
Tags
No related merge requests found
...@@ -1421,13 +1421,11 @@ lbFound: ...@@ -1421,13 +1421,11 @@ lbFound:
Try Try
Dim jobDataProvider As IInputDataProvider = JSONInputDataFactory.ReadComponentData(filePathOrType) 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 vtpEngineeringJob As IVTPEngineeringInputDataProvider = TryCast(jobDataProvider, IVTPEngineeringInputDataProvider)
Dim vtpDeclarationJob As IVTPDeclarationInputDataProvider = TryCast(jobDataProvider, IVTPDeclarationInputDataProvider) Dim vtpDeclarationJob As IVTPDeclarationInputDataProvider = TryCast(jobDataProvider, IVTPDeclarationInputDataProvider)
If vtpEngineeringJob Is Nothing AndAlso vtpDeclarationJob Is Nothing Then If vtpEngineeringJob Is Nothing AndAlso vtpDeclarationJob Is Nothing Then
If jobType = Nothing Then jobType = TryCast(jobDataProvider, IDeclarationJobInputData).JobType
ShowVectoJobForm(jobType) ShowVectoJobForm(jobType)
VectoJobForm.VECTOload2Form(filePathOrType) VectoJobForm.VECTOload2Form(filePathOrType)
Else Else
......
...@@ -207,7 +207,7 @@ Public Class VectoVTPJobForm ...@@ -207,7 +207,7 @@ Public Class VectoVTPJobForm
'Files ----------------------------- 'Files -----------------------------
TbVEH.Text = GetRelativePath(inputData.JobInputData.Vehicle.DataSource.SourceFile, _basePath) TbVEH.Text = GetRelativePath(inputData.JobInputData.Vehicle.DataSource.SourceFile, _basePath)
tbManufacturerRecord.Text = 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 Dim auxInput As IAuxiliariesDeclarationInputData = inputData.JobInputData.Vehicle.Components.AuxiliaryInputData
...@@ -408,6 +408,8 @@ Public Class VectoVTPJobForm ...@@ -408,6 +408,8 @@ Public Class VectoVTPJobForm
ToolStripStatusLabelGEN.Text = "" ToolStripStatusLabelGEN.Text = ""
_changed = False _changed = False
UpdatePic() UpdatePic()
_tqDriftLeftTextbox.Text = "0"
_tqDriftRightTextbox.Text = "0"
End Sub End Sub
Private Sub DeclInit() Private Sub DeclInit()
...@@ -446,7 +448,7 @@ Public Class VectoVTPJobForm ...@@ -446,7 +448,7 @@ Public Class VectoVTPJobForm
If File.Exists(vehicleFile) Then If File.Exists(vehicleFile) Then
Try Try
Dim inputData As IDeclarationInputDataProvider = 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 Dim auxiliaries As IList(Of IAuxiliaryDeclarationInputData) = inputData.JobInputData.Vehicle.Components.AuxiliaryInputData.Auxiliaries
...@@ -495,7 +497,7 @@ Public Class VectoVTPJobForm ...@@ -495,7 +497,7 @@ Public Class VectoVTPJobForm
If File.Exists(vehicleFile) Then If File.Exists(vehicleFile) Then
Try Try
Dim inputData As IDeclarationInputDataProvider = Dim inputData As IDeclarationInputDataProvider =
_xmlInputReader.CreateDeclaration(XmlReader.Create(vehicleFile)) _xmlInputReader.CreateDeclaration(vehicleFile, True)
Dim fuels As IList(Of IEngineFuelDeclarationInputData) = Dim fuels As IList(Of IEngineFuelDeclarationInputData) =
inputData.JobInputData.Vehicle.Components.EngineInputData.EngineModes.First().Fuels inputData.JobInputData.Vehicle.Components.EngineInputData.EngineModes.First().Fuels
...@@ -550,7 +552,7 @@ Public Class VectoVTPJobForm ...@@ -550,7 +552,7 @@ Public Class VectoVTPJobForm
If File.Exists(vehicleFile) Then If File.Exists(vehicleFile) Then
Try Try
Dim inputData As IDeclarationInputDataProvider = Dim inputData As IDeclarationInputDataProvider =
_xmlInputReader.CreateDeclaration(XmlReader.Create(vehicleFile)) _xmlInputReader.CreateDeclaration(vehicleFile, True)
Dim auxInput As IAuxiliariesDeclarationInputData = inputData.JobInputData.Vehicle.Components.AuxiliaryInputData Dim auxInput As IAuxiliariesDeclarationInputData = inputData.JobInputData.Vehicle.Components.AuxiliaryInputData
PopulateAuxiliaryList(auxInput) PopulateAuxiliaryList(auxInput)
Catch Catch
...@@ -733,7 +735,7 @@ Public Class VectoVTPJobForm ...@@ -733,7 +735,7 @@ Public Class VectoVTPJobForm
If File.Exists(vehicleFile) Then If File.Exists(vehicleFile) Then
Try Try
Dim inputData As IDeclarationInputDataProvider = Dim inputData As IDeclarationInputDataProvider =
_xmlInputReader.CreateDeclaration(XmlReader.Create(vehicleFile)) _xmlInputReader.CreateDeclaration(vehicleFile, True)
gearbox = inputData.JobInputData.Vehicle.Components.GearboxInputData gearbox = inputData.JobInputData.Vehicle.Components.GearboxInputData
Catch Catch
End Try End Try
...@@ -757,7 +759,7 @@ Public Class VectoVTPJobForm ...@@ -757,7 +759,7 @@ Public Class VectoVTPJobForm
If File.Exists(vehicleFile) Then If File.Exists(vehicleFile) Then
Try Try
Dim inputData As IDeclarationInputDataProvider = Dim inputData As IDeclarationInputDataProvider =
_xmlInputReader.CreateDeclaration(XmlReader.Create(vehicleFile)) _xmlInputReader.CreateDeclaration(vehicleFile, True)
engine = inputData.JobInputData.Vehicle.Components.EngineInputData engine = inputData.JobInputData.Vehicle.Components.EngineInputData
Catch Catch
Return Return
...@@ -848,7 +850,7 @@ Public Class VectoVTPJobForm ...@@ -848,7 +850,7 @@ Public Class VectoVTPJobForm
If File.Exists(vehicleFile) Then If File.Exists(vehicleFile) Then
Try Try
Dim inputData As IDeclarationInputDataProvider = Dim inputData As IDeclarationInputDataProvider =
_xmlInputReader.CreateDeclaration(XmlReader.Create(vehicleFile)) _xmlInputReader.CreateDeclaration(vehicleFile, True)
vehicle = inputData.JobInputData.Vehicle vehicle = inputData.JobInputData.Vehicle
Catch Catch
End Try End Try
......
...@@ -122,7 +122,7 @@ Public Class VectoVTPJob ...@@ -122,7 +122,7 @@ Public Class VectoVTPJob
Get Get
If Not File.Exists(_vehicleFile.FullPath) Then Return Nothing If Not File.Exists(_vehicleFile.FullPath) Then Return Nothing
'Return New JSONComponentInputData(_vehicleFile.FullPath).JobInputData.Vehicle '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 Get
End Property End Property
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment