Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 8bd9b3e2 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

formatting

parent 4ba964bb
No related branches found
No related tags found
No related merge requests found
......@@ -70,12 +70,12 @@ Public Class GearboxForm
If Cfg.DeclMode Then
CbGStype.DataSource = [Enum].GetValues(GetType(GearboxType)) _
.Cast (Of GearboxType)() _
.Cast(Of GearboxType)() _
.Where(Function(type) type.ManualTransmission()) _
.Select(Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList()
Else
CbGStype.DataSource = [Enum].GetValues(GetType(GearboxType)) _
.Cast (Of GearboxType) _
.Cast(Of GearboxType) _
.Where(Function(type) type.AutomaticTransmission() OrElse type.ManualTransmission()) _
.Select(Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList()
End If
......@@ -101,10 +101,10 @@ Public Class GearboxForm
TbMinTimeBetweenShifts.Text = DeclarationData.Gearbox.MinTimeBetweenGearshifts.ToGUIFormat()
'cDeclaration.MinTimeBetweenGearshift(GStype)
TbTqResv.Text = (DeclarationData.Gearbox.TorqueReserve*100).ToGUIFormat() ' cDeclaration.TqResv
TbTqResvStart.Text = (DeclarationData.Gearbox.TorqueReserveStart*100).ToGUIFormat() 'cDeclaration.TqResvStart
TbStartSpeed.Text = DeclarationData.Gearbox.StartSpeed.ToGUIFormat() 'cDeclaration.StartSpeed
TbStartAcc.Text = DeclarationData.Gearbox.StartAcceleration.ToGUIFormat() ' cDeclaration.StartAcc
TbTqResv.Text = (DeclarationData.Gearbox.TorqueReserve * 100).ToGUIFormat() ' cDeclaration.TqResv
TbTqResvStart.Text = (DeclarationData.Gearbox.TorqueReserveStart * 100).ToGUIFormat() 'cDeclaration.TqResvStart
TbStartSpeed.Text = DeclarationData.Gearbox.StartSpeed.ToGUIFormat() 'cDeclaration.StartSpeed
TbStartAcc.Text = DeclarationData.Gearbox.StartAcceleration.ToGUIFormat() ' cDeclaration.StartAcc
tbUpshiftMinAcceleration.Text = DeclarationData.Gearbox.UpshiftMinAcceleration.ToGUIFormat()
tbTCCUpshiftMinAcceleration.Text = ""
......@@ -200,9 +200,9 @@ Public Class GearboxForm
'Me.ChSkipGears.Checked = False 'set by CbGStype.SelectedIndexChanged
'Me.ChShiftInside.Checked = False 'set by CbGStype.SelectedIndexChanged
TbTqResv.Text = (DeclarationData.Gearbox.TorqueReserve*100).ToGUIFormat()
TbTqResv.Text = (DeclarationData.Gearbox.TorqueReserve * 100).ToGUIFormat()
TbMinTimeBetweenShifts.Text = DeclarationData.Gearbox.MinTimeBetweenGearshifts.ToGUIFormat()
TbTqResvStart.Text = (DeclarationData.Gearbox.TorqueReserveStart*100).ToGUIFormat()
TbTqResvStart.Text = (DeclarationData.Gearbox.TorqueReserveStart * 100).ToGUIFormat()
TbStartSpeed.Text = DeclarationData.Gearbox.StartSpeed.ToGUIFormat() ' in m/s!
TbStartAcc.Text = DeclarationData.Gearbox.StartAcceleration.ToGUIFormat()
......@@ -237,7 +237,7 @@ Public Class GearboxForm
If ChangeCheckCancel() Then Exit Sub
Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(file),
Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(file),
IEngineeringInputDataProvider)
Dim gearbox As IGearboxEngineeringInputData = inputData.GearboxInputData
Dim axlegear As IAxleGearInputData = inputData.AxleGearInputData
......@@ -248,7 +248,7 @@ Public Class GearboxForm
Close()
MainForm.RbDecl.Checked = Not MainForm.RbDecl.Checked
MainForm.OpenVectoFile(file)
Case - 1
Case -1
Exit Sub
End Select
End If
......@@ -282,9 +282,9 @@ Public Class GearboxForm
If(gear.MaxTorque Is Nothing, "", gear.MaxTorque.ToGUIFormat())))
Next
TbTqResv.Text = (gearbox.TorqueReserve*100).ToGUIFormat()
TbTqResv.Text = (gearbox.TorqueReserve * 100).ToGUIFormat()
TbMinTimeBetweenShifts.Text = gearbox.MinTimeBetweenGearshift.ToGUIFormat()
TbTqResvStart.Text = (gearbox.StartTorqueReserve*100).ToGUIFormat()
TbTqResvStart.Text = (gearbox.StartTorqueReserve * 100).ToGUIFormat()
TbStartSpeed.Text = gearbox.StartSpeed.ToGUIFormat()
TbStartAcc.Text = gearbox.StartAcceleration.ToGUIFormat()
......@@ -766,7 +766,7 @@ Public Class GearboxForm
Dim jobFile As String = VectoJobForm.VectoFile
If Not jobFile Is Nothing AndAlso File.Exists(jobFile) Then
Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadJsonJob(jobFile),
Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadJsonJob(jobFile),
IEngineeringInputDataProvider)
If (inputData Is Nothing) Then
Exit Sub
......
......@@ -71,7 +71,7 @@ Public Class VectoJobForm
TabControl1.TabPages(x).Show()
Next
LvAux.Columns(AuxViewColumns.AuxInputOrTech).Width = - 2
LvAux.Columns(AuxViewColumns.AuxInputOrTech).Width = -2
'Declaration Mode
If Cfg.DeclMode Then
......@@ -393,7 +393,7 @@ Public Class VectoJobForm
Dim vectoJob As IEngineeringJobInputData = Nothing
Dim inputData As IEngineeringInputDataProvider = Nothing
Try
inputData = TryCast(JSONInputDataFactory.ReadComponentData(file),
inputData = TryCast(JSONInputDataFactory.ReadComponentData(file),
IEngineeringInputDataProvider)
vectoJob = inputData.JobInputData()
Catch ex As Exception
......@@ -408,7 +408,7 @@ Public Class VectoJobForm
Close()
MainForm.RbDecl.Checked = Not MainForm.RbDecl.Checked
MainForm.OpenVectoFile(file)
Case - 1
Case -1
Exit Sub
End Select
End If
......@@ -832,7 +832,7 @@ Public Class VectoJobForm
'_auxDialog.CbType.Text = ""
_auxDialog.TbID.Text = "" '!!! Set Type before ID, because changing the type will overwrite the id !!!
lbDlog:
lbDlog:
If _auxDialog.ShowDialog = DialogResult.OK Then
id = UCase(Trim(_auxDialog.TbID.Text))
......@@ -903,7 +903,7 @@ Public Class VectoJobForm
End If
Else
_auxDialog.CbTech.SelectedIndex = - 1
_auxDialog.CbTech.SelectedIndex = -1
_auxDialog.TbPath.Text = selItem.SubItems(AuxViewColumns.AuxInputOrTech).Text
End If
......@@ -1159,7 +1159,7 @@ Public Class VectoJobForm
If(Not String.IsNullOrWhiteSpace(VectoFile), Path.Combine(Path.GetDirectoryName(VectoFile), TbGBX.Text), TbGBX.Text)
If File.Exists(gearboxFile) Then
Try
Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(gearboxFile),
Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(gearboxFile),
IEngineeringInputDataProvider)
gearbox = inputData.GearboxInputData
Catch
......@@ -1242,7 +1242,7 @@ Public Class VectoJobForm
If(Not String.IsNullOrWhiteSpace(VectoFile), Path.Combine(Path.GetDirectoryName(VectoFile), TbENG.Text), TbENG.Text)
If File.Exists(engineFile) Then
Try
Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(engineFile),
Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(engineFile),
IEngineeringInputDataProvider)
engine = inputData.EngineInputData
Catch
......@@ -1285,10 +1285,10 @@ Public Class VectoJobForm
s.Name = "Motoring"
chart.Series.Add(s)
pmax = fullLoadCurve.MaxPower.Value()/1000 'FLD0.Pfull(FLD0.EngineRatedSpeed)
pmax = fullLoadCurve.MaxPower.Value() / 1000 'FLD0.Pfull(FLD0.EngineRatedSpeed)
TbEngTxt.Text = String.Format("{0} l {1} kw {2}", (engine.Displacement.Value()*1000).ToString("0.0"),
TbEngTxt.Text = String.Format("{0} l {1} kw {2}", (engine.Displacement.Value() * 1000).ToString("0.0"),
pmax.ToString("#"), engine.ModelName)
Dim fuelConsumptionMap As FuelConsumptionMap = FuelConsumptionMapReader.Create(engine.FuelConsumptionMap)
......@@ -1312,7 +1312,7 @@ Public Class VectoJobForm
If(Not String.IsNullOrWhiteSpace(VectoFile), Path.Combine(Path.GetDirectoryName(VectoFile), TbVEH.Text), TbVEH.Text)
If File.Exists(vehicleFile) Then
Try
Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(vehicleFile),
Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(vehicleFile),
IEngineeringInputDataProvider)
vehicle = inputData.VehicleInputData
Catch
......@@ -1325,7 +1325,7 @@ Public Class VectoJobForm
Dim s0 As Segment = Nothing
Try
s0 = DeclarationData.Segments.Lookup(vehicle.VehicleCategory, vehicle.AxleConfiguration, maxMass, 0.SI (Of Kilogram),
s0 = DeclarationData.Segments.Lookup(vehicle.VehicleCategory, vehicle.AxleConfiguration, maxMass, 0.SI(Of Kilogram),
True)
Catch
End Try
......@@ -1344,12 +1344,12 @@ Public Class VectoJobForm
End If
PicVehicle.Image = ConvPicPath(If(s0 Is Nothing, - 1, HDVclass.ToInt()), False) _
PicVehicle.Image = ConvPicPath(If(s0 Is Nothing, -1, HDVclass.ToInt()), False) _
'Image.FromFile(cDeclaration.ConvPicPath(HDVclass, False))
TbHVCclass.Text = String.Format("HDV Class {0}", HDVclass)
TbVehCat.Text = vehicle.VehicleCategory.GetCategoryName() 'ConvVehCat(VEH0.VehCat, True)
TbMass.Text = (vehicle.GrossVehicleMassRating.Value()/1000) & " t"
TbMass.Text = (vehicle.GrossVehicleMassRating.Value() / 1000) & " t"
TbAxleConf.Text = vehicle.AxleConfiguration.GetName() 'ConvAxleConf(VEH0.AxleConf)
End Sub
......@@ -1392,7 +1392,7 @@ Public Class VectoJobForm
Private Sub picAuxInfo_MouseEnter(sender As Object, e As EventArgs) Handles picAuxInfo.MouseEnter
If cboAdvancedAuxiliaries.SelectedIndex = - 1 Then Exit Sub
If cboAdvancedAuxiliaries.SelectedIndex = -1 Then Exit Sub
'Get tooltip
Dim item As AdvancedAuxiliary
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment