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 802c1543 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

display computed engine characteristics in GUI

parent 9f7000cd
No related branches found
No related tags found
No related merge requests found
......@@ -105,6 +105,7 @@ Partial Class EngineForm
Me.Label17 = New System.Windows.Forms.Label()
Me.Label18 = New System.Windows.Forms.Label()
Me.cbFuelType = New System.Windows.Forms.ComboBox()
Me.lblEngineCharacteristics = New System.Windows.Forms.Label()
Me.ToolStrip1.SuspendLayout()
Me.StatusStrip1.SuspendLayout()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
......@@ -575,7 +576,7 @@ Partial Class EngineForm
Me.PicBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.PicBox.Location = New System.Drawing.Point(499, 28)
Me.PicBox.Name = "PicBox"
Me.PicBox.Size = New System.Drawing.Size(474, 425)
Me.PicBox.Size = New System.Drawing.Size(474, 392)
Me.PicBox.TabIndex = 40
Me.PicBox.TabStop = False
'
......@@ -707,6 +708,14 @@ Partial Class EngineForm
Me.cbFuelType.Size = New System.Drawing.Size(143, 21)
Me.cbFuelType.TabIndex = 51
'
'lblEngineCharacteristics
'
Me.lblEngineCharacteristics.AutoSize = True
Me.lblEngineCharacteristics.Location = New System.Drawing.Point(500, 433)
Me.lblEngineCharacteristics.Name = "lblEngineCharacteristics"
Me.lblEngineCharacteristics.Size = New System.Drawing.Size(0, 13)
Me.lblEngineCharacteristics.TabIndex = 52
'
'EngineForm
'
Me.AcceptButton = Me.ButOK
......@@ -714,6 +723,7 @@ Partial Class EngineForm
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.CancelButton = Me.ButCancel
Me.ClientSize = New System.Drawing.Size(985, 508)
Me.Controls.Add(Me.lblEngineCharacteristics)
Me.Controls.Add(Me.cbFuelType)
Me.Controls.Add(Me.Label18)
Me.Controls.Add(Me.tbMaxTorque)
......@@ -842,4 +852,5 @@ Partial Class EngineForm
Friend WithEvents Label17 As System.Windows.Forms.Label
Friend WithEvents Label18 As System.Windows.Forms.Label
Friend WithEvents cbFuelType As System.Windows.Forms.ComboBox
Friend WithEvents lblEngineCharacteristics As System.Windows.Forms.Label
End Class
......@@ -385,6 +385,7 @@ Public Class EngineForm
Dim fullLoadCurve As EngineFullLoadCurve = Nothing
Dim fcMap As FuelConsumptionMap = Nothing
Dim engineCharacteristics As String = ""
PicBox.Image = Nothing
......@@ -433,6 +434,11 @@ Public Class EngineForm
series.Color = Color.Blue
series.Name = "Motoring (" & Path.GetFileNameWithoutExtension(TbMAP.Text) & ")"
chart.Series.Add(series)
engineCharacteristics +=
String.Format("Max. Torque: {0:F0} Nm; Max. Power: {1:F1} kW; n_rated: {2:F0} rpm; n_95h: {3:F0} rpm",
fullLoadCurve.MaxTorque.Value(), fullLoadCurve.MaxPower.Value() / 1000, fullLoadCurve.RatedSpeed.AsRPM,
fullLoadCurve.N95hSpeed.AsRPM)
End If
If Not fcMap Is Nothing Then
......@@ -475,6 +481,7 @@ Public Class EngineForm
PicBox.Image = img
lblEngineCharacteristics.Text = engineCharacteristics
End Sub
......
......@@ -128,6 +128,7 @@ Partial Class VectoJobForm
Me.TbGbxTxt = New System.Windows.Forms.TextBox()
Me.TbMass = New System.Windows.Forms.TextBox()
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.lblEngineCharacteristics = New System.Windows.Forms.Label()
Me.TabPgGen.SuspendLayout()
Me.GrCycles.SuspendLayout()
Me.GrAux.SuspendLayout()
......@@ -1093,7 +1094,7 @@ Partial Class VectoJobForm
Me.PicBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.PicBox.Location = New System.Drawing.Point(542, 266)
Me.PicBox.Name = "PicBox"
Me.PicBox.Size = New System.Drawing.Size(390, 327)
Me.PicBox.Size = New System.Drawing.Size(390, 296)
Me.PicBox.TabIndex = 36
Me.PicBox.TabStop = False
'
......@@ -1145,6 +1146,14 @@ Partial Class VectoJobForm
Me.TbMass.Size = New System.Drawing.Size(50, 20)
Me.TbMass.TabIndex = 3
'
'lblEngineCharacteristics
'
Me.lblEngineCharacteristics.AutoSize = True
Me.lblEngineCharacteristics.Location = New System.Drawing.Point(542, 565)
Me.lblEngineCharacteristics.Name = "lblEngineCharacteristics"
Me.lblEngineCharacteristics.Size = New System.Drawing.Size(0, 13)
Me.lblEngineCharacteristics.TabIndex = 37
'
'VectoJobForm
'
Me.AcceptButton = Me.ButOK
......@@ -1152,6 +1161,7 @@ Partial Class VectoJobForm
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.CancelButton = Me.ButCancel
Me.ClientSize = New System.Drawing.Size(944, 646)
Me.Controls.Add(Me.lblEngineCharacteristics)
Me.Controls.Add(Me.TbHVCclass)
Me.Controls.Add(Me.TbMass)
Me.Controls.Add(Me.TbAxleConf)
......@@ -1307,4 +1317,5 @@ Partial Class VectoJobForm
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents Label15 As System.Windows.Forms.Label
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents lblEngineCharacteristics As System.Windows.Forms.Label
End Class
......@@ -1221,6 +1221,7 @@ lbDlog:
Dim pmax As Double
Dim engine As IEngineEngineeringInputData = Nothing
lblEngineCharacteristics.Text = ""
Dim engineFile As String =
If(Not String.IsNullOrWhiteSpace(VectoFile), Path.Combine(Path.GetDirectoryName(VectoFile), TbENG.Text), TbENG.Text)
If File.Exists(engineFile) Then
......@@ -1284,6 +1285,12 @@ lbDlog:
s.Color = Color.Red
s.Name = "Map"
chart.Series.Add(s)
Dim engineCharacteristics As String =
String.Format("Max. Torque: {0:F0} Nm; Max. Power: {1:F1} kW; n_rated: {2:F0} rpm; n_95h: {3:F0} rpm",
fullLoadCurve.MaxTorque.Value(), fullLoadCurve.MaxPower.Value() / 1000, fullLoadCurve.RatedSpeed.AsRPM,
fullLoadCurve.N95hSpeed.AsRPM)
lblEngineCharacteristics.Text = engineCharacteristics
End Sub
Private Sub UpdateVehiclePic()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment