diff --git a/VECTO/File Browser/FileBrowserModule.vb b/VECTO/File Browser/FileBrowserModule.vb index 31de0ae1c5411180674af979d3a1f8202af35699..478604b571be66427fa9dc213b1d0ea0ef43cfe1 100644 --- a/VECTO/File Browser/FileBrowserModule.vb +++ b/VECTO/File Browser/FileBrowserModule.vb @@ -32,6 +32,7 @@ Public Module FileBrowserModule Public EngineFileBrowser As FileBrowser Public GearboxFileBrowser As FileBrowser + Public TCUFileBrowser As FileBrowser Public DriverAccelerationFileBrowser As FileBrowser Public DriverDecisionFactorTargetSpeedFileBrowser As FileBrowser Public DriverDecisionFactorVelocityDropFileBrowser As FileBrowser diff --git a/VECTO/GUI/GearboxForm.vb b/VECTO/GUI/GearboxForm.vb index c1a30f50dc1e9c01a17ade1c32cd76f70f9c704c..93e3acd6fd0f6b9adde257b55414555c6a668301 100644 --- a/VECTO/GUI/GearboxForm.vb +++ b/VECTO/GUI/GearboxForm.vb @@ -35,664 +35,664 @@ Imports TUGraz.VectoCore.Utils ''' </summary> ''' <remarks></remarks> Public Class GearboxForm - Private Enum GearboxTbl - GearNr = 0 - 'TorqueConverter = 1 - Ratio = 1 - LossMapEfficiency = 2 - ShiftPolygons = 3 - MaxTorque = 4 - MaxSpeed = 5 - End Enum - - Private _gbxFile As String = "" - Public AutoSendTo As Boolean = False - Public JobDir As String = "" - Private _gearDialog As GearboxGearDialog - - Private _changed As Boolean = False - - 'Before closing Editor: Check if file was changed and ask to save. - Private Sub F_GBX_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing - If e.CloseReason <> CloseReason.ApplicationExitCall And e.CloseReason <> CloseReason.WindowsShutDown Then - e.Cancel = ChangeCheckCancel() - End If - End Sub - - 'Initialise. - Private Sub F_GBX_Load(sender As Object, e As EventArgs) Handles Me.Load - - _gearDialog = New GearboxGearDialog - - PnInertiaTI.Enabled = Not Cfg.DeclMode - GrGearShift.Enabled = Not Cfg.DeclMode - 'ChTCon.Enabled = Not Cfg.DeclMode - - CbGStype.Items.Clear() - CbGStype.ValueMember = "Value" - CbGStype.DisplayMember = "Label" - - If (Cfg.DeclMode) Then - CbGStype.DataSource = [Enum].GetValues(GetType(GearboxType)) _ - .Cast(Of GearboxType)() _ - .Where(Function(type) type.ManualTransmission() OrElse type = GearboxType.ATSerial) _ - .Select(Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList() - Else - CbGStype.DataSource = [Enum].GetValues(GetType(GearboxType)) _ - .Cast(Of GearboxType)() _ - .Where(Function(type) type.ManualTransmission() OrElse type.AutomaticTransmission()) _ - .Select(Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList() - End If - DeclInit() - - _changed = False - NewGbx() - End Sub - - 'Set generic values for Declaration mode. - Private Sub DeclInit() - Dim gbxType As GearboxType - Dim lv0 As ListViewItem - - If Not Cfg.DeclMode Then Exit Sub - - TBI_getr.Text = DeclarationData.Gearbox.Inertia.ToGUIFormat() 'cDeclaration.GbInertia - - gbxType = CType(CbGStype.SelectedValue, GearboxType) 'CType(Me.CbGStype.SelectedIndex, tGearbox) - - TbTracInt.Text = gbxType.TractionInterruption().ToGUIFormat() - 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 - - tbUpshiftMinAcceleration.Text = DeclarationData.Gearbox.UpshiftMinAcceleration.ToGUIFormat() - tbTCCUpshiftMinAcceleration.Text = "" - tbTCLUpshiftMinAcceleration.Text = "" - - tbDownshiftAfterUpshift.Text = DeclarationData.Gearbox.DownshiftAfterUpshiftDelay.ToGUIFormat() - tbUpshiftAfterDownshift.Text = DeclarationData.Gearbox.UpshiftAfterDownshiftDelay.ToGUIFormat() - - 'ChTCon.Checked = GStype.AutomaticTransmission() - For Each lv0 In LvGears.Items - lv0.SubItems(GearboxTbl.ShiftPolygons).Text = "" - Next - End Sub + Private Enum GearboxTbl + GearNr = 0 + 'TorqueConverter = 1 + Ratio = 1 + LossMapEfficiency = 2 + ShiftPolygons = 3 + MaxTorque = 4 + MaxSpeed = 5 + End Enum + + Private _gbxFile As String = "" + Public AutoSendTo As Boolean = False + Public JobDir As String = "" + Private _gearDialog As GearboxGearDialog + + Private _changed As Boolean = False + + 'Before closing Editor: Check if file was changed and ask to save. + Private Sub F_GBX_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing + If e.CloseReason <> CloseReason.ApplicationExitCall And e.CloseReason <> CloseReason.WindowsShutDown Then + e.Cancel = ChangeCheckCancel() + End If + End Sub + + 'Initialise. + Private Sub F_GBX_Load(sender As Object, e As EventArgs) Handles Me.Load + + _gearDialog = New GearboxGearDialog + + PnInertiaTI.Enabled = Not Cfg.DeclMode + GrGearShift.Enabled = Not Cfg.DeclMode + 'ChTCon.Enabled = Not Cfg.DeclMode + + CbGStype.Items.Clear() + CbGStype.ValueMember = "Value" + CbGStype.DisplayMember = "Label" + + If (Cfg.DeclMode) Then + CbGStype.DataSource = [Enum].GetValues(GetType(GearboxType)) _ + .Cast(Of GearboxType)() _ + .Where(Function(type) type.ManualTransmission() OrElse type = GearboxType.ATSerial) _ + .Select(Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList() + Else + CbGStype.DataSource = [Enum].GetValues(GetType(GearboxType)) _ + .Cast(Of GearboxType)() _ + .Where(Function(type) type.ManualTransmission() OrElse type.AutomaticTransmission()) _ + .Select(Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList() + End If + DeclInit() + + _changed = False + NewGbx() + End Sub + + 'Set generic values for Declaration mode. + Private Sub DeclInit() + Dim gbxType As GearboxType + Dim lv0 As ListViewItem + + If Not Cfg.DeclMode Then Exit Sub + + TBI_getr.Text = DeclarationData.Gearbox.Inertia.ToGUIFormat() 'cDeclaration.GbInertia + + gbxType = CType(CbGStype.SelectedValue, GearboxType) 'CType(Me.CbGStype.SelectedIndex, tGearbox) + + TbTracInt.Text = gbxType.TractionInterruption().ToGUIFormat() + 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 + + tbUpshiftMinAcceleration.Text = DeclarationData.Gearbox.UpshiftMinAcceleration.ToGUIFormat() + tbTCCUpshiftMinAcceleration.Text = "" + tbTCLUpshiftMinAcceleration.Text = "" + + tbDownshiftAfterUpshift.Text = DeclarationData.Gearbox.DownshiftAfterUpshiftDelay.ToGUIFormat() + tbUpshiftAfterDownshift.Text = DeclarationData.Gearbox.UpshiftAfterDownshiftDelay.ToGUIFormat() + + 'ChTCon.Checked = GStype.AutomaticTransmission() + For Each lv0 In LvGears.Items + lv0.SubItems(GearboxTbl.ShiftPolygons).Text = "" + Next + End Sub #Region "Toolbar" - Private Sub ToolStripBtNew_Click(sender As Object, e As EventArgs) Handles ToolStripBtNew.Click - NewGbx() - End Sub - - Private Sub ToolStripBtOpen_Click(sender As Object, e As EventArgs) Handles ToolStripBtOpen.Click - If GearboxFileBrowser.OpenDialog(_gbxFile) Then - Try - OpenGbx(GearboxFileBrowser.Files(0), VehicleCategory.RigidTruck) - Catch ex As Exception - MsgBox("Failed to open Gearbox File: " + ex.Message) - End Try - End If - End Sub - - Private Sub ToolStripBtSave_Click(sender As Object, e As EventArgs) Handles ToolStripBtSave.Click - SaveOrSaveAs(False) - End Sub - - Private Sub ToolStripBtSaveAs_Click(sender As Object, e As EventArgs) Handles ToolStripBtSaveAs.Click - SaveOrSaveAs(True) - End Sub - - Private Sub ToolStripBtSendTo_Click(sender As Object, e As EventArgs) Handles ToolStripBtSendTo.Click - - If ChangeCheckCancel() Then Exit Sub - - If _gbxFile = "" Then - If MsgBox("Save file now?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then - If Not SaveOrSaveAs(True) Then Exit Sub - Else - Exit Sub - End If - End If - - If Not VectoJobForm.Visible Then - JobDir = "" - VectoJobForm.Show() - VectoJobForm.VectoNew() - Else - VectoJobForm.WindowState = FormWindowState.Normal - End If - - VectoJobForm.TbGBX.Text = GetFilenameWithoutDirectory(_gbxFile, JobDir) - End Sub - - 'Help - Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs) Handles ToolStripButton1.Click - If File.Exists(MyAppPath & "User Manual\help.html") Then - Dim defaultBrowserPath As String = BrowserUtils.GetDefaultBrowserPath() - Process.Start(defaultBrowserPath, - String.Format("""file://{0}{1}""", MyAppPath, "User Manual\help.html#gearbox-editor")) - Else - MsgBox("User Manual not found!", MsgBoxStyle.Critical) - End If - End Sub + Private Sub ToolStripBtNew_Click(sender As Object, e As EventArgs) Handles ToolStripBtNew.Click + NewGbx() + End Sub + + Private Sub ToolStripBtOpen_Click(sender As Object, e As EventArgs) Handles ToolStripBtOpen.Click + If GearboxFileBrowser.OpenDialog(_gbxFile) Then + Try + OpenGbx(GearboxFileBrowser.Files(0), VehicleCategory.RigidTruck) + Catch ex As Exception + MsgBox("Failed to open Gearbox File: " + ex.Message) + End Try + End If + End Sub + + Private Sub ToolStripBtSave_Click(sender As Object, e As EventArgs) Handles ToolStripBtSave.Click + SaveOrSaveAs(False) + End Sub + + Private Sub ToolStripBtSaveAs_Click(sender As Object, e As EventArgs) Handles ToolStripBtSaveAs.Click + SaveOrSaveAs(True) + End Sub + + Private Sub ToolStripBtSendTo_Click(sender As Object, e As EventArgs) Handles ToolStripBtSendTo.Click + + If ChangeCheckCancel() Then Exit Sub + + If _gbxFile = "" Then + If MsgBox("Save file now?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then + If Not SaveOrSaveAs(True) Then Exit Sub + Else + Exit Sub + End If + End If + + If Not VectoJobForm.Visible Then + JobDir = "" + VectoJobForm.Show() + VectoJobForm.VectoNew() + Else + VectoJobForm.WindowState = FormWindowState.Normal + End If + + VectoJobForm.TbGBX.Text = GetFilenameWithoutDirectory(_gbxFile, JobDir) + End Sub + + 'Help + Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs) Handles ToolStripButton1.Click + If File.Exists(MyAppPath & "User Manual\help.html") Then + Dim defaultBrowserPath As String = BrowserUtils.GetDefaultBrowserPath() + Process.Start(defaultBrowserPath, + String.Format("""file://{0}{1}""", MyAppPath, "User Manual\help.html#gearbox-editor")) + Else + MsgBox("User Manual not found!", MsgBoxStyle.Critical) + End If + End Sub #End Region - 'New file - Private Sub NewGbx() - 'Dim lvi As ListViewItem + 'New file + Private Sub NewGbx() + 'Dim lvi As ListViewItem - If ChangeCheckCancel() Then Exit Sub + If ChangeCheckCancel() Then Exit Sub - 'CbGStype.SelectedIndex = 0 - - TbName.Text = "" - TbTracInt.Text = "" - TBI_getr.Text = "" - - LvGears.Items.Clear() - - LvGears.Items.Add(CreateListviewItem("Axle", 1, "1", "", "", "")) - - 'Me.ChSkipGears.Checked = False 'set by CbGStype.SelectedIndexChanged - 'Me.ChShiftInside.Checked = False 'set by CbGStype.SelectedIndexChanged - TbTqResv.Text = (DeclarationData.Gearbox.TorqueReserve * 100).ToGUIFormat() - TbMinTimeBetweenShifts.Text = DeclarationData.Gearbox.MinTimeBetweenGearshifts.ToGUIFormat() - TbTqResvStart.Text = (DeclarationData.Gearbox.TorqueReserveStart * 100).ToGUIFormat() - TbStartSpeed.Text = DeclarationData.Gearbox.StartSpeed.ToGUIFormat() ' in m/s! - TbStartAcc.Text = DeclarationData.Gearbox.StartAcceleration.ToGUIFormat() - - tbUpshiftMinAcceleration.Text = DeclarationData.Gearbox.UpshiftMinAcceleration.ToGUIFormat() - tbTCLUpshiftMinAcceleration.Text = "" - tbTCCUpshiftMinAcceleration.Text = "" - - tbDownshiftAfterUpshift.Text = DeclarationData.Gearbox.DownshiftAfterUpshiftDelay.ToGUIFormat() - tbUpshiftAfterDownshift.Text = DeclarationData.Gearbox.UpshiftAfterDownshiftDelay.ToGUIFormat() - - 'ChTCon.Checked = False 'set by CbGStype.SelectedIndexChanged - TbTCfile.Text = "" - TbTCrefrpm.Text = "" - TbTCinertia.Text = "" - - DeclInit() - - _gbxFile = "" - Text = "GBX Editor" - LbStatus.Text = "" - - - _changed = False - Try - UpdatePic() - Catch - End Try - End Sub - - 'Open file - Public Sub OpenGbx(file As String, vehicleCategory As VehicleCategory) - - If ChangeCheckCancel() Then Exit Sub - - Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(file), - IEngineeringInputDataProvider) - Dim vehicle As IVehicleEngineeringInputData = inputData.JobInputData.Vehicle - Dim gearbox As IGearboxEngineeringInputData = vehicle.GearboxInputData - Dim axlegear As IAxleGearInputData = vehicle.AxleGearInputData - - _vehicleCategory = vehicleCategory - - If Cfg.DeclMode <> gearbox.SavedInDeclarationMode Then - Select Case WrongMode() - Case 1 - Close() - MainForm.RbDecl.Checked = Not MainForm.RbDecl.Checked - MainForm.OpenVectoFile(file) - Case -1 - Exit Sub - End Select - End If - - Dim basePath As String = Path.GetDirectoryName(file) - TbName.Text = gearbox.Model - TbTracInt.Text = gearbox.TractionInterruption.ToGUIFormat() - TBI_getr.Text = gearbox.Inertia.ToGUIFormat() - - LvGears.Items.Clear() - - Dim lossmap As String = "" - Try - lossmap = If(axlegear.LossMap Is Nothing, axlegear.Efficiency.ToGUIFormat(), - GetRelativePath(axlegear.LossMap.Source, basePath)) - Catch ex As Exception - End Try - - LvGears.Items.Add(CreateListviewItem("Axle", axlegear.Ratio, lossmap, "", "", "")) - - For Each gear As ITransmissionInputData In gearbox.Gears - lossmap = "" - Try - lossmap = If(gear.LossMap Is Nothing, gear.Efficiency.ToGUIFormat(), GetRelativePath(gear.LossMap.Source, basePath)) - Catch ex As Exception - - End Try - LvGears.Items.Add(CreateListviewItem(gear.Gear.ToString("00"), gear.Ratio, - lossmap, - If(gear.ShiftPolygon Is Nothing, "", GetRelativePath(gear.ShiftPolygon.Source, basePath)), - If(gear.MaxTorque Is Nothing, "", gear.MaxTorque.ToGUIFormat()), - If(gear.MaxInputSpeed Is Nothing, "", gear.MaxInputSpeed.AsRPM.ToGUIFormat()))) - Next - - TbTqResv.Text = (gearbox.TorqueReserve * 100).ToGUIFormat() - TbMinTimeBetweenShifts.Text = gearbox.MinTimeBetweenGearshift.ToGUIFormat() - TbTqResvStart.Text = (gearbox.StartTorqueReserve * 100).ToGUIFormat() - TbStartSpeed.Text = gearbox.StartSpeed.ToGUIFormat() - TbStartAcc.Text = gearbox.StartAcceleration.ToGUIFormat() - - Dim torqueConverter As ITorqueConverterEngineeringInputData = gearbox.TorqueConverter - If torqueConverter Is Nothing OrElse gearbox.Type.ManualTransmission() Then - TbTCfile.Text = "" - TbTCrefrpm.Text = "" - TbTCinertia.Text = "" - TBTCShiftPolygon.Text = "" - tbTCmaxSpeed.Text = "" - tbTCLUpshiftMinAcceleration.Text = "" - tbTCCUpshiftMinAcceleration.Text = "" - - Else - TbTCfile.Text = If(torqueConverter.TCData Is Nothing, "", GetRelativePath(torqueConverter.TCData.Source, basePath)) - TbTCrefrpm.Text = If(torqueConverter.ReferenceRPM Is Nothing, "", torqueConverter.ReferenceRPM.AsRPM.ToGUIFormat()) - TbTCinertia.Text = If(torqueConverter.Inertia Is Nothing, "", torqueConverter.Inertia.ToGUIFormat()) - TBTCShiftPolygon.Text = - If(torqueConverter.ShiftPolygon Is Nothing, "", GetRelativePath(torqueConverter.ShiftPolygon.Source, basePath)) - tbTCmaxSpeed.Text = - If(torqueConverter.MaxInputSpeed Is Nothing, "", torqueConverter.MaxInputSpeed.AsRPM.ToGUIFormat()) - tbTCLUpshiftMinAcceleration.Text = torqueConverter.CLUpshiftMinAcceleration.ToGUIFormat() - tbTCCUpshiftMinAcceleration.Text = torqueConverter.CCUpshiftMinAcceleration.ToGUIFormat() - End If - - tbUpshiftMinAcceleration.Text = gearbox.UpshiftMinAcceleration.ToGUIFormat() - tbDownshiftAfterUpshift.Text = gearbox.DownshiftAfterUpshiftDelay.ToGUIFormat() - tbUpshiftAfterDownshift.Text = gearbox.UpshiftAfterDownshiftDelay.ToGUIFormat() - - tbATShiftTime.Text = gearbox.PowershiftShiftTime.ToGUIFormat() - - CbGStype.SelectedValue = gearbox.Type - - - DeclInit() - - - GearboxFileBrowser.UpdateHistory(file) - Text = GetFilenameWithoutPath(file, True) - LbStatus.Text = "" - UpdateGearboxInfoText() - _gbxFile = file - Activate() - - _changed = False - Try - UpdatePic() - Catch - End Try - End Sub - - Private Function CreateListviewItem(gear As String, ratio As Double, getrMap As String, - shiftPolygon As String, maxTorque As String, maxSpeed As String) As ListViewItem - Dim retVal As ListViewItem = New ListViewItem(gear) - 'retVal.SubItems.Add(tc) - retVal.SubItems.Add(ratio.ToGUIFormat()) - retVal.SubItems.Add(getrMap) - retVal.SubItems.Add(shiftPolygon) - retVal.SubItems.Add(maxTorque) - retVal.SubItems.Add(maxSpeed) - Return retVal - End Function - - 'Save or Save As function = true if file is saved - Private Function SaveOrSaveAs(saveAs As Boolean) As Boolean - If _gbxFile = "" Or saveAs Then - If GearboxFileBrowser.SaveDialog(_gbxFile) Then - _gbxFile = GearboxFileBrowser.Files(0) - Else - Return False - End If - End If - Return SaveGbx(_gbxFile) - End Function - - 'Save file - Private Function SaveGbx(file As String) As Boolean - - Dim gearbox As Gearbox = FillGearboxData(file) - - - If Not gearbox.SaveFile Then - MsgBox("Cannot safe to " & file, MsgBoxStyle.Critical) - Return False - End If - - If AutoSendTo Then - If VectoJobForm.Visible Then - If UCase(FileRepl(VectoJobForm.TbGBX.Text, JobDir)) <> UCase(file) Then _ - VectoJobForm.TbGBX.Text = GetFilenameWithoutDirectory(file, JobDir) - VectoJobForm.UpdatePic() - End If - End If - - GearboxFileBrowser.UpdateHistory(file) - Text = GetFilenameWithoutPath(file, True) - LbStatus.Text = "" - - _changed = False - - Return True - End Function - - Private Function FillGearboxData(file As String) As Gearbox - Dim gearbox As Gearbox - Dim i As Integer - - gearbox = New Gearbox - gearbox.FilePath = file - - gearbox.ModelName = TbName.Text - If Trim(gearbox.ModelName) = "" Then gearbox.ModelName = "Undefined" - - gearbox.TracIntrSi = TbTracInt.Text.ToDouble(0) - gearbox.GbxInertia = TBI_getr.Text.ToDouble(0) - - For i = 0 To LvGears.Items.Count - 1 - 'GBX0.IsTCgear.Add(Me.LvGears.Items(i).SubItems(GearboxTbl.TorqueConverter).Text = "on" And i > 0) - gearbox.GearRatios.Add(LvGears.Items(i).SubItems(GearboxTbl.Ratio).Text.ToDouble(0)) - gearbox.GearLossmaps.Add(New SubPath) - gearbox.GearLossMap(i) = LvGears.Items(i).SubItems(GearboxTbl.LossMapEfficiency).Text - gearbox.GearshiftFiles.Add(New SubPath) - gearbox.ShiftPolygonFile(i) = LvGears.Items(i).SubItems(GearboxTbl.ShiftPolygons).Text - 'GBX0.FldFiles.Add(New cSubPath) - 'GBX0.FldFile(i) = Me.LvGears.Items(i).SubItems(GearboxTbl.MaxTorque).Text - gearbox.MaxTorque.Add(LvGears.Items(i).SubItems(GearboxTbl.MaxTorque).Text) - gearbox.MaxSpeed.Add(LvGears.Items(i).SubItems(GearboxTbl.MaxSpeed).Text) - Next - - gearbox.TorqueResv = TbTqResv.Text.ToDouble(0) - gearbox.ShiftTime = TbMinTimeBetweenShifts.Text.ToDouble(0) - gearbox.TorqueResvStart = TbTqResvStart.Text.ToDouble(0) - gearbox.StartSpeed = TbStartSpeed.Text.ToDouble(0) - gearbox.StartAcc = TbStartAcc.Text.ToDouble(0) - - gearbox.Type = CType(CbGStype.SelectedValue, GearboxType) - - gearbox.Type.AutomaticTransmission() - gearbox.TorqueConverterFile = TbTCfile.Text - gearbox.TorqueConverterReferenceRpm = TbTCrefrpm.Text.ToDouble(0) - gearbox.TorqueConverterInertia = TbTCinertia.Text.ToDouble(0) - gearbox.TorqueConverterShiftPolygonFile = TBTCShiftPolygon.Text - gearbox.TorqueConverterMaxSpeed = tbTCmaxSpeed.Text.ToDouble(0) - - gearbox.DownshiftAfterUpshift = tbDownshiftAfterUpshift.Text.ToDouble(0) - gearbox.UpshiftAfterDownshift = tbUpshiftAfterDownshift.Text.ToDouble(0) - - gearbox.UpshiftMinAcceleration = tbUpshiftMinAcceleration.Text.ToDouble(0) - gearbox.TCLUpshiftMinAcceleration = tbTCLUpshiftMinAcceleration.Text.ToDouble(0) - gearbox.TCCUpshiftMinAcceleration = tbTCCUpshiftMinAcceleration.Text.ToDouble(0) - - gearbox.PSShiftTime = tbATShiftTime.Text.ToDouble(0) - Return gearbox - End Function + 'CbGStype.SelectedIndex = 0 + + TbName.Text = "" + TbTracInt.Text = "" + TBI_getr.Text = "" + + LvGears.Items.Clear() + + LvGears.Items.Add(CreateListviewItem("Axle", 1, "1", "", "", "")) + + 'Me.ChSkipGears.Checked = False 'set by CbGStype.SelectedIndexChanged + 'Me.ChShiftInside.Checked = False 'set by CbGStype.SelectedIndexChanged + TbTqResv.Text = (DeclarationData.Gearbox.TorqueReserve * 100).ToGUIFormat() + TbMinTimeBetweenShifts.Text = DeclarationData.Gearbox.MinTimeBetweenGearshifts.ToGUIFormat() + TbTqResvStart.Text = (DeclarationData.Gearbox.TorqueReserveStart * 100).ToGUIFormat() + TbStartSpeed.Text = DeclarationData.Gearbox.StartSpeed.ToGUIFormat() ' in m/s! + TbStartAcc.Text = DeclarationData.Gearbox.StartAcceleration.ToGUIFormat() + + tbUpshiftMinAcceleration.Text = DeclarationData.Gearbox.UpshiftMinAcceleration.ToGUIFormat() + tbTCLUpshiftMinAcceleration.Text = "" + tbTCCUpshiftMinAcceleration.Text = "" + + tbDownshiftAfterUpshift.Text = DeclarationData.Gearbox.DownshiftAfterUpshiftDelay.ToGUIFormat() + tbUpshiftAfterDownshift.Text = DeclarationData.Gearbox.UpshiftAfterDownshiftDelay.ToGUIFormat() + + 'ChTCon.Checked = False 'set by CbGStype.SelectedIndexChanged + TbTCfile.Text = "" + TbTCrefrpm.Text = "" + TbTCinertia.Text = "" + + DeclInit() + + _gbxFile = "" + Text = "GBX Editor" + LbStatus.Text = "" + + + _changed = False + Try + UpdatePic() + Catch + End Try + End Sub + + 'Open file + Public Sub OpenGbx(file As String, vehicleCategory As VehicleCategory) + + If ChangeCheckCancel() Then Exit Sub + + Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(file), + IEngineeringInputDataProvider) + Dim vehicle As IVehicleEngineeringInputData = inputData.JobInputData.Vehicle + Dim gearbox As IGearboxEngineeringInputData = vehicle.GearboxInputData + Dim axlegear As IAxleGearInputData = vehicle.AxleGearInputData + + _vehicleCategory = vehicleCategory + + If Cfg.DeclMode <> gearbox.SavedInDeclarationMode Then + Select Case WrongMode() + Case 1 + Close() + MainForm.RbDecl.Checked = Not MainForm.RbDecl.Checked + MainForm.OpenVectoFile(file) + Case -1 + Exit Sub + End Select + End If + + Dim basePath As String = Path.GetDirectoryName(file) + TbName.Text = gearbox.Model + TbTracInt.Text = gearbox.TractionInterruption.ToGUIFormat() + TBI_getr.Text = gearbox.Inertia.ToGUIFormat() + + LvGears.Items.Clear() + + Dim lossmap As String = "" + Try + lossmap = If(axlegear.LossMap Is Nothing, axlegear.Efficiency.ToGUIFormat(), + GetRelativePath(axlegear.LossMap.Source, basePath)) + Catch ex As Exception + End Try + + LvGears.Items.Add(CreateListviewItem("Axle", axlegear.Ratio, lossmap, "", "", "")) + + For Each gear As ITransmissionInputData In gearbox.Gears + lossmap = "" + Try + lossmap = If(gear.LossMap Is Nothing, gear.Efficiency.ToGUIFormat(), GetRelativePath(gear.LossMap.Source, basePath)) + Catch ex As Exception + + End Try + LvGears.Items.Add(CreateListviewItem(gear.Gear.ToString("00"), gear.Ratio, + lossmap, + If(gear.ShiftPolygon Is Nothing, "", GetRelativePath(gear.ShiftPolygon.Source, basePath)), + If(gear.MaxTorque Is Nothing, "", gear.MaxTorque.ToGUIFormat()), + If(gear.MaxInputSpeed Is Nothing, "", gear.MaxInputSpeed.AsRPM.ToGUIFormat()))) + Next + + TbTqResv.Text = (gearbox.TorqueReserve * 100).ToGUIFormat() + TbMinTimeBetweenShifts.Text = gearbox.MinTimeBetweenGearshift.ToGUIFormat() + TbTqResvStart.Text = (gearbox.StartTorqueReserve * 100).ToGUIFormat() + TbStartSpeed.Text = gearbox.StartSpeed.ToGUIFormat() + TbStartAcc.Text = gearbox.StartAcceleration.ToGUIFormat() + + Dim torqueConverter As ITorqueConverterEngineeringInputData = gearbox.TorqueConverter + If torqueConverter Is Nothing OrElse gearbox.Type.ManualTransmission() Then + TbTCfile.Text = "" + TbTCrefrpm.Text = "" + TbTCinertia.Text = "" + TBTCShiftPolygon.Text = "" + tbTCmaxSpeed.Text = "" + tbTCLUpshiftMinAcceleration.Text = "" + tbTCCUpshiftMinAcceleration.Text = "" + + Else + TbTCfile.Text = If(torqueConverter.TCData Is Nothing, "", GetRelativePath(torqueConverter.TCData.Source, basePath)) + TbTCrefrpm.Text = If(torqueConverter.ReferenceRPM Is Nothing, "", torqueConverter.ReferenceRPM.AsRPM.ToGUIFormat()) + TbTCinertia.Text = If(torqueConverter.Inertia Is Nothing, "", torqueConverter.Inertia.ToGUIFormat()) + TBTCShiftPolygon.Text = + If(torqueConverter.ShiftPolygon Is Nothing, "", GetRelativePath(torqueConverter.ShiftPolygon.Source, basePath)) + tbTCmaxSpeed.Text = + If(torqueConverter.MaxInputSpeed Is Nothing, "", torqueConverter.MaxInputSpeed.AsRPM.ToGUIFormat()) + tbTCLUpshiftMinAcceleration.Text = torqueConverter.CLUpshiftMinAcceleration.ToGUIFormat() + tbTCCUpshiftMinAcceleration.Text = torqueConverter.CCUpshiftMinAcceleration.ToGUIFormat() + End If + + tbUpshiftMinAcceleration.Text = gearbox.UpshiftMinAcceleration.ToGUIFormat() + tbDownshiftAfterUpshift.Text = gearbox.DownshiftAfterUpshiftDelay.ToGUIFormat() + tbUpshiftAfterDownshift.Text = gearbox.UpshiftAfterDownshiftDelay.ToGUIFormat() + + tbATShiftTime.Text = gearbox.PowershiftShiftTime.ToGUIFormat() + + CbGStype.SelectedValue = gearbox.Type + + + DeclInit() + + + GearboxFileBrowser.UpdateHistory(file) + Text = GetFilenameWithoutPath(file, True) + LbStatus.Text = "" + UpdateGearboxInfoText() + _gbxFile = file + Activate() + + _changed = False + Try + UpdatePic() + Catch + End Try + End Sub + + Private Function CreateListviewItem(gear As String, ratio As Double, getrMap As String, + shiftPolygon As String, maxTorque As String, maxSpeed As String) As ListViewItem + Dim retVal As ListViewItem = New ListViewItem(gear) + 'retVal.SubItems.Add(tc) + retVal.SubItems.Add(ratio.ToGUIFormat()) + retVal.SubItems.Add(getrMap) + retVal.SubItems.Add(shiftPolygon) + retVal.SubItems.Add(maxTorque) + retVal.SubItems.Add(maxSpeed) + Return retVal + End Function + + 'Save or Save As function = true if file is saved + Private Function SaveOrSaveAs(saveAs As Boolean) As Boolean + If _gbxFile = "" Or saveAs Then + If GearboxFileBrowser.SaveDialog(_gbxFile) Then + _gbxFile = GearboxFileBrowser.Files(0) + Else + Return False + End If + End If + Return SaveGbx(_gbxFile) + End Function + + 'Save file + Private Function SaveGbx(file As String) As Boolean + + Dim gearbox As Gearbox = FillGearboxData(file) + + + If Not gearbox.SaveFile Then + MsgBox("Cannot safe to " & file, MsgBoxStyle.Critical) + Return False + End If + + If AutoSendTo Then + If VectoJobForm.Visible Then + If UCase(FileRepl(VectoJobForm.TbGBX.Text, JobDir)) <> UCase(file) Then _ + VectoJobForm.TbGBX.Text = GetFilenameWithoutDirectory(file, JobDir) + VectoJobForm.UpdatePic() + End If + End If + + GearboxFileBrowser.UpdateHistory(file) + Text = GetFilenameWithoutPath(file, True) + LbStatus.Text = "" + + _changed = False + + Return True + End Function + + Private Function FillGearboxData(file As String) As Gearbox + Dim gearbox As Gearbox + Dim i As Integer + + gearbox = New Gearbox + gearbox.FilePath = file + + gearbox.ModelName = TbName.Text + If Trim(gearbox.ModelName) = "" Then gearbox.ModelName = "Undefined" + + gearbox.TracIntrSi = TbTracInt.Text.ToDouble(0) + gearbox.GbxInertia = TBI_getr.Text.ToDouble(0) + + For i = 0 To LvGears.Items.Count - 1 + 'GBX0.IsTCgear.Add(Me.LvGears.Items(i).SubItems(GearboxTbl.TorqueConverter).Text = "on" And i > 0) + gearbox.GearRatios.Add(LvGears.Items(i).SubItems(GearboxTbl.Ratio).Text.ToDouble(0)) + gearbox.GearLossmaps.Add(New SubPath) + gearbox.GearLossMap(i) = LvGears.Items(i).SubItems(GearboxTbl.LossMapEfficiency).Text + gearbox.GearshiftFiles.Add(New SubPath) + gearbox.ShiftPolygonFile(i) = LvGears.Items(i).SubItems(GearboxTbl.ShiftPolygons).Text + 'GBX0.FldFiles.Add(New cSubPath) + 'GBX0.FldFile(i) = Me.LvGears.Items(i).SubItems(GearboxTbl.MaxTorque).Text + gearbox.MaxTorque.Add(LvGears.Items(i).SubItems(GearboxTbl.MaxTorque).Text) + gearbox.MaxSpeed.Add(LvGears.Items(i).SubItems(GearboxTbl.MaxSpeed).Text) + Next + + gearbox.TorqueResv = TbTqResv.Text.ToDouble(0) + gearbox.ShiftTime = TbMinTimeBetweenShifts.Text.ToDouble(0) + gearbox.TorqueResvStart = TbTqResvStart.Text.ToDouble(0) + gearbox.StartSpeed = TbStartSpeed.Text.ToDouble(0) + gearbox.StartAcc = TbStartAcc.Text.ToDouble(0) + + gearbox.Type = CType(CbGStype.SelectedValue, GearboxType) + + gearbox.Type.AutomaticTransmission() + gearbox.TorqueConverterFile = TbTCfile.Text + gearbox.TorqueConverterReferenceRpm = TbTCrefrpm.Text.ToDouble(0) + gearbox.TorqueConverterInertia = TbTCinertia.Text.ToDouble(0) + gearbox.TorqueConverterShiftPolygonFile = TBTCShiftPolygon.Text + gearbox.TorqueConverterMaxSpeed = tbTCmaxSpeed.Text.ToDouble(0) + + gearbox.DownshiftAfterUpshift = tbDownshiftAfterUpshift.Text.ToDouble(0) + gearbox.UpshiftAfterDownshift = tbUpshiftAfterDownshift.Text.ToDouble(0) + + gearbox.UpshiftMinAcceleration = tbUpshiftMinAcceleration.Text.ToDouble(0) + gearbox.TCLUpshiftMinAcceleration = tbTCLUpshiftMinAcceleration.Text.ToDouble(0) + gearbox.TCCUpshiftMinAcceleration = tbTCCUpshiftMinAcceleration.Text.ToDouble(0) + + gearbox.PSShiftTime = tbATShiftTime.Text.ToDouble(0) + Return gearbox + End Function #Region "Change Events" - 'Change Status ändern |@@| Change Status change - Private Sub Change() - If Not _changed Then - LbStatus.Text = "Unsaved changes in current file" - _changed = True - End If - End Sub - - ' "Save changes ?" ...liefert True wenn User Vorgang abbricht |@@| Save changes? "... Returns True if user aborts - Private Function ChangeCheckCancel() As Boolean - - If _changed Then - Select Case MsgBox("Save changes ?", MsgBoxStyle.YesNoCancel) - Case MsgBoxResult.Yes - Return Not SaveOrSaveAs(False) - Case MsgBoxResult.Cancel - Return True - Case Else 'MsgBoxResult.No - _changed = False - Return False - End Select - - Else - - Return False - - End If - End Function - - Private Sub TbName_TextChanged(sender As Object, e As EventArgs) _ - Handles TbName.TextChanged, TBI_getr.TextChanged, TbTracInt.TextChanged, TbTqResv.TextChanged, - TbMinTimeBetweenShifts.TextChanged, TbTqResvStart.TextChanged, TbStartSpeed.TextChanged, TbStartAcc.TextChanged, - TbTCfile.TextChanged, - tbTCCUpshiftMinAcceleration.TextChanged, tbTCLUpshiftMinAcceleration.TextChanged - Change() - End Sub + 'Change Status ändern |@@| Change Status change + Private Sub Change() + If Not _changed Then + LbStatus.Text = "Unsaved changes in current file" + _changed = True + End If + End Sub + + ' "Save changes ?" ...liefert True wenn User Vorgang abbricht |@@| Save changes? "... Returns True if user aborts + Private Function ChangeCheckCancel() As Boolean + + If _changed Then + Select Case MsgBox("Save changes ?", MsgBoxStyle.YesNoCancel) + Case MsgBoxResult.Yes + Return Not SaveOrSaveAs(False) + Case MsgBoxResult.Cancel + Return True + Case Else 'MsgBoxResult.No + _changed = False + Return False + End Select + + Else + + Return False + + End If + End Function + + Private Sub TbName_TextChanged(sender As Object, e As EventArgs) _ + Handles TbName.TextChanged, TBI_getr.TextChanged, TbTracInt.TextChanged, TbTqResv.TextChanged, + TbMinTimeBetweenShifts.TextChanged, TbTqResvStart.TextChanged, TbStartSpeed.TextChanged, TbStartAcc.TextChanged, + TbTCfile.TextChanged, + tbTCCUpshiftMinAcceleration.TextChanged, tbTCLUpshiftMinAcceleration.TextChanged + Change() + End Sub #End Region - 'Save and close - Private Sub ButOK_Click(sender As Object, e As EventArgs) Handles ButOK.Click - If SaveOrSaveAs(False) Then Close() - End Sub - - 'Cancel - Private Sub ButCancel_Click(sender As Object, e As EventArgs) Handles ButCancel.Click - Close() - End Sub - - 'Enable/Disable settings for specific transmission types - Private Sub CbGStype_SelectedIndexChanged(sender As Object, e As EventArgs) _ - Handles CbGStype.SelectedIndexChanged - Dim gStype As GearboxType = CType(CbGStype.SelectedValue, GearboxType) - - Change() - - 'ChTCon.Enabled = (GStype.AutomaticTransmission()) - gbTC.Enabled = gStype.AutomaticTransmission() - pnTcEngineering.Enabled = Not Cfg.DeclMode AndAlso gStype.AutomaticTransmission() - gbTCAccMin.Enabled = Not Cfg.DeclMode AndAlso gStype.AutomaticTransmission() - gbPowershiftLosses.Enabled = Not Cfg.DeclMode AndAlso gStype.AutomaticTransmission() - TbStartAcc.Enabled = Not gStype.AutomaticTransmission() - TbStartSpeed.Enabled = Not gStype.AutomaticTransmission() - TbTqResv.Enabled = Not gStype.AutomaticTransmission() - GroupBox2.Enabled = Not gStype.AutomaticTransmission() - TBI_getr.Enabled = Not gStype.AutomaticTransmission() - TbTracInt.Enabled = Not gStype.AutomaticTransmission() - tbDownshiftAfterUpshift.Enabled = Not gStype.AutomaticTransmission() - tbUpshiftAfterDownshift.Enabled = Not gStype.AutomaticTransmission() - UpdateGearboxInfoText() - End Sub - - Private Sub UpdateGearboxInfoText() - Dim gStype As GearboxType = CType(CbGStype.SelectedValue, GearboxType) - - Dim text As String = "" - If (gStype = GearboxType.ATSerial) Then - If LvGears.Items.Count > 2 Then - Dim ratio1 As Double = LvGears.Items.Item(1).SubItems(GearboxTbl.Ratio).Text.ToDouble(0) - Dim ratio2 As Double = LvGears.Items.Item(2).SubItems(GearboxTbl.Ratio).Text.ToDouble(0) - - If ratio1 / ratio2 >= DeclarationData.Gearbox.TorqueConverterSecondGearThreshold(_vehicleCategory) Then - text = "Torque converter is used in 1st and 2nd gear" - Else - text = "Torque converter is used in 1st gear only" - End If - End If - End If - lblGbxInfo.Text = text - End Sub - - - Private Sub LvGears_SelectedIndexChanged(sender As Object, e As EventArgs) _ - Handles LvGears.SelectedIndexChanged - Try - UpdatePic() - btExportVGBS.Enabled = True - Catch - btExportVGBS.Enabled = False - End Try - End Sub + 'Save and close + Private Sub ButOK_Click(sender As Object, e As EventArgs) Handles ButOK.Click + If SaveOrSaveAs(False) Then Close() + End Sub + + 'Cancel + Private Sub ButCancel_Click(sender As Object, e As EventArgs) Handles ButCancel.Click + Close() + End Sub + + 'Enable/Disable settings for specific transmission types + Private Sub CbGStype_SelectedIndexChanged(sender As Object, e As EventArgs) _ + Handles CbGStype.SelectedIndexChanged + Dim gStype As GearboxType = CType(CbGStype.SelectedValue, GearboxType) + + Change() + + 'ChTCon.Enabled = (GStype.AutomaticTransmission()) + gbTC.Enabled = gStype.AutomaticTransmission() + pnTcEngineering.Enabled = Not Cfg.DeclMode AndAlso gStype.AutomaticTransmission() + gbTCAccMin.Enabled = Not Cfg.DeclMode AndAlso gStype.AutomaticTransmission() + gbPowershiftLosses.Enabled = Not Cfg.DeclMode AndAlso gStype.AutomaticTransmission() + TbStartAcc.Enabled = Not gStype.AutomaticTransmission() + TbStartSpeed.Enabled = Not gStype.AutomaticTransmission() + TbTqResv.Enabled = Not gStype.AutomaticTransmission() + GroupBox2.Enabled = Not gStype.AutomaticTransmission() + TBI_getr.Enabled = Not gStype.AutomaticTransmission() + TbTracInt.Enabled = Not gStype.AutomaticTransmission() + tbDownshiftAfterUpshift.Enabled = Not gStype.AutomaticTransmission() + tbUpshiftAfterDownshift.Enabled = Not gStype.AutomaticTransmission() + UpdateGearboxInfoText() + End Sub + + Private Sub UpdateGearboxInfoText() + Dim gStype As GearboxType = CType(CbGStype.SelectedValue, GearboxType) + + Dim text As String = "" + If (gStype = GearboxType.ATSerial) Then + If LvGears.Items.Count > 2 Then + Dim ratio1 As Double = LvGears.Items.Item(1).SubItems(GearboxTbl.Ratio).Text.ToDouble(0) + Dim ratio2 As Double = LvGears.Items.Item(2).SubItems(GearboxTbl.Ratio).Text.ToDouble(0) + + If ratio1 / ratio2 >= DeclarationData.Gearbox.TorqueConverterSecondGearThreshold(_vehicleCategory) Then + text = "Torque converter is used in 1st and 2nd gear" + Else + text = "Torque converter is used in 1st gear only" + End If + End If + End If + lblGbxInfo.Text = text + End Sub + + + Private Sub LvGears_SelectedIndexChanged(sender As Object, e As EventArgs) _ + Handles LvGears.SelectedIndexChanged + Try + UpdatePic() + btExportVGBS.Enabled = True + Catch + btExportVGBS.Enabled = False + End Try + End Sub #Region "Gears" - 'Gear-DoubleClick - Private Sub LvGears_MouseDoubleClick(ByVal sender As Object, ByVal e As MouseEventArgs) _ - Handles LvGears.MouseDoubleClick - EditGear() - End Sub - - 'Gear-KeyDown - Private Sub LvGears_KeyDown(sender As Object, e As KeyEventArgs) Handles LvGears.KeyDown - Select Case e.KeyCode - Case Keys.Delete, Keys.Back - RemoveGear(False) - Case Keys.Enter - EditGear() - End Select - End Sub - - 'Remove Gear Button - Private Sub BtClearGear_Click(sender As Object, e As EventArgs) Handles BtRemGear.Click - RemoveGear(False) - End Sub - - 'Add Gear button - Private Sub BtAddGear_Click(sender As Object, e As EventArgs) Handles BtAddGear.Click - AddGear() - LvGears.Items(LvGears.Items.Count - 1).Selected = True - EditGear() - End Sub - - 'Edit Gear - Private Sub EditGear() - - Do - - 'GearDia.ChIsTCgear.Enabled = (Me.ChTCon.Checked And Me.LvGears.SelectedIndices(0) > 0) - _gearDialog.GearboxType = CType(CbGStype.SelectedValue, GearboxType) - _gearDialog.PnShiftPoly.Enabled = (Not Cfg.DeclMode And LvGears.SelectedIndices(0) > 0) - _gearDialog.PnFld.Enabled = (LvGears.SelectedIndices(0) > 0) - _gearDialog.GbxPath = GetPath(_gbxFile) - _gearDialog.TbGear.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.GearNr).Text - _gearDialog.TbRatio.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.Ratio).Text - _gearDialog.TbMapPath.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.LossMapEfficiency).Text - If LvGears.SelectedIndices(0) > 0 Then - _gearDialog.TbShiftPolyFile.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.ShiftPolygons).Text - _gearDialog.TbMaxTorque.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.MaxTorque).Text - _gearDialog.tbMaxSpeed.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.MaxSpeed).Text - Else - _gearDialog.TbShiftPolyFile.Text = "" - _gearDialog.TbMaxTorque.Text = "" - _gearDialog.tbMaxSpeed.Text = "" - End If - - If LvGears.SelectedItems(0).Index = 0 Then - _gearDialog.BtPrevious.Enabled = False - Else - _gearDialog.BtPrevious.Enabled = True - End If - - If _gearDialog.ShowDialog = DialogResult.OK Then - 'Me.LvGears.SelectedItems(0).SubItems(GearboxTbl.TorqueConverter).Text = "-" - LvGears.SelectedItems(0).SubItems(GearboxTbl.Ratio).Text = _gearDialog.TbRatio.Text - LvGears.SelectedItems(0).SubItems(GearboxTbl.LossMapEfficiency).Text = _gearDialog.TbMapPath.Text - LvGears.SelectedItems(0).SubItems(GearboxTbl.ShiftPolygons).Text = _gearDialog.TbShiftPolyFile.Text - LvGears.SelectedItems(0).SubItems(GearboxTbl.MaxTorque).Text = _gearDialog.TbMaxTorque.Text - LvGears.SelectedItems(0).SubItems(GearboxTbl.MaxSpeed).Text = _gearDialog.tbMaxSpeed.Text - - UpdateGearboxInfoText() - Try - UpdatePic() - Catch - End Try - - Change() - - Else - - If LvGears.SelectedItems(0).SubItems(GearboxTbl.Ratio).Text = "" Then RemoveGear(True) - - End If - - If _gearDialog.NextGear Then - If LvGears.Items.Count - 1 = LvGears.SelectedIndices(0) Then AddGear() - - LvGears.Items(LvGears.SelectedIndices(0) + 1).Selected = True - End If - - If _gearDialog.PreviousGear AndAlso LvGears.SelectedIndices(0) > 0 Then - LvGears.Items(LvGears.SelectedIndices(0) - 1).Selected = True - End If - - Loop Until Not (_gearDialog.NextGear OrElse _gearDialog.PreviousGear) - End Sub - - 'Add Gear - Private Sub AddGear() - Dim lvi As ListViewItem - - lvi = CreateListviewItem(LvGears.Items.Count.ToString("00"), 1, "", "", "", "") - - LvGears.Items.Add(lvi) - - lvi.EnsureVisible() - UpdateGearboxInfoText() - LvGears.Focus() - - 'Change() => NO! Change() is already handled by EditGear - End Sub - - 'Remove Gear - Private Sub RemoveGear(noChange As Boolean) - Dim i0 As Integer - Dim i As Integer - Dim lv0 As ListViewItem - - If LvGears.Items.Count < 2 Then Exit Sub + 'Gear-DoubleClick + Private Sub LvGears_MouseDoubleClick(ByVal sender As Object, ByVal e As MouseEventArgs) _ + Handles LvGears.MouseDoubleClick + EditGear() + End Sub + + 'Gear-KeyDown + Private Sub LvGears_KeyDown(sender As Object, e As KeyEventArgs) Handles LvGears.KeyDown + Select Case e.KeyCode + Case Keys.Delete, Keys.Back + RemoveGear(False) + Case Keys.Enter + EditGear() + End Select + End Sub + + 'Remove Gear Button + Private Sub BtClearGear_Click(sender As Object, e As EventArgs) Handles BtRemGear.Click + RemoveGear(False) + End Sub + + 'Add Gear button + Private Sub BtAddGear_Click(sender As Object, e As EventArgs) Handles BtAddGear.Click + AddGear() + LvGears.Items(LvGears.Items.Count - 1).Selected = True + EditGear() + End Sub + + 'Edit Gear + Private Sub EditGear() + + Do + + 'GearDia.ChIsTCgear.Enabled = (Me.ChTCon.Checked And Me.LvGears.SelectedIndices(0) > 0) + _gearDialog.GearboxType = CType(CbGStype.SelectedValue, GearboxType) + _gearDialog.PnShiftPoly.Enabled = (Not Cfg.DeclMode And LvGears.SelectedIndices(0) > 0) + _gearDialog.PnFld.Enabled = (LvGears.SelectedIndices(0) > 0) + _gearDialog.GbxPath = GetPath(_gbxFile) + _gearDialog.TbGear.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.GearNr).Text + _gearDialog.TbRatio.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.Ratio).Text + _gearDialog.TbMapPath.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.LossMapEfficiency).Text + If LvGears.SelectedIndices(0) > 0 Then + _gearDialog.TbShiftPolyFile.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.ShiftPolygons).Text + _gearDialog.TbMaxTorque.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.MaxTorque).Text + _gearDialog.tbMaxSpeed.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.MaxSpeed).Text + Else + _gearDialog.TbShiftPolyFile.Text = "" + _gearDialog.TbMaxTorque.Text = "" + _gearDialog.tbMaxSpeed.Text = "" + End If + + If LvGears.SelectedItems(0).Index = 0 Then + _gearDialog.BtPrevious.Enabled = False + Else + _gearDialog.BtPrevious.Enabled = True + End If + + If _gearDialog.ShowDialog = DialogResult.OK Then + 'Me.LvGears.SelectedItems(0).SubItems(GearboxTbl.TorqueConverter).Text = "-" + LvGears.SelectedItems(0).SubItems(GearboxTbl.Ratio).Text = _gearDialog.TbRatio.Text + LvGears.SelectedItems(0).SubItems(GearboxTbl.LossMapEfficiency).Text = _gearDialog.TbMapPath.Text + LvGears.SelectedItems(0).SubItems(GearboxTbl.ShiftPolygons).Text = _gearDialog.TbShiftPolyFile.Text + LvGears.SelectedItems(0).SubItems(GearboxTbl.MaxTorque).Text = _gearDialog.TbMaxTorque.Text + LvGears.SelectedItems(0).SubItems(GearboxTbl.MaxSpeed).Text = _gearDialog.tbMaxSpeed.Text + + UpdateGearboxInfoText() + Try + UpdatePic() + Catch + End Try + + Change() + + Else + + If LvGears.SelectedItems(0).SubItems(GearboxTbl.Ratio).Text = "" Then RemoveGear(True) + + End If + + If _gearDialog.NextGear Then + If LvGears.Items.Count - 1 = LvGears.SelectedIndices(0) Then AddGear() + + LvGears.Items(LvGears.SelectedIndices(0) + 1).Selected = True + End If + + If _gearDialog.PreviousGear AndAlso LvGears.SelectedIndices(0) > 0 Then + LvGears.Items(LvGears.SelectedIndices(0) - 1).Selected = True + End If + + Loop Until Not (_gearDialog.NextGear OrElse _gearDialog.PreviousGear) + End Sub + + 'Add Gear + Private Sub AddGear() + Dim lvi As ListViewItem + + lvi = CreateListviewItem(LvGears.Items.Count.ToString("00"), 1, "", "", "", "") + + LvGears.Items.Add(lvi) + + lvi.EnsureVisible() + UpdateGearboxInfoText() + LvGears.Focus() + + 'Change() => NO! Change() is already handled by EditGear + End Sub + + 'Remove Gear + Private Sub RemoveGear(noChange As Boolean) + Dim i0 As Integer + Dim i As Integer + Dim lv0 As ListViewItem + + If LvGears.Items.Count < 2 Then Exit Sub - If LvGears.SelectedItems.Count = 0 Then LvGears.Items(LvGears.Items.Count - 1).Selected = True - - i0 = LvGears.SelectedItems(0).Index + If LvGears.SelectedItems.Count = 0 Then LvGears.Items(LvGears.Items.Count - 1).Selected = True + + i0 = LvGears.SelectedItems(0).Index - If i0 = 0 Then Exit Sub 'Must not remove axle + If i0 = 0 Then Exit Sub 'Must not remove axle - LvGears.SelectedItems(0).Remove() + LvGears.SelectedItems(0).Remove() - i = 0 - For Each lv0 In LvGears.Items - If lv0.SubItems(GearboxTbl.GearNr).Text = "Axle" Then Continue For - i += 1 - lv0.SubItems(GearboxTbl.GearNr).Text = i.ToString("00") - Next + i = 0 + For Each lv0 In LvGears.Items + If lv0.SubItems(GearboxTbl.GearNr).Text = "Axle" Then Continue For + i += 1 + lv0.SubItems(GearboxTbl.GearNr).Text = i.ToString("00") + Next - If i0 < LvGears.Items.Count Then - LvGears.Items(i0).Selected = True - LvGears.Items(i0).EnsureVisible() - End If - UpdateGearboxInfoText() - LvGears.Focus() - Try - UpdatePic() - Catch - End Try + If i0 < LvGears.Items.Count Then + LvGears.Items(i0).Selected = True + LvGears.Items(i0).EnsureVisible() + End If + UpdateGearboxInfoText() + LvGears.Focus() + Try + UpdatePic() + Catch + End Try - If Not noChange Then Change() - End Sub + If Not noChange Then Change() + End Sub #End Region @@ -700,375 +700,375 @@ Public Class GearboxForm #Region "Open File Context Menu" - Private _contextMenuFiles As String() - Private _vehicleCategory As VehicleCategory + Private _contextMenuFiles As String() + Private _vehicleCategory As VehicleCategory - Private Sub OpenFiles(ParamArray files() As String) + Private Sub OpenFiles(ParamArray files() As String) - If files.Length = 0 Then Exit Sub + If files.Length = 0 Then Exit Sub - _contextMenuFiles = files + _contextMenuFiles = files - OpenWithToolStripMenuItem.Text = "Open with " & Cfg.OpenCmdName + OpenWithToolStripMenuItem.Text = "Open with " & Cfg.OpenCmdName - CmOpenFile.Show(Windows.Forms.Cursor.Position) - End Sub + CmOpenFile.Show(Windows.Forms.Cursor.Position) + End Sub - Private Sub OpenWithToolStripMenuItem_Click(sender As Object, e As EventArgs) _ - Handles OpenWithToolStripMenuItem.Click - If Not FileOpenAlt(_contextMenuFiles(0)) Then MsgBox("Failed to open file!") - End Sub + Private Sub OpenWithToolStripMenuItem_Click(sender As Object, e As EventArgs) _ + Handles OpenWithToolStripMenuItem.Click + If Not FileOpenAlt(_contextMenuFiles(0)) Then MsgBox("Failed to open file!") + End Sub - Private Sub ShowInFolderToolStripMenuItem_Click(sender As Object, e As EventArgs) _ - Handles ShowInFolderToolStripMenuItem.Click - If File.Exists(_contextMenuFiles(0)) Then - Try - Process.Start("explorer", "/select,""" & _contextMenuFiles(0) & "") - Catch ex As Exception - MsgBox("Failed to open file!") - End Try - Else - MsgBox("File not found!") - End If - End Sub + Private Sub ShowInFolderToolStripMenuItem_Click(sender As Object, e As EventArgs) _ + Handles ShowInFolderToolStripMenuItem.Click + If File.Exists(_contextMenuFiles(0)) Then + Try + Process.Start("explorer", "/select,""" & _contextMenuFiles(0) & "") + Catch ex As Exception + MsgBox("Failed to open file!") + End Try + Else + MsgBox("File not found!") + End If + End Sub #End Region - Private Sub UpdatePic() + Private Sub UpdatePic() - Dim path As String + Dim path As String - Dim chart As Chart - Dim s As Series - Dim a As ChartArea - Dim img As Bitmap - Dim gear As Integer - 'Dim fullLoadCurve As EngineFullLoadCurve = Nothing - 'Dim shiftOk As Boolean - - - PicBox.Image = Nothing - - Dim shiftPolygon As ShiftPolygon = Nothing - 'Dim engineFld As FullLoadCurve - - If LvGears.Items.Count <= 1 Then Exit Sub - - Try - If LvGears.SelectedItems.Count > 0 AndAlso LvGears.SelectedIndices(0) > 0 Then - path = FileRepl(LvGears.SelectedItems(0).SubItems(GearboxTbl.ShiftPolygons).Text, GetPath(_gbxFile)) - gear = LvGears.SelectedIndices(0) - Else - path = FileRepl(LvGears.Items(1).SubItems(GearboxTbl.ShiftPolygons).Text, GetPath(_gbxFile)) - gear = 1 - End If - - If File.Exists(path) Then shiftPolygon = ShiftPolygonReader.ReadFromFile(path) - - Catch ex As Exception - - End Try - - chart = New Chart - chart.Width = PicBox.Width - chart.Height = PicBox.Height - - a = New ChartArea - - 'Shiftpolygons from file - - If Not shiftPolygon Is Nothing Then - s = New Series - s.Points.DataBindXY(shiftPolygon.Upshift.Select(Function(x) x.AngularSpeed.AsRPM).ToArray(), - shiftPolygon.Upshift.Select(Function(x) x.Torque.Value()).ToArray()) - s.ChartType = SeriesChartType.FastLine - s.BorderWidth = 2 - s.Color = Color.DarkRed - s.Name = "Upshift curve" - chart.Series.Add(s) - - s = New Series - s.Points.DataBindXY(shiftPolygon.Downshift.Select(Function(x) x.AngularSpeed.AsRPM).ToArray(), - shiftPolygon.Downshift.Select(Function(x) x.Torque.Value()).ToArray()) - s.ChartType = SeriesChartType.FastLine - s.BorderWidth = 2 - s.Color = Color.DarkRed - s.Name = "Downshift curve" - chart.Series.Add(s) - End If - - 'Dim vectoJob As VectoJob = New VectoJob() With {.FilePath = VectoJobForm.VECTOfile} - 'Dim vectoOk As Boolean = vectoJob.ReadFile() - Dim jobFile As String = VectoJobForm.VectoFile - If Not jobFile Is Nothing AndAlso File.Exists(jobFile) Then - - Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadJsonJob(jobFile), - IEngineeringInputDataProvider) - If (inputData Is Nothing) Then - Exit Sub - End If - Dim vehicle As IVehicleEngineeringInputData = inputData.JobInputData.Vehicle - 'inputData = TryCast(JSONInputDataFactory.ReadComponentData(vectoJob.PathEng(False)), IEngineeringInputDataProvider) - Dim engine As IEngineEngineeringInputData = inputData.JobInputData.Vehicle.EngineInputData - Dim engineFld As EngineFullLoadCurve = FullLoadCurveReader.Create(engine.FullLoadCurve) - - - s = New Series - s.Points.DataBindXY(engineFld.FullLoadEntries.Select(Function(x) x.EngineSpeed.AsRPM).ToArray(), - engineFld.FullLoadEntries.Select(Function(x) x.TorqueFullLoad.Value()).ToArray()) - s.ChartType = SeriesChartType.FastLine - s.BorderWidth = 2 - s.Color = Color.DarkBlue - s.Name = "Full load" - chart.Series.Add(s) - - If VectoJobForm.Visible AndAlso engine.IdleSpeed > 0 Then - 'If FLD0.Init(VectoJobForm.n_idle) Then - - 'Dim fullLoadCurve As FullLoadCurve = ConvertToFullLoadCurve(FLD0.LnU, FLD0.LTq) - Dim gears As IList(Of ITransmissionInputData) = ConvertToGears(LvGears.Items) - Dim shiftLines As ShiftPolygon = GetShiftLines(engine.IdleSpeed, engineFld, vehicle, gears, gear) - If (Not IsNothing(shiftLines)) Then - - - s = New Series - - 's.Points.DataBindXY(Shiftpoly.gs_nUup, Shiftpoly.gs_TqUp) - s.Points.DataBindXY( - shiftLines.Upshift.Select(Function(pt) pt.AngularSpeed.AsRPM). - ToArray(), - shiftLines.Upshift.Select(Function(pt) pt.Torque.Value()).ToArray()) - s.ChartType = SeriesChartType.FastLine - s.BorderWidth = 2 - s.Color = Color.DarkRed - s.BorderDashStyle = ChartDashStyle.Dash - s.Name = "Upshift curve (generic)" - chart.Series.Add(s) - - s = New Series - 's.Points.DataBindXY(Shiftpoly.gs_nUdown, Shiftpoly.gs_TqDown) - s.Points.DataBindXY( - shiftLines.Downshift.Select(Function(pt) pt.AngularSpeed.AsRPM) _ - .ToArray(), - shiftLines.Downshift.Select(Function(pt) pt.Torque.Value()).ToArray()) - s.ChartType = SeriesChartType.FastLine - s.BorderWidth = 2 - s.Color = Color.DarkRed - s.BorderDashStyle = ChartDashStyle.Dash - s.Name = "Downshift curve (generic)" - chart.Series.Add(s) - End If - 'End If - End If - End If - - a.Name = "main" - - a.AxisX.Title = "engine speed [1/min]" - a.AxisX.TitleFont = New Font("Helvetica", 10) - a.AxisX.LabelStyle.Font = New Font("Helvetica", 8) - a.AxisX.LabelAutoFitStyle = LabelAutoFitStyles.None - a.AxisX.MajorGrid.LineDashStyle = ChartDashStyle.Dot - - a.AxisY.Title = "engine torque [Nm]" - a.AxisY.TitleFont = New Font("Helvetica", 10) - a.AxisY.LabelStyle.Font = New Font("Helvetica", 8) - a.AxisY.LabelAutoFitStyle = LabelAutoFitStyles.None - a.AxisY.MajorGrid.LineDashStyle = ChartDashStyle.Dot - - a.AxisX.Minimum = 300 - a.BorderDashStyle = ChartDashStyle.Solid - a.BorderWidth = 1 - - a.BackColor = Color.GhostWhite - - chart.ChartAreas.Add(a) - - chart.Titles.Add("Gear " & gear & " shift polygons") - chart.Titles(0).Font = New Font("Helvetica", 12) - - chart.Update() - - img = New Bitmap(chart.Width, chart.Height, PixelFormat.Format32bppArgb) - chart.DrawToBitmap(img, New Rectangle(0, 0, PicBox.Width, PicBox.Height)) - - PicBox.Image = img - End Sub - - - Private Function GetShiftLines(ByVal idleSpeed As PerSecond, engineFullLoadCurve As EngineFullLoadCurve, - vehicle As IVehicleEngineeringInputData, gears As IList(Of ITransmissionInputData), ByVal gear As Integer) _ - As ShiftPolygon - Dim maxTqStr As String = LvGears.Items(gear).SubItems(GearboxTbl.MaxTorque).Text - Dim engine As CombustionEngineData = ConvertToEngineData(engineFullLoadCurve, idleSpeed, gear, - If(String.IsNullOrWhiteSpace(maxTqStr), Nothing, maxTqStr.ToDouble(0).SI(Of NewtonMeter))) - If gears.Count <= 1 Then - Return Nothing - End If - Dim rDyn As Meter = vehicle.DynamicTyreRadius - If rDyn.IsEqual(0) Then - If (vehicle.Axles.Count < 2) Then - Return Nothing - End If + Dim chart As Chart + Dim s As Series + Dim a As ChartArea + Dim img As Bitmap + Dim gear As Integer + 'Dim fullLoadCurve As EngineFullLoadCurve = Nothing + 'Dim shiftOk As Boolean + + + PicBox.Image = Nothing + + Dim shiftPolygon As ShiftPolygon = Nothing + 'Dim engineFld As FullLoadCurve + + If LvGears.Items.Count <= 1 Then Exit Sub + + Try + If LvGears.SelectedItems.Count > 0 AndAlso LvGears.SelectedIndices(0) > 0 Then + path = FileRepl(LvGears.SelectedItems(0).SubItems(GearboxTbl.ShiftPolygons).Text, GetPath(_gbxFile)) + gear = LvGears.SelectedIndices(0) + Else + path = FileRepl(LvGears.Items(1).SubItems(GearboxTbl.ShiftPolygons).Text, GetPath(_gbxFile)) + gear = 1 + End If + + If File.Exists(path) Then shiftPolygon = ShiftPolygonReader.ReadFromFile(path) + + Catch ex As Exception + + End Try + + chart = New Chart + chart.Width = PicBox.Width + chart.Height = PicBox.Height + + a = New ChartArea + + 'Shiftpolygons from file + + If Not shiftPolygon Is Nothing Then + s = New Series + s.Points.DataBindXY(shiftPolygon.Upshift.Select(Function(x) x.AngularSpeed.AsRPM).ToArray(), + shiftPolygon.Upshift.Select(Function(x) x.Torque.Value()).ToArray()) + s.ChartType = SeriesChartType.FastLine + s.BorderWidth = 2 + s.Color = Color.DarkRed + s.Name = "Upshift curve" + chart.Series.Add(s) + + s = New Series + s.Points.DataBindXY(shiftPolygon.Downshift.Select(Function(x) x.AngularSpeed.AsRPM).ToArray(), + shiftPolygon.Downshift.Select(Function(x) x.Torque.Value()).ToArray()) + s.ChartType = SeriesChartType.FastLine + s.BorderWidth = 2 + s.Color = Color.DarkRed + s.Name = "Downshift curve" + chart.Series.Add(s) + End If + + 'Dim vectoJob As VectoJob = New VectoJob() With {.FilePath = VectoJobForm.VECTOfile} + 'Dim vectoOk As Boolean = vectoJob.ReadFile() + Dim jobFile As String = VectoJobForm.VectoFile + If Not jobFile Is Nothing AndAlso File.Exists(jobFile) Then + + Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadJsonJob(jobFile), + IEngineeringInputDataProvider) + If (inputData Is Nothing) Then + Exit Sub + End If + Dim vehicle As IVehicleEngineeringInputData = inputData.JobInputData.Vehicle + 'inputData = TryCast(JSONInputDataFactory.ReadComponentData(vectoJob.PathEng(False)), IEngineeringInputDataProvider) + Dim engine As IEngineEngineeringInputData = inputData.JobInputData.Vehicle.EngineInputData + Dim engineFld As EngineFullLoadCurve = FullLoadCurveReader.Create(engine.FullLoadCurve) + + + s = New Series + s.Points.DataBindXY(engineFld.FullLoadEntries.Select(Function(x) x.EngineSpeed.AsRPM).ToArray(), + engineFld.FullLoadEntries.Select(Function(x) x.TorqueFullLoad.Value()).ToArray()) + s.ChartType = SeriesChartType.FastLine + s.BorderWidth = 2 + s.Color = Color.DarkBlue + s.Name = "Full load" + chart.Series.Add(s) + + If VectoJobForm.Visible AndAlso engine.IdleSpeed > 0 Then + 'If FLD0.Init(VectoJobForm.n_idle) Then + + 'Dim fullLoadCurve As FullLoadCurve = ConvertToFullLoadCurve(FLD0.LnU, FLD0.LTq) + Dim gears As IList(Of ITransmissionInputData) = ConvertToGears(LvGears.Items) + Dim shiftLines As ShiftPolygon = GetShiftLines(engine.IdleSpeed, engineFld, vehicle, gears, gear) + If (Not IsNothing(shiftLines)) Then + + + s = New Series + + 's.Points.DataBindXY(Shiftpoly.gs_nUup, Shiftpoly.gs_TqUp) + s.Points.DataBindXY( + shiftLines.Upshift.Select(Function(pt) pt.AngularSpeed.AsRPM). + ToArray(), + shiftLines.Upshift.Select(Function(pt) pt.Torque.Value()).ToArray()) + s.ChartType = SeriesChartType.FastLine + s.BorderWidth = 2 + s.Color = Color.DarkRed + s.BorderDashStyle = ChartDashStyle.Dash + s.Name = "Upshift curve (generic)" + chart.Series.Add(s) + + s = New Series + 's.Points.DataBindXY(Shiftpoly.gs_nUdown, Shiftpoly.gs_TqDown) + s.Points.DataBindXY( + shiftLines.Downshift.Select(Function(pt) pt.AngularSpeed.AsRPM) _ + .ToArray(), + shiftLines.Downshift.Select(Function(pt) pt.Torque.Value()).ToArray()) + s.ChartType = SeriesChartType.FastLine + s.BorderWidth = 2 + s.Color = Color.DarkRed + s.BorderDashStyle = ChartDashStyle.Dash + s.Name = "Downshift curve (generic)" + chart.Series.Add(s) + End If + 'End If + End If + End If + + a.Name = "main" + + a.AxisX.Title = "engine speed [1/min]" + a.AxisX.TitleFont = New Font("Helvetica", 10) + a.AxisX.LabelStyle.Font = New Font("Helvetica", 8) + a.AxisX.LabelAutoFitStyle = LabelAutoFitStyles.None + a.AxisX.MajorGrid.LineDashStyle = ChartDashStyle.Dot + + a.AxisY.Title = "engine torque [Nm]" + a.AxisY.TitleFont = New Font("Helvetica", 10) + a.AxisY.LabelStyle.Font = New Font("Helvetica", 8) + a.AxisY.LabelAutoFitStyle = LabelAutoFitStyles.None + a.AxisY.MajorGrid.LineDashStyle = ChartDashStyle.Dot + + a.AxisX.Minimum = 300 + a.BorderDashStyle = ChartDashStyle.Solid + a.BorderWidth = 1 + + a.BackColor = Color.GhostWhite + + chart.ChartAreas.Add(a) + + chart.Titles.Add("Gear " & gear & " shift polygons") + chart.Titles(0).Font = New Font("Helvetica", 12) + + chart.Update() + + img = New Bitmap(chart.Width, chart.Height, PixelFormat.Format32bppArgb) + chart.DrawToBitmap(img, New Rectangle(0, 0, PicBox.Width, PicBox.Height)) + + PicBox.Image = img + End Sub + + + Private Function GetShiftLines(ByVal idleSpeed As PerSecond, engineFullLoadCurve As EngineFullLoadCurve, + vehicle As IVehicleEngineeringInputData, gears As IList(Of ITransmissionInputData), ByVal gear As Integer) _ + As ShiftPolygon + Dim maxTqStr As String = LvGears.Items(gear).SubItems(GearboxTbl.MaxTorque).Text + Dim engine As CombustionEngineData = ConvertToEngineData(engineFullLoadCurve, idleSpeed, gear, + If(String.IsNullOrWhiteSpace(maxTqStr), Nothing, maxTqStr.ToDouble(0).SI(Of NewtonMeter))) + If gears.Count <= 1 Then + Return Nothing + End If + Dim rDyn As Meter = vehicle.DynamicTyreRadius + If rDyn.IsEqual(0) Then + If (vehicle.Axles.Count < 2) Then + Return Nothing + End If rdyn = vehicle.Axles.Where(Function(axle) axle.AxleType = AxleType.VehicleDriven) _ .Select(Function(da) DeclarationData.Wheels.Lookup(da.Tyre.Dimension).DynamicTyreRadius) _ - .Average() - End If - If (rDyn.IsEqual(0)) Then - Return Nothing - End If - Dim shiftLines As ShiftPolygon = DeclarationData.Gearbox.ComputeShiftPolygon( - CType(CbGStype.SelectedValue, GearboxType), gear - 1, - engine.FullLoadCurves(CType(gear, UInteger)), gears, engine, - Double.Parse(LvGears.Items(0).SubItems(GearboxTbl.Ratio).Text, CultureInfo.InvariantCulture), - (rDyn)) - Return shiftLines - End Function - - Private Function ConvertToGears(gbx As ListView.ListViewItemCollection) As IList(Of ITransmissionInputData) - Dim retVal As List(Of ITransmissionInputData) = New List(Of ITransmissionInputData) - Dim value As Double - - For i As Integer = 1 To gbx.Count - 1 - If _ - gbx(i).SubItems(GearboxTbl.Ratio).Text <> "" AndAlso Double.TryParse(gbx(i).SubItems(GearboxTbl.Ratio).Text, value) _ - Then - Dim maxSpeed As PerSecond = - If _ - (String.IsNullOrWhiteSpace(gbx(i).SubItems(GearboxTbl.MaxSpeed).Text), Nothing, - gbx(i).SubItems(GearboxTbl.MaxSpeed).Text.ToDouble().RPMtoRad()) - retVal.Add( - New TransmissionInputData() _ - With {.Ratio = value, .MaxInputSpeed = maxSpeed}) - - End If - Next - Return retVal - End Function + .Average() + End If + If (rDyn.IsEqual(0)) Then + Return Nothing + End If + Dim shiftLines As ShiftPolygon = DeclarationData.Gearbox.ComputeShiftPolygon( + CType(CbGStype.SelectedValue, GearboxType), gear - 1, + engine.FullLoadCurves(CType(gear, UInteger)), gears, engine, + Double.Parse(LvGears.Items(0).SubItems(GearboxTbl.Ratio).Text, CultureInfo.InvariantCulture), + (rDyn)) + Return shiftLines + End Function + + Private Function ConvertToGears(gbx As ListView.ListViewItemCollection) As IList(Of ITransmissionInputData) + Dim retVal As List(Of ITransmissionInputData) = New List(Of ITransmissionInputData) + Dim value As Double + + For i As Integer = 1 To gbx.Count - 1 + If _ + gbx(i).SubItems(GearboxTbl.Ratio).Text <> "" AndAlso Double.TryParse(gbx(i).SubItems(GearboxTbl.Ratio).Text, value) _ + Then + Dim maxSpeed As PerSecond = + If _ + (String.IsNullOrWhiteSpace(gbx(i).SubItems(GearboxTbl.MaxSpeed).Text), Nothing, + gbx(i).SubItems(GearboxTbl.MaxSpeed).Text.ToDouble().RPMtoRad()) + retVal.Add( + New TransmissionInputData() _ + With {.Ratio = value, .MaxInputSpeed = maxSpeed}) + + End If + Next + Return retVal + End Function #Region "Torque Converter" - 'Browse TC file - Private Sub BtTCfileBrowse_Click(sender As Object, e As EventArgs) Handles BtTCfileBrowse.Click - If TorqueConverterFileBrowser.OpenDialog(FileRepl(TbTCfile.Text, GetPath(_gbxFile))) Then - TbTCfile.Text = GetFilenameWithoutDirectory(TorqueConverterFileBrowser.Files(0), GetPath(_gbxFile)) - End If - End Sub + 'Browse TC file + Private Sub BtTCfileBrowse_Click(sender As Object, e As EventArgs) Handles BtTCfileBrowse.Click + If TorqueConverterFileBrowser.OpenDialog(FileRepl(TbTCfile.Text, GetPath(_gbxFile))) Then + TbTCfile.Text = GetFilenameWithoutDirectory(TorqueConverterFileBrowser.Files(0), GetPath(_gbxFile)) + End If + End Sub - 'Open TC file - Private Sub BtTCfileOpen_Click(sender As Object, e As EventArgs) Handles BtTCfileOpen.Click - OpenFiles(FileRepl(TbTCfile.Text, GetPath(_gbxFile))) - End Sub + 'Open TC file + Private Sub BtTCfileOpen_Click(sender As Object, e As EventArgs) Handles BtTCfileOpen.Click + OpenFiles(FileRepl(TbTCfile.Text, GetPath(_gbxFile))) + End Sub #End Region - Private Sub GroupBox1_Enter(sender As Object, e As EventArgs) Handles GroupBox1.Enter - End Sub - - Public Sub New() - - ' Dieser Aufruf ist für den Designer erforderlich. - InitializeComponent() - - ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. - End Sub - - Private Sub BtTCShiftFileBrowse_Click(sender As Object, e As EventArgs) Handles BtTCShiftFileBrowse.Click - If TorqueConverterShiftPolygonFileBrowser.OpenDialog(FileRepl(TBTCShiftPolygon.Text, GetPath(_gbxFile))) Then - TBTCShiftPolygon.Text = GetFilenameWithoutDirectory(TorqueConverterShiftPolygonFileBrowser.Files(0), - GetPath(_gbxFile)) - End If - End Sub - - Private Sub btnExportXML_Click(sender As Object, e As EventArgs) Handles btnExportXML.Click - If Not Cfg.DeclMode Then - MsgBox("XML Export is only supported in Declaration Mode") - Exit Sub - End If - If Not FolderFileBrowser.OpenDialog("") Then - Exit Sub - End If - Dim filePath As String = FolderFileBrowser.Files(0) - - Dim data As Gearbox = FillGearboxData(_gbxFile) - If (Cfg.DeclMode) Then - Dim export As XDocument = New XMLDeclarationWriter(data.Manufacturer).GenerateVectoComponent(data, data) - export.Save(Path.Combine(filePath, data.ModelName + ".xml")) - Else - Dim export As XDocument = New XMLEngineeringWriter(_gbxFile, True, data.Manufacturer).GenerateVectoComponent(data, - data) - export.Save(Path.Combine(filePath, data.ModelName + ".xml")) - End If - End Sub - - Private Sub btnExportAxlGearXML_Click(sender As Object, e As EventArgs) Handles btnExportAxlGearXML.Click - If Not Cfg.DeclMode Then - MsgBox("XML Export is only supported in Declaration Mode") - Exit Sub - End If - If Not FolderFileBrowser.OpenDialog("") Then - Exit Sub - End If - Dim filePath As String = FolderFileBrowser.Files(0) - - Dim data As Gearbox = FillGearboxData(_gbxFile) - If (Cfg.DeclMode) Then - Dim export As XDocument = New XMLDeclarationWriter(data.Manufacturer).GenerateVectoComponent(data) - export.Save(Path.Combine(filePath, data.ModelName + ".xml")) - Else - Dim export As XDocument = New XMLEngineeringWriter(_gbxFile, True, data.Manufacturer).GenerateVectoComponent(data) - export.Save(Path.Combine(filePath, data.ModelName + ".xml")) - End If - End Sub - - Private Sub btExportVGBS_Click(sender As Object, e As EventArgs) Handles btExportVGBS.Click - If LvGears.Items.Count <= 1 Then Exit Sub - - Dim shiftPolygon As ShiftPolygon = Nothing - Dim path As String - Dim gear As Integer - Try - If LvGears.SelectedItems.Count > 0 AndAlso LvGears.SelectedIndices(0) > 0 Then - path = FileRepl(LvGears.SelectedItems(0).SubItems(GearboxTbl.ShiftPolygons).Text, GetPath(_gbxFile)) - gear = LvGears.SelectedIndices(0) - Else - path = FileRepl(LvGears.Items(1).SubItems(GearboxTbl.ShiftPolygons).Text, GetPath(_gbxFile)) - gear = 1 - End If - - If File.Exists(path) Then shiftPolygon = ShiftPolygonReader.ReadFromFile(path) - - If Not shiftPolygon Is Nothing Then - ShiftPolygonExport.WriteShiftPolygon(shiftPolygon, path & ".vgbs") - End If - Catch ex As Exception - End Try - - Dim jobFile As String = VectoJobForm.VectoFile - If Not jobFile Is Nothing AndAlso File.Exists(jobFile) Then - Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadJsonJob(jobFile), - IEngineeringInputDataProvider) - If (inputData Is Nothing) Then - Exit Sub - End If - - Dim vehicle As IVehicleEngineeringInputData = inputData.JobInputData.Vehicle - Dim engine As IEngineEngineeringInputData = vehicle.EngineInputData - Dim engineFld As EngineFullLoadCurve = FullLoadCurveReader.Create(engine.FullLoadCurve) - - If VectoJobForm.Visible AndAlso engine.IdleSpeed > 0 Then - Dim gears As IList(Of ITransmissionInputData) = ConvertToGears(LvGears.Items) - Dim shiftLines As ShiftPolygon = GetShiftLines(engine.IdleSpeed, engineFld, vehicle, gears, gear) - If (Not IsNothing(shiftLines)) Then - ShiftPolygonExport.WriteShiftPolygon(shiftLines, jobFile & "_Gear " & gear & ".vgbs") - End If - End If - End If - End Sub + Private Sub GroupBox1_Enter(sender As Object, e As EventArgs) Handles GroupBox1.Enter + End Sub + + Public Sub New() + + ' Dieser Aufruf ist für den Designer erforderlich. + InitializeComponent() + + ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. + End Sub + + Private Sub BtTCShiftFileBrowse_Click(sender As Object, e As EventArgs) Handles BtTCShiftFileBrowse.Click + If TorqueConverterShiftPolygonFileBrowser.OpenDialog(FileRepl(TBTCShiftPolygon.Text, GetPath(_gbxFile))) Then + TBTCShiftPolygon.Text = GetFilenameWithoutDirectory(TorqueConverterShiftPolygonFileBrowser.Files(0), + GetPath(_gbxFile)) + End If + End Sub + + Private Sub btnExportXML_Click(sender As Object, e As EventArgs) Handles btnExportXML.Click + If Not Cfg.DeclMode Then + MsgBox("XML Export is only supported in Declaration Mode") + Exit Sub + End If + If Not FolderFileBrowser.OpenDialog("") Then + Exit Sub + End If + Dim filePath As String = FolderFileBrowser.Files(0) + + Dim data As Gearbox = FillGearboxData(_gbxFile) + If (Cfg.DeclMode) Then + Dim export As XDocument = New XMLDeclarationWriter(data.Manufacturer).GenerateVectoComponent(data, data) + export.Save(Path.Combine(filePath, data.ModelName + ".xml")) + Else + Dim export As XDocument = New XMLEngineeringWriter(_gbxFile, True, data.Manufacturer).GenerateVectoComponent(data, + data) + export.Save(Path.Combine(filePath, data.ModelName + ".xml")) + End If + End Sub + + Private Sub btnExportAxlGearXML_Click(sender As Object, e As EventArgs) Handles btnExportAxlGearXML.Click + If Not Cfg.DeclMode Then + MsgBox("XML Export is only supported in Declaration Mode") + Exit Sub + End If + If Not FolderFileBrowser.OpenDialog("") Then + Exit Sub + End If + Dim filePath As String = FolderFileBrowser.Files(0) + + Dim data As Gearbox = FillGearboxData(_gbxFile) + If (Cfg.DeclMode) Then + Dim export As XDocument = New XMLDeclarationWriter(data.Manufacturer).GenerateVectoComponent(data) + export.Save(Path.Combine(filePath, data.ModelName + ".xml")) + Else + Dim export As XDocument = New XMLEngineeringWriter(_gbxFile, True, data.Manufacturer).GenerateVectoComponent(data) + export.Save(Path.Combine(filePath, data.ModelName + ".xml")) + End If + End Sub + + Private Sub btExportVGBS_Click(sender As Object, e As EventArgs) Handles btExportVGBS.Click + If LvGears.Items.Count <= 1 Then Exit Sub + + Dim shiftPolygon As ShiftPolygon = Nothing + Dim path As String + Dim gear As Integer + Try + If LvGears.SelectedItems.Count > 0 AndAlso LvGears.SelectedIndices(0) > 0 Then + path = FileRepl(LvGears.SelectedItems(0).SubItems(GearboxTbl.ShiftPolygons).Text, GetPath(_gbxFile)) + gear = LvGears.SelectedIndices(0) + Else + path = FileRepl(LvGears.Items(1).SubItems(GearboxTbl.ShiftPolygons).Text, GetPath(_gbxFile)) + gear = 1 + End If + + If File.Exists(path) Then shiftPolygon = ShiftPolygonReader.ReadFromFile(path) + + If Not shiftPolygon Is Nothing Then + ShiftPolygonExport.WriteShiftPolygon(shiftPolygon, path & ".vgbs") + End If + Catch ex As Exception + End Try + + Dim jobFile As String = VectoJobForm.VectoFile + If Not jobFile Is Nothing AndAlso File.Exists(jobFile) Then + Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadJsonJob(jobFile), + IEngineeringInputDataProvider) + If (inputData Is Nothing) Then + Exit Sub + End If + + Dim vehicle As IVehicleEngineeringInputData = inputData.JobInputData.Vehicle + Dim engine As IEngineEngineeringInputData = vehicle.EngineInputData + Dim engineFld As EngineFullLoadCurve = FullLoadCurveReader.Create(engine.FullLoadCurve) + + If VectoJobForm.Visible AndAlso engine.IdleSpeed > 0 Then + Dim gears As IList(Of ITransmissionInputData) = ConvertToGears(LvGears.Items) + Dim shiftLines As ShiftPolygon = GetShiftLines(engine.IdleSpeed, engineFld, vehicle, gears, gear) + If (Not IsNothing(shiftLines)) Then + ShiftPolygonExport.WriteShiftPolygon(shiftLines, jobFile & "_Gear " & gear & ".vgbs") + End If + End If + End If + End Sub End Class diff --git a/VECTO/GUI/MainForm.vb b/VECTO/GUI/MainForm.vb index 58950a23a1802e5f7f02f23b3a34d35b0e9e118b..a7ea1eb1f6774f4ece31c0872fdad4ee6f5c1514 100644 --- a/VECTO/GUI/MainForm.vb +++ b/VECTO/GUI/MainForm.vb @@ -122,6 +122,7 @@ Imports TUGraz.VectoCore.Utils FullLoadCurveFileBrowser = New FileBrowser("vfld") EngineFileBrowser = New FileBrowser("veng") GearboxFileBrowser = New FileBrowser("vgbx") + TCUFileBrowser = New FileBrowser("vtcu") DriverAccelerationFileBrowser = New FileBrowser("vacc") AuxFileBrowser = New FileBrowser("vaux") GearboxShiftPolygonFileBrowser = New FileBrowser("vgbs") @@ -151,6 +152,7 @@ Imports TUGraz.VectoCore.Utils FullLoadCurveFileBrowser.Extensions = New String() {"vfld"} EngineFileBrowser.Extensions = New String() {"veng"} GearboxFileBrowser.Extensions = New String() {"vgbx"} + TCUFileBrowser.Extensions = New String() {"vtcu"} DriverAccelerationFileBrowser.Extensions = New String() {"vacc"} AuxFileBrowser.Extensions = New String() {"vaux"} GearboxShiftPolygonFileBrowser.Extensions = New String() {"vgbs"} diff --git a/VECTO/GUI/VectoJobForm.Designer.vb b/VECTO/GUI/VectoJobForm.Designer.vb index 55179b9d5faccdc6750c845e381266118f811eb0..4db9c77fceee89485d16b9decf1b37e9092fd95b 100644 --- a/VECTO/GUI/VectoJobForm.Designer.vb +++ b/VECTO/GUI/VectoJobForm.Designer.vb @@ -25,1197 +25,1233 @@ Partial Class VectoJobForm 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. <DebuggerStepThrough()> _ Private Sub InitializeComponent() - Me.components = New System.ComponentModel.Container() - Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(VectoJobForm)) - Me.TabPgGen = New System.Windows.Forms.TabPage() - Me.GrCycles = New System.Windows.Forms.GroupBox() - Me.Label2 = New System.Windows.Forms.Label() - Me.LvCycles = New System.Windows.Forms.ListView() - Me.ColumnHeader1 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.BtDRIrem = New System.Windows.Forms.Button() - Me.BtDRIadd = New System.Windows.Forms.Button() - Me.GrAux = New System.Windows.Forms.GroupBox() - Me.Label9 = New System.Windows.Forms.Label() - Me.TbAuxPAdd = New System.Windows.Forms.TextBox() - Me.Label8 = New System.Windows.Forms.Label() - Me.btnAAUXOpen = New System.Windows.Forms.Button() - Me.Label1 = New System.Windows.Forms.Label() - Me.btnBrowseAAUXFile = New System.Windows.Forms.Button() - Me.txtAdvancedAuxiliaryFile = New System.Windows.Forms.TextBox() - Me.picAuxInfo = New System.Windows.Forms.PictureBox() - Me.cboAdvancedAuxiliaries = New System.Windows.Forms.ComboBox() - Me.lbAdvancedAuxiliaries = New System.Windows.Forms.Label() - Me.Label32 = New System.Windows.Forms.Label() - Me.LvAux = New System.Windows.Forms.ListView() - Me.ColumnHeader4 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ColumnHeader5 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ColumnHeader6 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ButAuxRem = New System.Windows.Forms.Button() - Me.ButAuxAdd = New System.Windows.Forms.Button() - Me.TbGBX = New System.Windows.Forms.TextBox() - Me.TbENG = New System.Windows.Forms.TextBox() - Me.TbVEH = New System.Windows.Forms.TextBox() - Me.ButOpenGBX = New System.Windows.Forms.Button() - Me.ButOpenENG = New System.Windows.Forms.Button() - Me.ButOpenVEH = New System.Windows.Forms.Button() - Me.ButtonVEH = New System.Windows.Forms.Button() - Me.ButtonGBX = New System.Windows.Forms.Button() - Me.ButtonMAP = New System.Windows.Forms.Button() - Me.TabControl1 = New System.Windows.Forms.TabControl() - Me.TabPgDriver = New System.Windows.Forms.TabPage() - Me.GrVACC = New System.Windows.Forms.GroupBox() - Me.Label15 = New System.Windows.Forms.Label() - Me.TbDesMaxFile = New System.Windows.Forms.TextBox() - Me.BtDesMaxBr = New System.Windows.Forms.Button() - Me.BtAccOpen = New System.Windows.Forms.Button() - Me.GrLAC = New System.Windows.Forms.GroupBox() - Me.pnLookAheadCoasting = New System.Windows.Forms.Panel() - Me.Label7 = New System.Windows.Forms.Label() - Me.Label6 = New System.Windows.Forms.Label() - Me.tbLacMinSpeed = New System.Windows.Forms.TextBox() - Me.btnDfVelocityDrop = New System.Windows.Forms.Button() - Me.Label12 = New System.Windows.Forms.Label() - Me.tbDfCoastingScale = New System.Windows.Forms.TextBox() - Me.Label11 = New System.Windows.Forms.Label() - Me.Label3 = New System.Windows.Forms.Label() - Me.tbDfCoastingOffset = New System.Windows.Forms.TextBox() - Me.tbLacDfTargetSpeedFile = New System.Windows.Forms.TextBox() - Me.Label10 = New System.Windows.Forms.Label() - Me.Label4 = New System.Windows.Forms.Label() - Me.Label5 = New System.Windows.Forms.Label() - Me.btnDfTargetSpeed = New System.Windows.Forms.Button() - Me.tbLacPreviewFactor = New System.Windows.Forms.TextBox() - Me.tbLacDfVelocityDropFile = New System.Windows.Forms.TextBox() - Me.CbLookAhead = New System.Windows.Forms.CheckBox() - Me.GroupBox1 = New System.Windows.Forms.GroupBox() - Me.GroupBox2 = New System.Windows.Forms.GroupBox() - Me.Label22 = New System.Windows.Forms.Label() - Me.TbUnderSpeed = New System.Windows.Forms.TextBox() - Me.Label20 = New System.Windows.Forms.Label() - Me.PnEcoRoll = New System.Windows.Forms.Panel() - Me.Label21 = New System.Windows.Forms.Label() - Me.Label14 = New System.Windows.Forms.Label() - Me.TbVmin = New System.Windows.Forms.TextBox() - Me.TbOverspeed = New System.Windows.Forms.TextBox() - Me.Label23 = New System.Windows.Forms.Label() - Me.Label13 = New System.Windows.Forms.Label() - Me.RdOverspeed = New System.Windows.Forms.RadioButton() - Me.RdOff = New System.Windows.Forms.RadioButton() - Me.StatusStrip1 = New System.Windows.Forms.StatusStrip() - Me.ToolStripStatusLabelGEN = New System.Windows.Forms.ToolStripStatusLabel() - Me.ButOK = New System.Windows.Forms.Button() - Me.ButCancel = New System.Windows.Forms.Button() - Me.ToolStrip1 = New System.Windows.Forms.ToolStrip() - Me.ToolStripBtNew = New System.Windows.Forms.ToolStripButton() - Me.ToolStripBtOpen = New System.Windows.Forms.ToolStripButton() - Me.ToolStripBtSave = New System.Windows.Forms.ToolStripButton() - Me.ToolStripBtSaveAs = New System.Windows.Forms.ToolStripButton() - Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator() - Me.ToolStripBtSendTo = New System.Windows.Forms.ToolStripButton() - Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator() - Me.ToolStripButton1 = New System.Windows.Forms.ToolStripButton() - Me.PictureBox1 = New System.Windows.Forms.PictureBox() - Me.CbEngOnly = New System.Windows.Forms.CheckBox() - Me.CmOpenFile = New System.Windows.Forms.ContextMenuStrip(Me.components) - Me.OpenWithToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.ShowInFolderToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.PicVehicle = New System.Windows.Forms.PictureBox() - Me.PicBox = New System.Windows.Forms.PictureBox() - Me.TbEngTxt = New System.Windows.Forms.TextBox() - Me.TbVehCat = New System.Windows.Forms.TextBox() - Me.TbAxleConf = New System.Windows.Forms.TextBox() - Me.TbHVCclass = New System.Windows.Forms.TextBox() - 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() - CType(Me.picAuxInfo, System.ComponentModel.ISupportInitialize).BeginInit() - Me.TabControl1.SuspendLayout() - Me.TabPgDriver.SuspendLayout() - Me.GrVACC.SuspendLayout() - Me.GrLAC.SuspendLayout() - Me.pnLookAheadCoasting.SuspendLayout() - Me.GroupBox1.SuspendLayout() - Me.GroupBox2.SuspendLayout() - Me.PnEcoRoll.SuspendLayout() - Me.StatusStrip1.SuspendLayout() - Me.ToolStrip1.SuspendLayout() - CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.CmOpenFile.SuspendLayout() - CType(Me.PicVehicle, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.PicBox, System.ComponentModel.ISupportInitialize).BeginInit() - Me.SuspendLayout() - ' - 'TabPgGen - ' - Me.TabPgGen.Controls.Add(Me.GrCycles) - Me.TabPgGen.Controls.Add(Me.GrAux) - Me.TabPgGen.Controls.Add(Me.TbGBX) - Me.TabPgGen.Controls.Add(Me.TbENG) - Me.TabPgGen.Controls.Add(Me.TbVEH) - Me.TabPgGen.Controls.Add(Me.ButOpenGBX) - Me.TabPgGen.Controls.Add(Me.ButOpenENG) - Me.TabPgGen.Controls.Add(Me.ButOpenVEH) - Me.TabPgGen.Controls.Add(Me.ButtonVEH) - Me.TabPgGen.Controls.Add(Me.ButtonGBX) - Me.TabPgGen.Controls.Add(Me.ButtonMAP) - Me.TabPgGen.Location = New System.Drawing.Point(4, 22) - Me.TabPgGen.Name = "TabPgGen" - Me.TabPgGen.Padding = New System.Windows.Forms.Padding(3) - Me.TabPgGen.Size = New System.Drawing.Size(527, 487) - Me.TabPgGen.TabIndex = 0 - Me.TabPgGen.Text = "General" - Me.TabPgGen.UseVisualStyleBackColor = True - ' - 'GrCycles - ' - Me.GrCycles.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.GrCycles.Controls.Add(Me.Label2) - Me.GrCycles.Controls.Add(Me.LvCycles) - Me.GrCycles.Controls.Add(Me.BtDRIrem) - Me.GrCycles.Controls.Add(Me.BtDRIadd) - Me.GrCycles.Location = New System.Drawing.Point(6, 338) - Me.GrCycles.Name = "GrCycles" - Me.GrCycles.Size = New System.Drawing.Size(515, 138) - Me.GrCycles.TabIndex = 10 - Me.GrCycles.TabStop = False - Me.GrCycles.Text = "Cycles" - ' - 'Label2 - ' - Me.Label2.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.Label2.AutoSize = True - Me.Label2.Location = New System.Drawing.Point(391, 109) - Me.Label2.Name = "Label2" - Me.Label2.Size = New System.Drawing.Size(118, 13) - Me.Label2.TabIndex = 3 - Me.Label2.Text = "(Right-Click for Options)" - ' - 'LvCycles - ' - Me.LvCycles.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.LvCycles.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1}) - Me.LvCycles.FullRowSelect = True - Me.LvCycles.GridLines = True - Me.LvCycles.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None - Me.LvCycles.HideSelection = False - Me.LvCycles.LabelEdit = True - Me.LvCycles.Location = New System.Drawing.Point(6, 19) - Me.LvCycles.MultiSelect = False - Me.LvCycles.Name = "LvCycles" - Me.LvCycles.Size = New System.Drawing.Size(503, 89) - Me.LvCycles.TabIndex = 0 - Me.LvCycles.TabStop = False - Me.LvCycles.UseCompatibleStateImageBehavior = False - Me.LvCycles.View = System.Windows.Forms.View.Details - ' - 'ColumnHeader1 - ' - Me.ColumnHeader1.Text = "Cycle path" - Me.ColumnHeader1.Width = 470 - ' - 'BtDRIrem - ' - Me.BtDRIrem.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.BtDRIrem.Image = Global.TUGraz.VECTO.My.Resources.Resources.minus_circle_icon - Me.BtDRIrem.Location = New System.Drawing.Point(29, 109) - Me.BtDRIrem.Name = "BtDRIrem" - Me.BtDRIrem.Size = New System.Drawing.Size(24, 24) - Me.BtDRIrem.TabIndex = 2 - Me.BtDRIrem.UseVisualStyleBackColor = True - ' - 'BtDRIadd - ' - Me.BtDRIadd.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.BtDRIadd.Image = Global.TUGraz.VECTO.My.Resources.Resources.plus_circle_icon - Me.BtDRIadd.Location = New System.Drawing.Point(5, 109) - Me.BtDRIadd.Name = "BtDRIadd" - Me.BtDRIadd.Size = New System.Drawing.Size(24, 24) - Me.BtDRIadd.TabIndex = 1 - Me.BtDRIadd.UseVisualStyleBackColor = True - ' - 'GrAux - ' - Me.GrAux.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.GrAux.Controls.Add(Me.Label9) - Me.GrAux.Controls.Add(Me.TbAuxPAdd) - Me.GrAux.Controls.Add(Me.Label8) - Me.GrAux.Controls.Add(Me.btnAAUXOpen) - Me.GrAux.Controls.Add(Me.Label1) - Me.GrAux.Controls.Add(Me.btnBrowseAAUXFile) - Me.GrAux.Controls.Add(Me.txtAdvancedAuxiliaryFile) - Me.GrAux.Controls.Add(Me.picAuxInfo) - Me.GrAux.Controls.Add(Me.cboAdvancedAuxiliaries) - Me.GrAux.Controls.Add(Me.lbAdvancedAuxiliaries) - Me.GrAux.Controls.Add(Me.Label32) - Me.GrAux.Controls.Add(Me.LvAux) - Me.GrAux.Controls.Add(Me.ButAuxRem) - Me.GrAux.Controls.Add(Me.ButAuxAdd) - Me.GrAux.Location = New System.Drawing.Point(6, 87) - Me.GrAux.Name = "GrAux" - Me.GrAux.Size = New System.Drawing.Size(515, 245) - Me.GrAux.TabIndex = 9 - Me.GrAux.TabStop = False - Me.GrAux.Text = "Auxiliaries" - ' - 'Label9 - ' - Me.Label9.AutoSize = True - Me.Label9.Location = New System.Drawing.Point(191, 74) - Me.Label9.Name = "Label9" - Me.Label9.Size = New System.Drawing.Size(24, 13) - Me.Label9.TabIndex = 44 - Me.Label9.Text = "[W]" - ' - 'TbAuxPAdd - ' - Me.TbAuxPAdd.Location = New System.Drawing.Point(109, 71) - Me.TbAuxPAdd.Name = "TbAuxPAdd" - Me.TbAuxPAdd.Size = New System.Drawing.Size(76, 20) - Me.TbAuxPAdd.TabIndex = 43 - ' - 'Label8 - ' - Me.Label8.AutoSize = True - Me.Label8.Location = New System.Drawing.Point(7, 74) - Me.Label8.Name = "Label8" - Me.Label8.Size = New System.Drawing.Size(97, 13) - Me.Label8.TabIndex = 42 - Me.Label8.Text = "Constant Aux Load" - ' - 'btnAAUXOpen - ' - Me.btnAAUXOpen.Image = Global.TUGraz.VECTO.My.Resources.Resources.application_export_icon_small - Me.btnAAUXOpen.Location = New System.Drawing.Point(485, 43) - Me.btnAAUXOpen.Name = "btnAAUXOpen" - Me.btnAAUXOpen.Size = New System.Drawing.Size(24, 24) - Me.btnAAUXOpen.TabIndex = 41 - Me.btnAAUXOpen.UseVisualStyleBackColor = True - ' - 'Label1 - ' - Me.Label1.AutoSize = True - Me.Label1.Location = New System.Drawing.Point(8, 48) - Me.Label1.Name = "Label1" - Me.Label1.Size = New System.Drawing.Size(96, 13) - Me.Label1.TabIndex = 40 - Me.Label1.Text = "Advanced Aux File" - ' - 'btnBrowseAAUXFile - ' - Me.btnBrowseAAUXFile.Image = Global.TUGraz.VECTO.My.Resources.Resources.Open_icon - Me.btnBrowseAAUXFile.Location = New System.Drawing.Point(461, 43) - Me.btnBrowseAAUXFile.Name = "btnBrowseAAUXFile" - Me.btnBrowseAAUXFile.Size = New System.Drawing.Size(24, 24) - Me.btnBrowseAAUXFile.TabIndex = 39 - Me.ToolTip1.SetToolTip(Me.btnBrowseAAUXFile, "Configure/Browser Advanced Auxiliary Files") - Me.btnBrowseAAUXFile.UseVisualStyleBackColor = True - ' - 'txtAdvancedAuxiliaryFile - ' - Me.txtAdvancedAuxiliaryFile.Location = New System.Drawing.Point(109, 45) - Me.txtAdvancedAuxiliaryFile.Name = "txtAdvancedAuxiliaryFile" - Me.txtAdvancedAuxiliaryFile.Size = New System.Drawing.Size(351, 20) - Me.txtAdvancedAuxiliaryFile.TabIndex = 38 - ' - 'picAuxInfo - ' - Me.picAuxInfo.Image = Global.TUGraz.VECTO.My.Resources.Resources.Information_icon - Me.picAuxInfo.InitialImage = Global.TUGraz.VECTO.My.Resources.Resources.Information_icon - Me.picAuxInfo.Location = New System.Drawing.Point(463, 19) - Me.picAuxInfo.Name = "picAuxInfo" - Me.picAuxInfo.Size = New System.Drawing.Size(16, 16) - Me.picAuxInfo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize - Me.picAuxInfo.TabIndex = 37 - Me.picAuxInfo.TabStop = False - ' - 'cboAdvancedAuxiliaries - ' - Me.cboAdvancedAuxiliaries.FormattingEnabled = True - Me.cboAdvancedAuxiliaries.Location = New System.Drawing.Point(109, 18) - Me.cboAdvancedAuxiliaries.Name = "cboAdvancedAuxiliaries" - Me.cboAdvancedAuxiliaries.Size = New System.Drawing.Size(351, 21) - Me.cboAdvancedAuxiliaries.TabIndex = 36 - ' - 'lbAdvancedAuxiliaries - ' - Me.lbAdvancedAuxiliaries.AutoSize = True - Me.lbAdvancedAuxiliaries.Location = New System.Drawing.Point(32, 21) - Me.lbAdvancedAuxiliaries.Name = "lbAdvancedAuxiliaries" - Me.lbAdvancedAuxiliaries.Size = New System.Drawing.Size(72, 13) - Me.lbAdvancedAuxiliaries.TabIndex = 35 - Me.lbAdvancedAuxiliaries.Text = "Auxiliary Type" - ' - 'Label32 - ' - Me.Label32.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.Label32.AutoSize = True - Me.Label32.Location = New System.Drawing.Point(403, 217) - Me.Label32.Name = "Label32" - Me.Label32.Size = New System.Drawing.Size(106, 13) - Me.Label32.TabIndex = 3 - Me.Label32.Text = "(Double-Click to Edit)" - ' - 'LvAux - ' - Me.LvAux.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.LvAux.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader4, Me.ColumnHeader5, Me.ColumnHeader6}) - Me.LvAux.FullRowSelect = True - Me.LvAux.GridLines = True - Me.LvAux.HideSelection = False - Me.LvAux.Location = New System.Drawing.Point(6, 103) - Me.LvAux.MultiSelect = False - Me.LvAux.Name = "LvAux" - Me.LvAux.Size = New System.Drawing.Size(503, 113) - Me.LvAux.TabIndex = 0 - Me.LvAux.TabStop = False - Me.LvAux.UseCompatibleStateImageBehavior = False - Me.LvAux.View = System.Windows.Forms.View.Details - ' - 'ColumnHeader4 - ' - Me.ColumnHeader4.Text = "ID" - Me.ColumnHeader4.Width = 45 - ' - 'ColumnHeader5 - ' - Me.ColumnHeader5.Text = "Type" - Me.ColumnHeader5.Width = 108 - ' - 'ColumnHeader6 - ' - Me.ColumnHeader6.Text = "Input File" - Me.ColumnHeader6.Width = 331 - ' - 'ButAuxRem - ' - Me.ButAuxRem.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButAuxRem.Image = Global.TUGraz.VECTO.My.Resources.Resources.minus_circle_icon - Me.ButAuxRem.Location = New System.Drawing.Point(29, 217) - Me.ButAuxRem.Name = "ButAuxRem" - Me.ButAuxRem.Size = New System.Drawing.Size(24, 24) - Me.ButAuxRem.TabIndex = 2 - Me.ButAuxRem.UseVisualStyleBackColor = True - ' - 'ButAuxAdd - ' - Me.ButAuxAdd.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButAuxAdd.Image = Global.TUGraz.VECTO.My.Resources.Resources.plus_circle_icon - Me.ButAuxAdd.Location = New System.Drawing.Point(5, 217) - Me.ButAuxAdd.Name = "ButAuxAdd" - Me.ButAuxAdd.Size = New System.Drawing.Size(24, 24) - Me.ButAuxAdd.TabIndex = 1 - Me.ButAuxAdd.UseVisualStyleBackColor = True - ' - 'TbGBX - ' - Me.TbGBX.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.TbGBX.Location = New System.Drawing.Point(84, 60) - Me.TbGBX.Name = "TbGBX" - Me.TbGBX.Size = New System.Drawing.Size(411, 20) - Me.TbGBX.TabIndex = 7 - ' - 'TbENG - ' - Me.TbENG.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.TbENG.Location = New System.Drawing.Point(84, 33) - Me.TbENG.Name = "TbENG" - Me.TbENG.Size = New System.Drawing.Size(411, 20) - Me.TbENG.TabIndex = 4 - ' - 'TbVEH - ' - Me.TbVEH.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.TbVEH.Location = New System.Drawing.Point(84, 7) - Me.TbVEH.Name = "TbVEH" - Me.TbVEH.Size = New System.Drawing.Size(411, 20) - Me.TbVEH.TabIndex = 1 - ' - 'ButOpenGBX - ' - Me.ButOpenGBX.Location = New System.Drawing.Point(6, 60) - Me.ButOpenGBX.Name = "ButOpenGBX" - Me.ButOpenGBX.Size = New System.Drawing.Size(72, 21) - Me.ButOpenGBX.TabIndex = 6 - Me.ButOpenGBX.TabStop = False - Me.ButOpenGBX.Text = "Gearbox" - Me.ButOpenGBX.UseVisualStyleBackColor = True - ' - 'ButOpenENG - ' - Me.ButOpenENG.Location = New System.Drawing.Point(6, 33) - Me.ButOpenENG.Name = "ButOpenENG" - Me.ButOpenENG.Size = New System.Drawing.Size(72, 21) - Me.ButOpenENG.TabIndex = 3 - Me.ButOpenENG.TabStop = False - Me.ButOpenENG.Text = "Engine" - Me.ButOpenENG.UseVisualStyleBackColor = True - ' - 'ButOpenVEH - ' - Me.ButOpenVEH.Location = New System.Drawing.Point(6, 6) - Me.ButOpenVEH.Name = "ButOpenVEH" - Me.ButOpenVEH.Size = New System.Drawing.Size(72, 21) - Me.ButOpenVEH.TabIndex = 0 - Me.ButOpenVEH.TabStop = False - Me.ButOpenVEH.Text = "Vehicle" - Me.ButOpenVEH.UseVisualStyleBackColor = True - ' - 'ButtonVEH - ' - Me.ButtonVEH.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButtonVEH.Image = CType(resources.GetObject("ButtonVEH.Image"), System.Drawing.Image) - Me.ButtonVEH.Location = New System.Drawing.Point(496, 5) - Me.ButtonVEH.Name = "ButtonVEH" - Me.ButtonVEH.Size = New System.Drawing.Size(24, 24) - Me.ButtonVEH.TabIndex = 2 - Me.ButtonVEH.TabStop = False - Me.ButtonVEH.UseVisualStyleBackColor = True - ' - 'ButtonGBX - ' - Me.ButtonGBX.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButtonGBX.Image = CType(resources.GetObject("ButtonGBX.Image"), System.Drawing.Image) - Me.ButtonGBX.Location = New System.Drawing.Point(496, 58) - Me.ButtonGBX.Name = "ButtonGBX" - Me.ButtonGBX.Size = New System.Drawing.Size(24, 24) - Me.ButtonGBX.TabIndex = 8 - Me.ButtonGBX.TabStop = False - Me.ButtonGBX.UseVisualStyleBackColor = True - ' - 'ButtonMAP - ' - Me.ButtonMAP.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButtonMAP.Image = CType(resources.GetObject("ButtonMAP.Image"), System.Drawing.Image) - Me.ButtonMAP.Location = New System.Drawing.Point(496, 31) - Me.ButtonMAP.Name = "ButtonMAP" - Me.ButtonMAP.Size = New System.Drawing.Size(24, 24) - Me.ButtonMAP.TabIndex = 5 - Me.ButtonMAP.TabStop = False - Me.ButtonMAP.UseVisualStyleBackColor = True - ' - 'TabControl1 - ' - Me.TabControl1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.TabControl1.Controls.Add(Me.TabPgGen) - Me.TabControl1.Controls.Add(Me.TabPgDriver) - Me.TabControl1.Location = New System.Drawing.Point(1, 107) - Me.TabControl1.Name = "TabControl1" - Me.TabControl1.SelectedIndex = 0 - Me.TabControl1.Size = New System.Drawing.Size(535, 513) - Me.TabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed - Me.TabControl1.TabIndex = 0 - ' - 'TabPgDriver - ' - Me.TabPgDriver.Controls.Add(Me.GrVACC) - Me.TabPgDriver.Controls.Add(Me.GrLAC) - Me.TabPgDriver.Controls.Add(Me.GroupBox1) - Me.TabPgDriver.Location = New System.Drawing.Point(4, 22) - Me.TabPgDriver.Name = "TabPgDriver" - Me.TabPgDriver.Padding = New System.Windows.Forms.Padding(3) - Me.TabPgDriver.Size = New System.Drawing.Size(527, 487) - Me.TabPgDriver.TabIndex = 7 - Me.TabPgDriver.Text = "Driver Model" - Me.TabPgDriver.UseVisualStyleBackColor = True - ' - 'GrVACC - ' - Me.GrVACC.Controls.Add(Me.Label15) - Me.GrVACC.Controls.Add(Me.TbDesMaxFile) - Me.GrVACC.Controls.Add(Me.BtDesMaxBr) - Me.GrVACC.Controls.Add(Me.BtAccOpen) - Me.GrVACC.Location = New System.Drawing.Point(9, 271) - Me.GrVACC.Name = "GrVACC" - Me.GrVACC.Size = New System.Drawing.Size(515, 69) - Me.GrVACC.TabIndex = 3 - Me.GrVACC.TabStop = False - Me.GrVACC.Text = "Max. acceleration and brake curves" - ' - 'Label15 - ' - Me.Label15.AutoSize = True - Me.Label15.Location = New System.Drawing.Point(3, 20) - Me.Label15.Name = "Label15" - Me.Label15.Size = New System.Drawing.Size(220, 13) - Me.Label15.TabIndex = 4 - Me.Label15.Text = "Driver Acceleration/Deceleration File (.vacc):" - ' - 'TbDesMaxFile - ' - Me.TbDesMaxFile.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.TbDesMaxFile.Location = New System.Drawing.Point(6, 36) - Me.TbDesMaxFile.Name = "TbDesMaxFile" - Me.TbDesMaxFile.Size = New System.Drawing.Size(450, 20) - Me.TbDesMaxFile.TabIndex = 0 - ' - 'BtDesMaxBr - ' - Me.BtDesMaxBr.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.BtDesMaxBr.Image = Global.TUGraz.VECTO.My.Resources.Resources.Open_icon - Me.BtDesMaxBr.Location = New System.Drawing.Point(457, 34) - Me.BtDesMaxBr.Name = "BtDesMaxBr" - Me.BtDesMaxBr.Size = New System.Drawing.Size(24, 24) - Me.BtDesMaxBr.TabIndex = 1 - Me.BtDesMaxBr.UseVisualStyleBackColor = True - ' - 'BtAccOpen - ' - Me.BtAccOpen.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.BtAccOpen.Image = Global.TUGraz.VECTO.My.Resources.Resources.application_export_icon_small - Me.BtAccOpen.Location = New System.Drawing.Point(481, 34) - Me.BtAccOpen.Name = "BtAccOpen" - Me.BtAccOpen.Size = New System.Drawing.Size(24, 24) - Me.BtAccOpen.TabIndex = 2 - Me.BtAccOpen.TabStop = False - Me.BtAccOpen.UseVisualStyleBackColor = True - ' - 'GrLAC - ' - Me.GrLAC.Controls.Add(Me.pnLookAheadCoasting) - Me.GrLAC.Controls.Add(Me.CbLookAhead) - Me.GrLAC.Location = New System.Drawing.Point(9, 92) - Me.GrLAC.Name = "GrLAC" - Me.GrLAC.Size = New System.Drawing.Size(514, 173) - Me.GrLAC.TabIndex = 2 - Me.GrLAC.TabStop = False - Me.GrLAC.Text = "Look-Ahead Coasting" - ' - 'pnLookAheadCoasting - ' - Me.pnLookAheadCoasting.Controls.Add(Me.Label7) - Me.pnLookAheadCoasting.Controls.Add(Me.Label6) - Me.pnLookAheadCoasting.Controls.Add(Me.tbLacMinSpeed) - Me.pnLookAheadCoasting.Controls.Add(Me.btnDfVelocityDrop) - Me.pnLookAheadCoasting.Controls.Add(Me.Label12) - Me.pnLookAheadCoasting.Controls.Add(Me.tbDfCoastingScale) - Me.pnLookAheadCoasting.Controls.Add(Me.Label11) - Me.pnLookAheadCoasting.Controls.Add(Me.Label3) - Me.pnLookAheadCoasting.Controls.Add(Me.tbDfCoastingOffset) - Me.pnLookAheadCoasting.Controls.Add(Me.tbLacDfTargetSpeedFile) - Me.pnLookAheadCoasting.Controls.Add(Me.Label10) - Me.pnLookAheadCoasting.Controls.Add(Me.Label4) - Me.pnLookAheadCoasting.Controls.Add(Me.Label5) - Me.pnLookAheadCoasting.Controls.Add(Me.btnDfTargetSpeed) - Me.pnLookAheadCoasting.Controls.Add(Me.tbLacPreviewFactor) - Me.pnLookAheadCoasting.Controls.Add(Me.tbLacDfVelocityDropFile) - Me.pnLookAheadCoasting.Location = New System.Drawing.Point(15, 19) - Me.pnLookAheadCoasting.Name = "pnLookAheadCoasting" - Me.pnLookAheadCoasting.Size = New System.Drawing.Size(493, 129) - Me.pnLookAheadCoasting.TabIndex = 20 - ' - 'Label7 - ' - Me.Label7.AutoSize = True - Me.Label7.Location = New System.Drawing.Point(245, 6) - Me.Label7.Name = "Label7" - Me.Label7.Size = New System.Drawing.Size(38, 13) - Me.Label7.TabIndex = 4 - Me.Label7.Text = "[km/h]" - ' - 'Label6 - ' - Me.Label6.AutoSize = True - Me.Label6.Location = New System.Drawing.Point(106, 5) - Me.Label6.Name = "Label6" - Me.Label6.Size = New System.Drawing.Size(67, 13) - Me.Label6.TabIndex = 33 - Me.Label6.Text = "Min. Velocity" - Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight - ' - 'tbLacMinSpeed - ' - Me.tbLacMinSpeed.Location = New System.Drawing.Point(179, 3) - Me.tbLacMinSpeed.Name = "tbLacMinSpeed" - Me.tbLacMinSpeed.Size = New System.Drawing.Size(64, 20) - Me.tbLacMinSpeed.TabIndex = 34 - ' - 'btnDfVelocityDrop - ' - Me.btnDfVelocityDrop.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.btnDfVelocityDrop.Image = CType(resources.GetObject("btnDfVelocityDrop.Image"), System.Drawing.Image) - Me.btnDfVelocityDrop.Location = New System.Drawing.Point(466, 78) - Me.btnDfVelocityDrop.Name = "btnDfVelocityDrop" - Me.btnDfVelocityDrop.Size = New System.Drawing.Size(24, 24) - Me.btnDfVelocityDrop.TabIndex = 32 - Me.btnDfVelocityDrop.TabStop = False - Me.btnDfVelocityDrop.UseVisualStyleBackColor = True - ' - 'Label12 - ' - Me.Label12.AutoSize = True - Me.Label12.Location = New System.Drawing.Point(284, 110) - Me.Label12.Name = "Label12" - Me.Label12.Size = New System.Drawing.Size(130, 13) - Me.Label12.TabIndex = 31 - Me.Label12.Text = "* DF_vTarget * DF_vDrop" - ' - 'tbDfCoastingScale - ' - Me.tbDfCoastingScale.Location = New System.Drawing.Point(241, 107) - Me.tbDfCoastingScale.Name = "tbDfCoastingScale" - Me.tbDfCoastingScale.Size = New System.Drawing.Size(37, 20) - Me.tbDfCoastingScale.TabIndex = 30 - ' - 'Label11 - ' - Me.Label11.AutoSize = True - Me.Label11.Location = New System.Drawing.Point(224, 109) - Me.Label11.Name = "Label11" - Me.Label11.Size = New System.Drawing.Size(13, 13) - Me.Label11.TabIndex = 29 - Me.Label11.Text = "- " - ' - 'Label3 - ' - Me.Label3.AutoSize = True - Me.Label3.Location = New System.Drawing.Point(55, 30) - Me.Label3.Name = "Label3" - Me.Label3.Size = New System.Drawing.Size(118, 13) - Me.Label3.TabIndex = 20 - Me.Label3.Text = "Preview distance factor" - Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight - ' - 'tbDfCoastingOffset - ' - Me.tbDfCoastingOffset.Location = New System.Drawing.Point(180, 107) - Me.tbDfCoastingOffset.Name = "tbDfCoastingOffset" - Me.tbDfCoastingOffset.Size = New System.Drawing.Size(37, 20) - Me.tbDfCoastingOffset.TabIndex = 28 - ' - 'tbLacDfTargetSpeedFile - ' - Me.tbLacDfTargetSpeedFile.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.tbLacDfTargetSpeedFile.Location = New System.Drawing.Point(179, 54) - Me.tbLacDfTargetSpeedFile.Name = "tbLacDfTargetSpeedFile" - Me.tbLacDfTargetSpeedFile.Size = New System.Drawing.Size(286, 20) - Me.tbLacDfTargetSpeedFile.TabIndex = 22 - ' - 'Label10 - ' - Me.Label10.AutoSize = True - Me.Label10.Location = New System.Drawing.Point(94, 109) - Me.Label10.Name = "Label10" - Me.Label10.Size = New System.Drawing.Size(79, 13) - Me.Label10.TabIndex = 27 - Me.Label10.Text = "DF_coasting = " - ' - 'Label4 - ' - Me.Label4.AutoSize = True - Me.Label4.Location = New System.Drawing.Point(18, 56) - Me.Label4.Name = "Label4" - Me.Label4.Size = New System.Drawing.Size(155, 13) - Me.Label4.TabIndex = 24 - Me.Label4.Text = "Decision Factor - Target Speed" - Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight - ' - 'Label5 - ' - Me.Label5.AutoSize = True - Me.Label5.Location = New System.Drawing.Point(20, 83) - Me.Label5.Name = "Label5" - Me.Label5.Size = New System.Drawing.Size(153, 13) - Me.Label5.TabIndex = 26 - Me.Label5.Text = "Decision Factor - Velocity Drop" - Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight - ' - 'btnDfTargetSpeed - ' - Me.btnDfTargetSpeed.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.btnDfTargetSpeed.Image = CType(resources.GetObject("btnDfTargetSpeed.Image"), System.Drawing.Image) - Me.btnDfTargetSpeed.Location = New System.Drawing.Point(466, 52) - Me.btnDfTargetSpeed.Name = "btnDfTargetSpeed" - Me.btnDfTargetSpeed.Size = New System.Drawing.Size(24, 24) - Me.btnDfTargetSpeed.TabIndex = 23 - Me.btnDfTargetSpeed.TabStop = False - Me.btnDfTargetSpeed.UseVisualStyleBackColor = True - ' - 'tbLacPreviewFactor - ' - Me.tbLacPreviewFactor.Location = New System.Drawing.Point(179, 28) - Me.tbLacPreviewFactor.Name = "tbLacPreviewFactor" - Me.tbLacPreviewFactor.Size = New System.Drawing.Size(64, 20) - Me.tbLacPreviewFactor.TabIndex = 21 - ' - 'tbLacDfVelocityDropFile - ' - Me.tbLacDfVelocityDropFile.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.tbLacDfVelocityDropFile.Location = New System.Drawing.Point(179, 81) - Me.tbLacDfVelocityDropFile.Name = "tbLacDfVelocityDropFile" - Me.tbLacDfVelocityDropFile.Size = New System.Drawing.Size(286, 20) - Me.tbLacDfVelocityDropFile.TabIndex = 25 - ' - 'CbLookAhead - ' - Me.CbLookAhead.AutoSize = True - Me.CbLookAhead.Checked = True - Me.CbLookAhead.CheckState = System.Windows.Forms.CheckState.Checked - Me.CbLookAhead.Location = New System.Drawing.Point(16, 21) - Me.CbLookAhead.Name = "CbLookAhead" - Me.CbLookAhead.Size = New System.Drawing.Size(65, 17) - Me.CbLookAhead.TabIndex = 0 - Me.CbLookAhead.Text = "Enabled" - Me.CbLookAhead.UseVisualStyleBackColor = True - ' - 'GroupBox1 - ' - Me.GroupBox1.Controls.Add(Me.GroupBox2) - Me.GroupBox1.Controls.Add(Me.PnEcoRoll) - Me.GroupBox1.Controls.Add(Me.RdOverspeed) - Me.GroupBox1.Controls.Add(Me.RdOff) - Me.GroupBox1.Location = New System.Drawing.Point(9, 9) - Me.GroupBox1.Name = "GroupBox1" - Me.GroupBox1.Size = New System.Drawing.Size(515, 77) - Me.GroupBox1.TabIndex = 1 - Me.GroupBox1.TabStop = False - Me.GroupBox1.Text = "Overspeed" - ' - 'GroupBox2 - ' - Me.GroupBox2.Controls.Add(Me.Label22) - Me.GroupBox2.Controls.Add(Me.TbUnderSpeed) - Me.GroupBox2.Controls.Add(Me.Label20) - Me.GroupBox2.Enabled = False - Me.GroupBox2.Location = New System.Drawing.Point(338, 14) - Me.GroupBox2.Name = "GroupBox2" - Me.GroupBox2.Size = New System.Drawing.Size(168, 57) - Me.GroupBox2.TabIndex = 37 - Me.GroupBox2.TabStop = False - Me.GroupBox2.Text = "!! hidden !!" - Me.GroupBox2.Visible = False - ' - 'Label22 - ' - Me.Label22.AutoSize = True - Me.Label22.Location = New System.Drawing.Point(6, 16) - Me.Label22.Name = "Label22" - Me.Label22.Size = New System.Drawing.Size(91, 13) - Me.Label22.TabIndex = 1 - Me.Label22.Text = "Max. Underspeed" - Me.Label22.Visible = False - ' - 'TbUnderSpeed - ' - Me.TbUnderSpeed.Location = New System.Drawing.Point(9, 32) - Me.TbUnderSpeed.Name = "TbUnderSpeed" - Me.TbUnderSpeed.Size = New System.Drawing.Size(64, 20) - Me.TbUnderSpeed.TabIndex = 1 - Me.TbUnderSpeed.Visible = False - ' - 'Label20 - ' - Me.Label20.AutoSize = True - Me.Label20.Location = New System.Drawing.Point(75, 36) - Me.Label20.Name = "Label20" - Me.Label20.Size = New System.Drawing.Size(38, 13) - Me.Label20.TabIndex = 3 - Me.Label20.Text = "[km/h]" - Me.Label20.Visible = False - ' - 'PnEcoRoll - ' - Me.PnEcoRoll.Controls.Add(Me.Label21) - Me.PnEcoRoll.Controls.Add(Me.Label14) - Me.PnEcoRoll.Controls.Add(Me.TbVmin) - Me.PnEcoRoll.Controls.Add(Me.TbOverspeed) - Me.PnEcoRoll.Controls.Add(Me.Label23) - Me.PnEcoRoll.Controls.Add(Me.Label13) - Me.PnEcoRoll.Location = New System.Drawing.Point(91, 17) - Me.PnEcoRoll.Name = "PnEcoRoll" - Me.PnEcoRoll.Size = New System.Drawing.Size(232, 54) - Me.PnEcoRoll.TabIndex = 3 - ' - 'Label21 - ' - Me.Label21.AutoSize = True - Me.Label21.Location = New System.Drawing.Point(170, 31) - Me.Label21.Name = "Label21" - Me.Label21.Size = New System.Drawing.Size(38, 13) - Me.Label21.TabIndex = 3 - Me.Label21.Text = "[km/h]" - ' - 'Label14 - ' - Me.Label14.AutoSize = True - Me.Label14.Location = New System.Drawing.Point(170, 5) - Me.Label14.Name = "Label14" - Me.Label14.Size = New System.Drawing.Size(38, 13) - Me.Label14.TabIndex = 3 - Me.Label14.Text = "[km/h]" - ' - 'TbVmin - ' - Me.TbVmin.Location = New System.Drawing.Point(104, 28) - Me.TbVmin.Name = "TbVmin" - Me.TbVmin.Size = New System.Drawing.Size(64, 20) - Me.TbVmin.TabIndex = 2 - ' - 'TbOverspeed - ' - Me.TbOverspeed.Location = New System.Drawing.Point(104, 2) - Me.TbOverspeed.Name = "TbOverspeed" - Me.TbOverspeed.Size = New System.Drawing.Size(64, 20) - Me.TbOverspeed.TabIndex = 0 - ' - 'Label23 - ' - Me.Label23.AutoSize = True - Me.Label23.Location = New System.Drawing.Point(18, 31) - Me.Label23.Name = "Label23" - Me.Label23.Size = New System.Drawing.Size(80, 13) - Me.Label23.TabIndex = 1 - Me.Label23.Text = "Minimum speed" - ' - 'Label13 - ' - Me.Label13.AutoSize = True - Me.Label13.Location = New System.Drawing.Point(13, 5) - Me.Label13.Name = "Label13" - Me.Label13.Size = New System.Drawing.Size(85, 13) - Me.Label13.TabIndex = 1 - Me.Label13.Text = "Max. Overspeed" - ' - 'RdOverspeed - ' - Me.RdOverspeed.AutoSize = True - Me.RdOverspeed.Checked = True - Me.RdOverspeed.Location = New System.Drawing.Point(16, 44) - Me.RdOverspeed.Name = "RdOverspeed" - Me.RdOverspeed.Size = New System.Drawing.Size(77, 17) - Me.RdOverspeed.TabIndex = 1 - Me.RdOverspeed.TabStop = True - Me.RdOverspeed.Text = "Overspeed" - Me.RdOverspeed.UseVisualStyleBackColor = True - ' - 'RdOff - ' - Me.RdOff.AutoSize = True - Me.RdOff.Location = New System.Drawing.Point(16, 21) - Me.RdOff.Name = "RdOff" - Me.RdOff.Size = New System.Drawing.Size(39, 17) - Me.RdOff.TabIndex = 0 - Me.RdOff.Text = "Off" - Me.RdOff.UseVisualStyleBackColor = True - ' - 'StatusStrip1 - ' - Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripStatusLabelGEN}) - Me.StatusStrip1.Location = New System.Drawing.Point(0, 624) - Me.StatusStrip1.Name = "StatusStrip1" - Me.StatusStrip1.Size = New System.Drawing.Size(944, 22) - Me.StatusStrip1.SizingGrip = False - Me.StatusStrip1.TabIndex = 6 - Me.StatusStrip1.Text = "StatusStrip1" - ' - 'ToolStripStatusLabelGEN - ' - Me.ToolStripStatusLabelGEN.Name = "ToolStripStatusLabelGEN" - Me.ToolStripStatusLabelGEN.Size = New System.Drawing.Size(121, 17) - Me.ToolStripStatusLabelGEN.Text = "ToolStripStatusLabel1" - ' - 'ButOK - ' - Me.ButOK.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButOK.Location = New System.Drawing.Point(778, 597) - Me.ButOK.Name = "ButOK" - Me.ButOK.Size = New System.Drawing.Size(75, 23) - Me.ButOK.TabIndex = 0 - Me.ButOK.Text = "Save" - Me.ButOK.UseVisualStyleBackColor = True - ' - 'ButCancel - ' - Me.ButCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel - Me.ButCancel.Location = New System.Drawing.Point(859, 597) - Me.ButCancel.Name = "ButCancel" - Me.ButCancel.Size = New System.Drawing.Size(75, 23) - Me.ButCancel.TabIndex = 1 - Me.ButCancel.Text = "Cancel" - Me.ButCancel.UseVisualStyleBackColor = True - ' - 'ToolStrip1 - ' - Me.ToolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden - Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripBtNew, Me.ToolStripBtOpen, Me.ToolStripBtSave, Me.ToolStripBtSaveAs, Me.ToolStripSeparator1, Me.ToolStripBtSendTo, Me.ToolStripSeparator2, Me.ToolStripButton1}) - Me.ToolStrip1.Location = New System.Drawing.Point(0, 0) - Me.ToolStrip1.Name = "ToolStrip1" - Me.ToolStrip1.Size = New System.Drawing.Size(944, 25) - Me.ToolStrip1.TabIndex = 20 - Me.ToolStrip1.Text = "ToolStrip1" - ' - 'ToolStripBtNew - ' - Me.ToolStripBtNew.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image - Me.ToolStripBtNew.Image = Global.TUGraz.VECTO.My.Resources.Resources.blue_document_icon - Me.ToolStripBtNew.ImageTransparentColor = System.Drawing.Color.Magenta - Me.ToolStripBtNew.Name = "ToolStripBtNew" - Me.ToolStripBtNew.Size = New System.Drawing.Size(23, 22) - Me.ToolStripBtNew.Text = "New" - Me.ToolStripBtNew.ToolTipText = "New" - ' - 'ToolStripBtOpen - ' - Me.ToolStripBtOpen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image - Me.ToolStripBtOpen.Image = Global.TUGraz.VECTO.My.Resources.Resources.Open_icon - Me.ToolStripBtOpen.ImageTransparentColor = System.Drawing.Color.Magenta - Me.ToolStripBtOpen.Name = "ToolStripBtOpen" - Me.ToolStripBtOpen.Size = New System.Drawing.Size(23, 22) - Me.ToolStripBtOpen.Text = "Open" - Me.ToolStripBtOpen.ToolTipText = "Open..." - ' - 'ToolStripBtSave - ' - Me.ToolStripBtSave.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image - Me.ToolStripBtSave.Image = Global.TUGraz.VECTO.My.Resources.Resources.Actions_document_save_icon - Me.ToolStripBtSave.ImageTransparentColor = System.Drawing.Color.Magenta - Me.ToolStripBtSave.Name = "ToolStripBtSave" - Me.ToolStripBtSave.Size = New System.Drawing.Size(23, 22) - Me.ToolStripBtSave.Text = "Save" - Me.ToolStripBtSave.ToolTipText = "Save" - ' - 'ToolStripBtSaveAs - ' - Me.ToolStripBtSaveAs.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image - Me.ToolStripBtSaveAs.Image = Global.TUGraz.VECTO.My.Resources.Resources.Actions_document_save_as_icon - Me.ToolStripBtSaveAs.ImageTransparentColor = System.Drawing.Color.Magenta - Me.ToolStripBtSaveAs.Name = "ToolStripBtSaveAs" - Me.ToolStripBtSaveAs.Size = New System.Drawing.Size(23, 22) - Me.ToolStripBtSaveAs.Text = "Save As" - Me.ToolStripBtSaveAs.ToolTipText = "Save As..." - ' - 'ToolStripSeparator1 - ' - Me.ToolStripSeparator1.Name = "ToolStripSeparator1" - Me.ToolStripSeparator1.Size = New System.Drawing.Size(6, 25) - ' - 'ToolStripBtSendTo - ' - Me.ToolStripBtSendTo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image - Me.ToolStripBtSendTo.Image = Global.TUGraz.VECTO.My.Resources.Resources.export_icon - Me.ToolStripBtSendTo.ImageTransparentColor = System.Drawing.Color.Magenta - Me.ToolStripBtSendTo.Name = "ToolStripBtSendTo" - Me.ToolStripBtSendTo.Size = New System.Drawing.Size(23, 22) - Me.ToolStripBtSendTo.Text = "Send to Job List" - Me.ToolStripBtSendTo.ToolTipText = "Send to Job List" - ' - 'ToolStripSeparator2 - ' - Me.ToolStripSeparator2.Name = "ToolStripSeparator2" - Me.ToolStripSeparator2.Size = New System.Drawing.Size(6, 25) - ' - 'ToolStripButton1 - ' - Me.ToolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image - Me.ToolStripButton1.Image = Global.TUGraz.VECTO.My.Resources.Resources.Help_icon - Me.ToolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta - Me.ToolStripButton1.Name = "ToolStripButton1" - Me.ToolStripButton1.Size = New System.Drawing.Size(23, 22) - Me.ToolStripButton1.Text = "Help" - ' - 'PictureBox1 - ' - Me.PictureBox1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.PictureBox1.BackColor = System.Drawing.Color.White - Me.PictureBox1.Image = Global.TUGraz.VECTO.My.Resources.Resources.VECTO_VECTO - Me.PictureBox1.Location = New System.Drawing.Point(0, 28) - Me.PictureBox1.Name = "PictureBox1" - Me.PictureBox1.Size = New System.Drawing.Size(944, 40) - Me.PictureBox1.TabIndex = 21 - Me.PictureBox1.TabStop = False - ' - 'CbEngOnly - ' - Me.CbEngOnly.AutoSize = True - Me.CbEngOnly.Location = New System.Drawing.Point(17, 84) - Me.CbEngOnly.Name = "CbEngOnly" - Me.CbEngOnly.Size = New System.Drawing.Size(113, 17) - Me.CbEngOnly.TabIndex = 0 - Me.CbEngOnly.Text = "Engine Only Mode" - Me.CbEngOnly.UseVisualStyleBackColor = True - ' - 'CmOpenFile - ' - Me.CmOpenFile.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.OpenWithToolStripMenuItem, Me.ShowInFolderToolStripMenuItem}) - Me.CmOpenFile.Name = "CmOpenFile" - Me.CmOpenFile.ShowImageMargin = False - Me.CmOpenFile.Size = New System.Drawing.Size(128, 48) - ' - 'OpenWithToolStripMenuItem - ' - Me.OpenWithToolStripMenuItem.Name = "OpenWithToolStripMenuItem" - Me.OpenWithToolStripMenuItem.Size = New System.Drawing.Size(127, 22) - Me.OpenWithToolStripMenuItem.Text = "Open with ..." - ' - 'ShowInFolderToolStripMenuItem - ' - Me.ShowInFolderToolStripMenuItem.Name = "ShowInFolderToolStripMenuItem" - Me.ShowInFolderToolStripMenuItem.Size = New System.Drawing.Size(127, 22) - Me.ShowInFolderToolStripMenuItem.Text = "Show in Folder" - ' - 'PicVehicle - ' - Me.PicVehicle.BackColor = System.Drawing.Color.LightGray - Me.PicVehicle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - Me.PicVehicle.Location = New System.Drawing.Point(542, 127) - Me.PicVehicle.Name = "PicVehicle" - Me.PicVehicle.Size = New System.Drawing.Size(300, 88) - Me.PicVehicle.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage - Me.PicVehicle.TabIndex = 36 - Me.PicVehicle.TabStop = False - ' - 'PicBox - ' - Me.PicBox.BackColor = System.Drawing.Color.LightGray - 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, 296) - Me.PicBox.TabIndex = 36 - Me.PicBox.TabStop = False - ' - 'TbEngTxt - ' - Me.TbEngTxt.Location = New System.Drawing.Point(542, 218) - Me.TbEngTxt.Name = "TbEngTxt" - Me.TbEngTxt.ReadOnly = True - Me.TbEngTxt.Size = New System.Drawing.Size(390, 20) - Me.TbEngTxt.TabIndex = 6 - ' - 'TbVehCat - ' - Me.TbVehCat.Location = New System.Drawing.Point(848, 131) - Me.TbVehCat.Name = "TbVehCat" - Me.TbVehCat.ReadOnly = True - Me.TbVehCat.Size = New System.Drawing.Size(87, 20) - Me.TbVehCat.TabIndex = 2 - ' - 'TbAxleConf - ' - Me.TbAxleConf.Location = New System.Drawing.Point(904, 160) - Me.TbAxleConf.Name = "TbAxleConf" - Me.TbAxleConf.ReadOnly = True - Me.TbAxleConf.Size = New System.Drawing.Size(31, 20) - Me.TbAxleConf.TabIndex = 4 - ' - 'TbHVCclass - ' - Me.TbHVCclass.Location = New System.Drawing.Point(848, 189) - Me.TbHVCclass.Name = "TbHVCclass" - Me.TbHVCclass.ReadOnly = True - Me.TbHVCclass.Size = New System.Drawing.Size(87, 20) - Me.TbHVCclass.TabIndex = 5 - ' - 'TbGbxTxt - ' - Me.TbGbxTxt.Location = New System.Drawing.Point(542, 241) - Me.TbGbxTxt.Name = "TbGbxTxt" - Me.TbGbxTxt.ReadOnly = True - Me.TbGbxTxt.Size = New System.Drawing.Size(390, 20) - Me.TbGbxTxt.TabIndex = 7 - ' - 'TbMass - ' - Me.TbMass.Location = New System.Drawing.Point(848, 160) - Me.TbMass.Name = "TbMass" - Me.TbMass.ReadOnly = True - 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 - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) - 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) - Me.Controls.Add(Me.TbVehCat) - Me.Controls.Add(Me.TbGbxTxt) - Me.Controls.Add(Me.TbEngTxt) - Me.Controls.Add(Me.PicBox) - Me.Controls.Add(Me.PicVehicle) - Me.Controls.Add(Me.CbEngOnly) - Me.Controls.Add(Me.PictureBox1) - Me.Controls.Add(Me.ToolStrip1) - Me.Controls.Add(Me.ButCancel) - Me.Controls.Add(Me.TabControl1) - Me.Controls.Add(Me.ButOK) - Me.Controls.Add(Me.StatusStrip1) - Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle - Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) - Me.MaximizeBox = False - Me.Name = "VectoJobForm" - Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen - Me.Text = "Job Editor" - Me.TabPgGen.ResumeLayout(False) - Me.TabPgGen.PerformLayout() - Me.GrCycles.ResumeLayout(False) - Me.GrCycles.PerformLayout() - Me.GrAux.ResumeLayout(False) - Me.GrAux.PerformLayout() - CType(Me.picAuxInfo, System.ComponentModel.ISupportInitialize).EndInit() - Me.TabControl1.ResumeLayout(False) - Me.TabPgDriver.ResumeLayout(False) - Me.GrVACC.ResumeLayout(False) - Me.GrVACC.PerformLayout() - Me.GrLAC.ResumeLayout(False) - Me.GrLAC.PerformLayout() - Me.pnLookAheadCoasting.ResumeLayout(False) - Me.pnLookAheadCoasting.PerformLayout() - Me.GroupBox1.ResumeLayout(False) - Me.GroupBox1.PerformLayout() - Me.GroupBox2.ResumeLayout(False) - Me.GroupBox2.PerformLayout() - Me.PnEcoRoll.ResumeLayout(False) - Me.PnEcoRoll.PerformLayout() - Me.StatusStrip1.ResumeLayout(False) - Me.StatusStrip1.PerformLayout() - Me.ToolStrip1.ResumeLayout(False) - Me.ToolStrip1.PerformLayout() - CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() - Me.CmOpenFile.ResumeLayout(False) - CType(Me.PicVehicle, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.PicBox, System.ComponentModel.ISupportInitialize).EndInit() - Me.ResumeLayout(False) - Me.PerformLayout() + Me.components = New System.ComponentModel.Container() + Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(VectoJobForm)) + Me.TabPgGen = New System.Windows.Forms.TabPage() + Me.GrCycles = New System.Windows.Forms.GroupBox() + Me.Label2 = New System.Windows.Forms.Label() + Me.LvCycles = New System.Windows.Forms.ListView() + Me.ColumnHeader1 = CType(New System.Windows.Forms.ColumnHeader(),System.Windows.Forms.ColumnHeader) + Me.BtDRIrem = New System.Windows.Forms.Button() + Me.BtDRIadd = New System.Windows.Forms.Button() + Me.GrAux = New System.Windows.Forms.GroupBox() + Me.Label9 = New System.Windows.Forms.Label() + Me.TbAuxPAdd = New System.Windows.Forms.TextBox() + Me.Label8 = New System.Windows.Forms.Label() + Me.btnAAUXOpen = New System.Windows.Forms.Button() + Me.Label1 = New System.Windows.Forms.Label() + Me.btnBrowseAAUXFile = New System.Windows.Forms.Button() + Me.txtAdvancedAuxiliaryFile = New System.Windows.Forms.TextBox() + Me.picAuxInfo = New System.Windows.Forms.PictureBox() + Me.cboAdvancedAuxiliaries = New System.Windows.Forms.ComboBox() + Me.lbAdvancedAuxiliaries = New System.Windows.Forms.Label() + Me.Label32 = New System.Windows.Forms.Label() + Me.LvAux = New System.Windows.Forms.ListView() + Me.ColumnHeader4 = CType(New System.Windows.Forms.ColumnHeader(),System.Windows.Forms.ColumnHeader) + Me.ColumnHeader5 = CType(New System.Windows.Forms.ColumnHeader(),System.Windows.Forms.ColumnHeader) + Me.ColumnHeader6 = CType(New System.Windows.Forms.ColumnHeader(),System.Windows.Forms.ColumnHeader) + Me.ButAuxRem = New System.Windows.Forms.Button() + Me.ButAuxAdd = New System.Windows.Forms.Button() + Me.TbGBX = New System.Windows.Forms.TextBox() + Me.TbENG = New System.Windows.Forms.TextBox() + Me.TbVEH = New System.Windows.Forms.TextBox() + Me.ButOpenGBX = New System.Windows.Forms.Button() + Me.ButOpenENG = New System.Windows.Forms.Button() + Me.ButOpenVEH = New System.Windows.Forms.Button() + Me.ButtonVEH = New System.Windows.Forms.Button() + Me.ButtonGBX = New System.Windows.Forms.Button() + Me.ButtonMAP = New System.Windows.Forms.Button() + Me.TabControl1 = New System.Windows.Forms.TabControl() + Me.TabPgDriver = New System.Windows.Forms.TabPage() + Me.GrVACC = New System.Windows.Forms.GroupBox() + Me.Label15 = New System.Windows.Forms.Label() + Me.TbDesMaxFile = New System.Windows.Forms.TextBox() + Me.BtDesMaxBr = New System.Windows.Forms.Button() + Me.BtAccOpen = New System.Windows.Forms.Button() + Me.GrLAC = New System.Windows.Forms.GroupBox() + Me.pnLookAheadCoasting = New System.Windows.Forms.Panel() + Me.Label7 = New System.Windows.Forms.Label() + Me.Label6 = New System.Windows.Forms.Label() + Me.tbLacMinSpeed = New System.Windows.Forms.TextBox() + Me.btnDfVelocityDrop = New System.Windows.Forms.Button() + Me.Label12 = New System.Windows.Forms.Label() + Me.tbDfCoastingScale = New System.Windows.Forms.TextBox() + Me.Label11 = New System.Windows.Forms.Label() + Me.Label3 = New System.Windows.Forms.Label() + Me.tbDfCoastingOffset = New System.Windows.Forms.TextBox() + Me.tbLacDfTargetSpeedFile = New System.Windows.Forms.TextBox() + Me.Label10 = New System.Windows.Forms.Label() + Me.Label4 = New System.Windows.Forms.Label() + Me.Label5 = New System.Windows.Forms.Label() + Me.btnDfTargetSpeed = New System.Windows.Forms.Button() + Me.tbLacPreviewFactor = New System.Windows.Forms.TextBox() + Me.tbLacDfVelocityDropFile = New System.Windows.Forms.TextBox() + Me.CbLookAhead = New System.Windows.Forms.CheckBox() + Me.GroupBox1 = New System.Windows.Forms.GroupBox() + Me.GroupBox2 = New System.Windows.Forms.GroupBox() + Me.Label22 = New System.Windows.Forms.Label() + Me.TbUnderSpeed = New System.Windows.Forms.TextBox() + Me.Label20 = New System.Windows.Forms.Label() + Me.PnEcoRoll = New System.Windows.Forms.Panel() + Me.Label21 = New System.Windows.Forms.Label() + Me.Label14 = New System.Windows.Forms.Label() + Me.TbVmin = New System.Windows.Forms.TextBox() + Me.TbOverspeed = New System.Windows.Forms.TextBox() + Me.Label23 = New System.Windows.Forms.Label() + Me.Label13 = New System.Windows.Forms.Label() + Me.RdOverspeed = New System.Windows.Forms.RadioButton() + Me.RdOff = New System.Windows.Forms.RadioButton() + Me.StatusStrip1 = New System.Windows.Forms.StatusStrip() + Me.ToolStripStatusLabelGEN = New System.Windows.Forms.ToolStripStatusLabel() + Me.ButOK = New System.Windows.Forms.Button() + Me.ButCancel = New System.Windows.Forms.Button() + Me.ToolStrip1 = New System.Windows.Forms.ToolStrip() + Me.ToolStripBtNew = New System.Windows.Forms.ToolStripButton() + Me.ToolStripBtOpen = New System.Windows.Forms.ToolStripButton() + Me.ToolStripBtSave = New System.Windows.Forms.ToolStripButton() + Me.ToolStripBtSaveAs = New System.Windows.Forms.ToolStripButton() + Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator() + Me.ToolStripBtSendTo = New System.Windows.Forms.ToolStripButton() + Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator() + Me.ToolStripButton1 = New System.Windows.Forms.ToolStripButton() + Me.PictureBox1 = New System.Windows.Forms.PictureBox() + Me.CbEngOnly = New System.Windows.Forms.CheckBox() + Me.CmOpenFile = New System.Windows.Forms.ContextMenuStrip(Me.components) + Me.OpenWithToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ShowInFolderToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.PicVehicle = New System.Windows.Forms.PictureBox() + Me.PicBox = New System.Windows.Forms.PictureBox() + Me.TbEngTxt = New System.Windows.Forms.TextBox() + Me.TbVehCat = New System.Windows.Forms.TextBox() + Me.TbAxleConf = New System.Windows.Forms.TextBox() + Me.TbHVCclass = New System.Windows.Forms.TextBox() + 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.TbShiftStrategyParams = New System.Windows.Forms.TextBox() + Me.BtnShiftParamsForm = New System.Windows.Forms.Button() + Me.BtnShiftStrategyParams = New System.Windows.Forms.Button() + Me.TabPgGen.SuspendLayout + Me.GrCycles.SuspendLayout + Me.GrAux.SuspendLayout + CType(Me.picAuxInfo,System.ComponentModel.ISupportInitialize).BeginInit + Me.TabControl1.SuspendLayout + Me.TabPgDriver.SuspendLayout + Me.GrVACC.SuspendLayout + Me.GrLAC.SuspendLayout + Me.pnLookAheadCoasting.SuspendLayout + Me.GroupBox1.SuspendLayout + Me.GroupBox2.SuspendLayout + Me.PnEcoRoll.SuspendLayout + Me.StatusStrip1.SuspendLayout + Me.ToolStrip1.SuspendLayout + CType(Me.PictureBox1,System.ComponentModel.ISupportInitialize).BeginInit + Me.CmOpenFile.SuspendLayout + CType(Me.PicVehicle,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.PicBox,System.ComponentModel.ISupportInitialize).BeginInit + Me.SuspendLayout + ' + 'TabPgGen + ' + Me.TabPgGen.Controls.Add(Me.TbShiftStrategyParams) + Me.TabPgGen.Controls.Add(Me.BtnShiftParamsForm) + Me.TabPgGen.Controls.Add(Me.BtnShiftStrategyParams) + Me.TabPgGen.Controls.Add(Me.GrCycles) + Me.TabPgGen.Controls.Add(Me.GrAux) + Me.TabPgGen.Controls.Add(Me.TbGBX) + Me.TabPgGen.Controls.Add(Me.TbENG) + Me.TabPgGen.Controls.Add(Me.TbVEH) + Me.TabPgGen.Controls.Add(Me.ButOpenGBX) + Me.TabPgGen.Controls.Add(Me.ButOpenENG) + Me.TabPgGen.Controls.Add(Me.ButOpenVEH) + Me.TabPgGen.Controls.Add(Me.ButtonVEH) + Me.TabPgGen.Controls.Add(Me.ButtonGBX) + Me.TabPgGen.Controls.Add(Me.ButtonMAP) + Me.TabPgGen.Location = New System.Drawing.Point(4, 22) + Me.TabPgGen.Name = "TabPgGen" + Me.TabPgGen.Padding = New System.Windows.Forms.Padding(3) + Me.TabPgGen.Size = New System.Drawing.Size(527, 512) + Me.TabPgGen.TabIndex = 0 + Me.TabPgGen.Text = "General" + Me.TabPgGen.UseVisualStyleBackColor = true + ' + 'GrCycles + ' + Me.GrCycles.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.GrCycles.Controls.Add(Me.Label2) + Me.GrCycles.Controls.Add(Me.LvCycles) + Me.GrCycles.Controls.Add(Me.BtDRIrem) + Me.GrCycles.Controls.Add(Me.BtDRIadd) + Me.GrCycles.Location = New System.Drawing.Point(5, 368) + Me.GrCycles.Name = "GrCycles" + Me.GrCycles.Size = New System.Drawing.Size(515, 138) + Me.GrCycles.TabIndex = 10 + Me.GrCycles.TabStop = false + Me.GrCycles.Text = "Cycles" + ' + 'Label2 + ' + Me.Label2.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.Label2.AutoSize = true + Me.Label2.Location = New System.Drawing.Point(391, 109) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(118, 13) + Me.Label2.TabIndex = 3 + Me.Label2.Text = "(Right-Click for Options)" + ' + 'LvCycles + ' + Me.LvCycles.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.LvCycles.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1}) + Me.LvCycles.FullRowSelect = true + Me.LvCycles.GridLines = true + Me.LvCycles.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None + Me.LvCycles.HideSelection = false + Me.LvCycles.LabelEdit = true + Me.LvCycles.Location = New System.Drawing.Point(6, 19) + Me.LvCycles.MultiSelect = false + Me.LvCycles.Name = "LvCycles" + Me.LvCycles.Size = New System.Drawing.Size(503, 89) + Me.LvCycles.TabIndex = 0 + Me.LvCycles.TabStop = false + Me.LvCycles.UseCompatibleStateImageBehavior = false + Me.LvCycles.View = System.Windows.Forms.View.Details + ' + 'ColumnHeader1 + ' + Me.ColumnHeader1.Text = "Cycle path" + Me.ColumnHeader1.Width = 470 + ' + 'BtDRIrem + ' + Me.BtDRIrem.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.BtDRIrem.Image = Global.TUGraz.VECTO.My.Resources.Resources.minus_circle_icon + Me.BtDRIrem.Location = New System.Drawing.Point(29, 109) + Me.BtDRIrem.Name = "BtDRIrem" + Me.BtDRIrem.Size = New System.Drawing.Size(24, 24) + Me.BtDRIrem.TabIndex = 2 + Me.BtDRIrem.UseVisualStyleBackColor = true + ' + 'BtDRIadd + ' + Me.BtDRIadd.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.BtDRIadd.Image = Global.TUGraz.VECTO.My.Resources.Resources.plus_circle_icon + Me.BtDRIadd.Location = New System.Drawing.Point(5, 109) + Me.BtDRIadd.Name = "BtDRIadd" + Me.BtDRIadd.Size = New System.Drawing.Size(24, 24) + Me.BtDRIadd.TabIndex = 1 + Me.BtDRIadd.UseVisualStyleBackColor = true + ' + 'GrAux + ' + Me.GrAux.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.GrAux.Controls.Add(Me.Label9) + Me.GrAux.Controls.Add(Me.TbAuxPAdd) + Me.GrAux.Controls.Add(Me.Label8) + Me.GrAux.Controls.Add(Me.btnAAUXOpen) + Me.GrAux.Controls.Add(Me.Label1) + Me.GrAux.Controls.Add(Me.btnBrowseAAUXFile) + Me.GrAux.Controls.Add(Me.txtAdvancedAuxiliaryFile) + Me.GrAux.Controls.Add(Me.picAuxInfo) + Me.GrAux.Controls.Add(Me.cboAdvancedAuxiliaries) + Me.GrAux.Controls.Add(Me.lbAdvancedAuxiliaries) + Me.GrAux.Controls.Add(Me.Label32) + Me.GrAux.Controls.Add(Me.LvAux) + Me.GrAux.Controls.Add(Me.ButAuxRem) + Me.GrAux.Controls.Add(Me.ButAuxAdd) + Me.GrAux.Location = New System.Drawing.Point(5, 117) + Me.GrAux.Name = "GrAux" + Me.GrAux.Size = New System.Drawing.Size(515, 245) + Me.GrAux.TabIndex = 9 + Me.GrAux.TabStop = false + Me.GrAux.Text = "Auxiliaries" + ' + 'Label9 + ' + Me.Label9.AutoSize = true + Me.Label9.Location = New System.Drawing.Point(191, 74) + Me.Label9.Name = "Label9" + Me.Label9.Size = New System.Drawing.Size(24, 13) + Me.Label9.TabIndex = 44 + Me.Label9.Text = "[W]" + ' + 'TbAuxPAdd + ' + Me.TbAuxPAdd.Location = New System.Drawing.Point(109, 71) + Me.TbAuxPAdd.Name = "TbAuxPAdd" + Me.TbAuxPAdd.Size = New System.Drawing.Size(76, 20) + Me.TbAuxPAdd.TabIndex = 43 + ' + 'Label8 + ' + Me.Label8.AutoSize = true + Me.Label8.Location = New System.Drawing.Point(7, 74) + Me.Label8.Name = "Label8" + Me.Label8.Size = New System.Drawing.Size(97, 13) + Me.Label8.TabIndex = 42 + Me.Label8.Text = "Constant Aux Load" + ' + 'btnAAUXOpen + ' + Me.btnAAUXOpen.Image = Global.TUGraz.VECTO.My.Resources.Resources.application_export_icon_small + Me.btnAAUXOpen.Location = New System.Drawing.Point(485, 43) + Me.btnAAUXOpen.Name = "btnAAUXOpen" + Me.btnAAUXOpen.Size = New System.Drawing.Size(24, 24) + Me.btnAAUXOpen.TabIndex = 41 + Me.btnAAUXOpen.UseVisualStyleBackColor = true + ' + 'Label1 + ' + Me.Label1.AutoSize = true + Me.Label1.Location = New System.Drawing.Point(8, 48) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(96, 13) + Me.Label1.TabIndex = 40 + Me.Label1.Text = "Advanced Aux File" + ' + 'btnBrowseAAUXFile + ' + Me.btnBrowseAAUXFile.Image = Global.TUGraz.VECTO.My.Resources.Resources.Open_icon + Me.btnBrowseAAUXFile.Location = New System.Drawing.Point(461, 43) + Me.btnBrowseAAUXFile.Name = "btnBrowseAAUXFile" + Me.btnBrowseAAUXFile.Size = New System.Drawing.Size(24, 24) + Me.btnBrowseAAUXFile.TabIndex = 39 + Me.ToolTip1.SetToolTip(Me.btnBrowseAAUXFile, "Configure/Browser Advanced Auxiliary Files") + Me.btnBrowseAAUXFile.UseVisualStyleBackColor = true + ' + 'txtAdvancedAuxiliaryFile + ' + Me.txtAdvancedAuxiliaryFile.Location = New System.Drawing.Point(109, 45) + Me.txtAdvancedAuxiliaryFile.Name = "txtAdvancedAuxiliaryFile" + Me.txtAdvancedAuxiliaryFile.Size = New System.Drawing.Size(351, 20) + Me.txtAdvancedAuxiliaryFile.TabIndex = 38 + ' + 'picAuxInfo + ' + Me.picAuxInfo.Image = Global.TUGraz.VECTO.My.Resources.Resources.Information_icon + Me.picAuxInfo.InitialImage = Global.TUGraz.VECTO.My.Resources.Resources.Information_icon + Me.picAuxInfo.Location = New System.Drawing.Point(463, 19) + Me.picAuxInfo.Name = "picAuxInfo" + Me.picAuxInfo.Size = New System.Drawing.Size(16, 16) + Me.picAuxInfo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize + Me.picAuxInfo.TabIndex = 37 + Me.picAuxInfo.TabStop = false + ' + 'cboAdvancedAuxiliaries + ' + Me.cboAdvancedAuxiliaries.FormattingEnabled = true + Me.cboAdvancedAuxiliaries.Location = New System.Drawing.Point(109, 18) + Me.cboAdvancedAuxiliaries.Name = "cboAdvancedAuxiliaries" + Me.cboAdvancedAuxiliaries.Size = New System.Drawing.Size(351, 21) + Me.cboAdvancedAuxiliaries.TabIndex = 36 + ' + 'lbAdvancedAuxiliaries + ' + Me.lbAdvancedAuxiliaries.AutoSize = true + Me.lbAdvancedAuxiliaries.Location = New System.Drawing.Point(32, 21) + Me.lbAdvancedAuxiliaries.Name = "lbAdvancedAuxiliaries" + Me.lbAdvancedAuxiliaries.Size = New System.Drawing.Size(72, 13) + Me.lbAdvancedAuxiliaries.TabIndex = 35 + Me.lbAdvancedAuxiliaries.Text = "Auxiliary Type" + ' + 'Label32 + ' + Me.Label32.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.Label32.AutoSize = true + Me.Label32.Location = New System.Drawing.Point(403, 217) + Me.Label32.Name = "Label32" + Me.Label32.Size = New System.Drawing.Size(106, 13) + Me.Label32.TabIndex = 3 + Me.Label32.Text = "(Double-Click to Edit)" + ' + 'LvAux + ' + Me.LvAux.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.LvAux.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader4, Me.ColumnHeader5, Me.ColumnHeader6}) + Me.LvAux.FullRowSelect = true + Me.LvAux.GridLines = true + Me.LvAux.HideSelection = false + Me.LvAux.Location = New System.Drawing.Point(6, 103) + Me.LvAux.MultiSelect = false + Me.LvAux.Name = "LvAux" + Me.LvAux.Size = New System.Drawing.Size(503, 113) + Me.LvAux.TabIndex = 0 + Me.LvAux.TabStop = false + Me.LvAux.UseCompatibleStateImageBehavior = false + Me.LvAux.View = System.Windows.Forms.View.Details + ' + 'ColumnHeader4 + ' + Me.ColumnHeader4.Text = "ID" + Me.ColumnHeader4.Width = 45 + ' + 'ColumnHeader5 + ' + Me.ColumnHeader5.Text = "Type" + Me.ColumnHeader5.Width = 108 + ' + 'ColumnHeader6 + ' + Me.ColumnHeader6.Text = "Input File" + Me.ColumnHeader6.Width = 331 + ' + 'ButAuxRem + ' + Me.ButAuxRem.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.ButAuxRem.Image = Global.TUGraz.VECTO.My.Resources.Resources.minus_circle_icon + Me.ButAuxRem.Location = New System.Drawing.Point(29, 217) + Me.ButAuxRem.Name = "ButAuxRem" + Me.ButAuxRem.Size = New System.Drawing.Size(24, 24) + Me.ButAuxRem.TabIndex = 2 + Me.ButAuxRem.UseVisualStyleBackColor = true + ' + 'ButAuxAdd + ' + Me.ButAuxAdd.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.ButAuxAdd.Image = Global.TUGraz.VECTO.My.Resources.Resources.plus_circle_icon + Me.ButAuxAdd.Location = New System.Drawing.Point(5, 217) + Me.ButAuxAdd.Name = "ButAuxAdd" + Me.ButAuxAdd.Size = New System.Drawing.Size(24, 24) + Me.ButAuxAdd.TabIndex = 1 + Me.ButAuxAdd.UseVisualStyleBackColor = true + ' + 'TbGBX + ' + Me.TbGBX.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.TbGBX.Location = New System.Drawing.Point(84, 60) + Me.TbGBX.Name = "TbGBX" + Me.TbGBX.Size = New System.Drawing.Size(411, 20) + Me.TbGBX.TabIndex = 7 + ' + 'TbENG + ' + Me.TbENG.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.TbENG.Location = New System.Drawing.Point(84, 33) + Me.TbENG.Name = "TbENG" + Me.TbENG.Size = New System.Drawing.Size(411, 20) + Me.TbENG.TabIndex = 4 + ' + 'TbVEH + ' + Me.TbVEH.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.TbVEH.Location = New System.Drawing.Point(84, 7) + Me.TbVEH.Name = "TbVEH" + Me.TbVEH.Size = New System.Drawing.Size(411, 20) + Me.TbVEH.TabIndex = 1 + ' + 'ButOpenGBX + ' + Me.ButOpenGBX.Location = New System.Drawing.Point(6, 60) + Me.ButOpenGBX.Name = "ButOpenGBX" + Me.ButOpenGBX.Size = New System.Drawing.Size(72, 21) + Me.ButOpenGBX.TabIndex = 6 + Me.ButOpenGBX.TabStop = false + Me.ButOpenGBX.Text = "Gearbox" + Me.ButOpenGBX.UseVisualStyleBackColor = true + ' + 'ButOpenENG + ' + Me.ButOpenENG.Location = New System.Drawing.Point(6, 33) + Me.ButOpenENG.Name = "ButOpenENG" + Me.ButOpenENG.Size = New System.Drawing.Size(72, 21) + Me.ButOpenENG.TabIndex = 3 + Me.ButOpenENG.TabStop = false + Me.ButOpenENG.Text = "Engine" + Me.ButOpenENG.UseVisualStyleBackColor = true + ' + 'ButOpenVEH + ' + Me.ButOpenVEH.Location = New System.Drawing.Point(6, 6) + Me.ButOpenVEH.Name = "ButOpenVEH" + Me.ButOpenVEH.Size = New System.Drawing.Size(72, 21) + Me.ButOpenVEH.TabIndex = 0 + Me.ButOpenVEH.TabStop = false + Me.ButOpenVEH.Text = "Vehicle" + Me.ButOpenVEH.UseVisualStyleBackColor = true + ' + 'ButtonVEH + ' + Me.ButtonVEH.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.ButtonVEH.Image = CType(resources.GetObject("ButtonVEH.Image"),System.Drawing.Image) + Me.ButtonVEH.Location = New System.Drawing.Point(496, 5) + Me.ButtonVEH.Name = "ButtonVEH" + Me.ButtonVEH.Size = New System.Drawing.Size(24, 24) + Me.ButtonVEH.TabIndex = 2 + Me.ButtonVEH.TabStop = false + Me.ButtonVEH.UseVisualStyleBackColor = true + ' + 'ButtonGBX + ' + Me.ButtonGBX.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.ButtonGBX.Image = CType(resources.GetObject("ButtonGBX.Image"),System.Drawing.Image) + Me.ButtonGBX.Location = New System.Drawing.Point(496, 58) + Me.ButtonGBX.Name = "ButtonGBX" + Me.ButtonGBX.Size = New System.Drawing.Size(24, 24) + Me.ButtonGBX.TabIndex = 8 + Me.ButtonGBX.TabStop = false + Me.ButtonGBX.UseVisualStyleBackColor = true + ' + 'ButtonMAP + ' + Me.ButtonMAP.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.ButtonMAP.Image = CType(resources.GetObject("ButtonMAP.Image"),System.Drawing.Image) + Me.ButtonMAP.Location = New System.Drawing.Point(496, 31) + Me.ButtonMAP.Name = "ButtonMAP" + Me.ButtonMAP.Size = New System.Drawing.Size(24, 24) + Me.ButtonMAP.TabIndex = 5 + Me.ButtonMAP.TabStop = false + Me.ButtonMAP.UseVisualStyleBackColor = true + ' + 'TabControl1 + ' + Me.TabControl1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.TabControl1.Controls.Add(Me.TabPgGen) + Me.TabControl1.Controls.Add(Me.TabPgDriver) + Me.TabControl1.Location = New System.Drawing.Point(1, 107) + Me.TabControl1.Name = "TabControl1" + Me.TabControl1.SelectedIndex = 0 + Me.TabControl1.Size = New System.Drawing.Size(535, 538) + Me.TabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed + Me.TabControl1.TabIndex = 0 + ' + 'TabPgDriver + ' + Me.TabPgDriver.Controls.Add(Me.GrVACC) + Me.TabPgDriver.Controls.Add(Me.GrLAC) + Me.TabPgDriver.Controls.Add(Me.GroupBox1) + Me.TabPgDriver.Location = New System.Drawing.Point(4, 22) + Me.TabPgDriver.Name = "TabPgDriver" + Me.TabPgDriver.Padding = New System.Windows.Forms.Padding(3) + Me.TabPgDriver.Size = New System.Drawing.Size(527, 487) + Me.TabPgDriver.TabIndex = 7 + Me.TabPgDriver.Text = "Driver Model" + Me.TabPgDriver.UseVisualStyleBackColor = true + ' + 'GrVACC + ' + Me.GrVACC.Controls.Add(Me.Label15) + Me.GrVACC.Controls.Add(Me.TbDesMaxFile) + Me.GrVACC.Controls.Add(Me.BtDesMaxBr) + Me.GrVACC.Controls.Add(Me.BtAccOpen) + Me.GrVACC.Location = New System.Drawing.Point(9, 271) + Me.GrVACC.Name = "GrVACC" + Me.GrVACC.Size = New System.Drawing.Size(515, 69) + Me.GrVACC.TabIndex = 3 + Me.GrVACC.TabStop = false + Me.GrVACC.Text = "Max. acceleration and brake curves" + ' + 'Label15 + ' + Me.Label15.AutoSize = true + Me.Label15.Location = New System.Drawing.Point(3, 20) + Me.Label15.Name = "Label15" + Me.Label15.Size = New System.Drawing.Size(220, 13) + Me.Label15.TabIndex = 4 + Me.Label15.Text = "Driver Acceleration/Deceleration File (.vacc):" + ' + 'TbDesMaxFile + ' + Me.TbDesMaxFile.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.TbDesMaxFile.Location = New System.Drawing.Point(6, 36) + Me.TbDesMaxFile.Name = "TbDesMaxFile" + Me.TbDesMaxFile.Size = New System.Drawing.Size(450, 20) + Me.TbDesMaxFile.TabIndex = 0 + ' + 'BtDesMaxBr + ' + Me.BtDesMaxBr.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.BtDesMaxBr.Image = Global.TUGraz.VECTO.My.Resources.Resources.Open_icon + Me.BtDesMaxBr.Location = New System.Drawing.Point(457, 34) + Me.BtDesMaxBr.Name = "BtDesMaxBr" + Me.BtDesMaxBr.Size = New System.Drawing.Size(24, 24) + Me.BtDesMaxBr.TabIndex = 1 + Me.BtDesMaxBr.UseVisualStyleBackColor = true + ' + 'BtAccOpen + ' + Me.BtAccOpen.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.BtAccOpen.Image = Global.TUGraz.VECTO.My.Resources.Resources.application_export_icon_small + Me.BtAccOpen.Location = New System.Drawing.Point(481, 34) + Me.BtAccOpen.Name = "BtAccOpen" + Me.BtAccOpen.Size = New System.Drawing.Size(24, 24) + Me.BtAccOpen.TabIndex = 2 + Me.BtAccOpen.TabStop = false + Me.BtAccOpen.UseVisualStyleBackColor = true + ' + 'GrLAC + ' + Me.GrLAC.Controls.Add(Me.pnLookAheadCoasting) + Me.GrLAC.Controls.Add(Me.CbLookAhead) + Me.GrLAC.Location = New System.Drawing.Point(9, 92) + Me.GrLAC.Name = "GrLAC" + Me.GrLAC.Size = New System.Drawing.Size(514, 173) + Me.GrLAC.TabIndex = 2 + Me.GrLAC.TabStop = false + Me.GrLAC.Text = "Look-Ahead Coasting" + ' + 'pnLookAheadCoasting + ' + Me.pnLookAheadCoasting.Controls.Add(Me.Label7) + Me.pnLookAheadCoasting.Controls.Add(Me.Label6) + Me.pnLookAheadCoasting.Controls.Add(Me.tbLacMinSpeed) + Me.pnLookAheadCoasting.Controls.Add(Me.btnDfVelocityDrop) + Me.pnLookAheadCoasting.Controls.Add(Me.Label12) + Me.pnLookAheadCoasting.Controls.Add(Me.tbDfCoastingScale) + Me.pnLookAheadCoasting.Controls.Add(Me.Label11) + Me.pnLookAheadCoasting.Controls.Add(Me.Label3) + Me.pnLookAheadCoasting.Controls.Add(Me.tbDfCoastingOffset) + Me.pnLookAheadCoasting.Controls.Add(Me.tbLacDfTargetSpeedFile) + Me.pnLookAheadCoasting.Controls.Add(Me.Label10) + Me.pnLookAheadCoasting.Controls.Add(Me.Label4) + Me.pnLookAheadCoasting.Controls.Add(Me.Label5) + Me.pnLookAheadCoasting.Controls.Add(Me.btnDfTargetSpeed) + Me.pnLookAheadCoasting.Controls.Add(Me.tbLacPreviewFactor) + Me.pnLookAheadCoasting.Controls.Add(Me.tbLacDfVelocityDropFile) + Me.pnLookAheadCoasting.Location = New System.Drawing.Point(15, 19) + Me.pnLookAheadCoasting.Name = "pnLookAheadCoasting" + Me.pnLookAheadCoasting.Size = New System.Drawing.Size(493, 129) + Me.pnLookAheadCoasting.TabIndex = 20 + ' + 'Label7 + ' + Me.Label7.AutoSize = true + Me.Label7.Location = New System.Drawing.Point(245, 6) + Me.Label7.Name = "Label7" + Me.Label7.Size = New System.Drawing.Size(38, 13) + Me.Label7.TabIndex = 4 + Me.Label7.Text = "[km/h]" + ' + 'Label6 + ' + Me.Label6.AutoSize = true + Me.Label6.Location = New System.Drawing.Point(106, 5) + Me.Label6.Name = "Label6" + Me.Label6.Size = New System.Drawing.Size(67, 13) + Me.Label6.TabIndex = 33 + Me.Label6.Text = "Min. Velocity" + Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'tbLacMinSpeed + ' + Me.tbLacMinSpeed.Location = New System.Drawing.Point(179, 3) + Me.tbLacMinSpeed.Name = "tbLacMinSpeed" + Me.tbLacMinSpeed.Size = New System.Drawing.Size(64, 20) + Me.tbLacMinSpeed.TabIndex = 34 + ' + 'btnDfVelocityDrop + ' + Me.btnDfVelocityDrop.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.btnDfVelocityDrop.Image = CType(resources.GetObject("btnDfVelocityDrop.Image"),System.Drawing.Image) + Me.btnDfVelocityDrop.Location = New System.Drawing.Point(466, 78) + Me.btnDfVelocityDrop.Name = "btnDfVelocityDrop" + Me.btnDfVelocityDrop.Size = New System.Drawing.Size(24, 24) + Me.btnDfVelocityDrop.TabIndex = 32 + Me.btnDfVelocityDrop.TabStop = false + Me.btnDfVelocityDrop.UseVisualStyleBackColor = true + ' + 'Label12 + ' + Me.Label12.AutoSize = true + Me.Label12.Location = New System.Drawing.Point(284, 110) + Me.Label12.Name = "Label12" + Me.Label12.Size = New System.Drawing.Size(130, 13) + Me.Label12.TabIndex = 31 + Me.Label12.Text = "* DF_vTarget * DF_vDrop" + ' + 'tbDfCoastingScale + ' + Me.tbDfCoastingScale.Location = New System.Drawing.Point(241, 107) + Me.tbDfCoastingScale.Name = "tbDfCoastingScale" + Me.tbDfCoastingScale.Size = New System.Drawing.Size(37, 20) + Me.tbDfCoastingScale.TabIndex = 30 + ' + 'Label11 + ' + Me.Label11.AutoSize = true + Me.Label11.Location = New System.Drawing.Point(224, 109) + Me.Label11.Name = "Label11" + Me.Label11.Size = New System.Drawing.Size(13, 13) + Me.Label11.TabIndex = 29 + Me.Label11.Text = "- " + ' + 'Label3 + ' + Me.Label3.AutoSize = true + Me.Label3.Location = New System.Drawing.Point(55, 30) + Me.Label3.Name = "Label3" + Me.Label3.Size = New System.Drawing.Size(118, 13) + Me.Label3.TabIndex = 20 + Me.Label3.Text = "Preview distance factor" + Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'tbDfCoastingOffset + ' + Me.tbDfCoastingOffset.Location = New System.Drawing.Point(180, 107) + Me.tbDfCoastingOffset.Name = "tbDfCoastingOffset" + Me.tbDfCoastingOffset.Size = New System.Drawing.Size(37, 20) + Me.tbDfCoastingOffset.TabIndex = 28 + ' + 'tbLacDfTargetSpeedFile + ' + Me.tbLacDfTargetSpeedFile.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.tbLacDfTargetSpeedFile.Location = New System.Drawing.Point(179, 54) + Me.tbLacDfTargetSpeedFile.Name = "tbLacDfTargetSpeedFile" + Me.tbLacDfTargetSpeedFile.Size = New System.Drawing.Size(286, 20) + Me.tbLacDfTargetSpeedFile.TabIndex = 22 + ' + 'Label10 + ' + Me.Label10.AutoSize = true + Me.Label10.Location = New System.Drawing.Point(94, 109) + Me.Label10.Name = "Label10" + Me.Label10.Size = New System.Drawing.Size(79, 13) + Me.Label10.TabIndex = 27 + Me.Label10.Text = "DF_coasting = " + ' + 'Label4 + ' + Me.Label4.AutoSize = true + Me.Label4.Location = New System.Drawing.Point(18, 56) + Me.Label4.Name = "Label4" + Me.Label4.Size = New System.Drawing.Size(155, 13) + Me.Label4.TabIndex = 24 + Me.Label4.Text = "Decision Factor - Target Speed" + Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'Label5 + ' + Me.Label5.AutoSize = true + Me.Label5.Location = New System.Drawing.Point(20, 83) + Me.Label5.Name = "Label5" + Me.Label5.Size = New System.Drawing.Size(153, 13) + Me.Label5.TabIndex = 26 + Me.Label5.Text = "Decision Factor - Velocity Drop" + Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'btnDfTargetSpeed + ' + Me.btnDfTargetSpeed.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.btnDfTargetSpeed.Image = CType(resources.GetObject("btnDfTargetSpeed.Image"),System.Drawing.Image) + Me.btnDfTargetSpeed.Location = New System.Drawing.Point(466, 52) + Me.btnDfTargetSpeed.Name = "btnDfTargetSpeed" + Me.btnDfTargetSpeed.Size = New System.Drawing.Size(24, 24) + Me.btnDfTargetSpeed.TabIndex = 23 + Me.btnDfTargetSpeed.TabStop = false + Me.btnDfTargetSpeed.UseVisualStyleBackColor = true + ' + 'tbLacPreviewFactor + ' + Me.tbLacPreviewFactor.Location = New System.Drawing.Point(179, 28) + Me.tbLacPreviewFactor.Name = "tbLacPreviewFactor" + Me.tbLacPreviewFactor.Size = New System.Drawing.Size(64, 20) + Me.tbLacPreviewFactor.TabIndex = 21 + ' + 'tbLacDfVelocityDropFile + ' + Me.tbLacDfVelocityDropFile.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.tbLacDfVelocityDropFile.Location = New System.Drawing.Point(179, 81) + Me.tbLacDfVelocityDropFile.Name = "tbLacDfVelocityDropFile" + Me.tbLacDfVelocityDropFile.Size = New System.Drawing.Size(286, 20) + Me.tbLacDfVelocityDropFile.TabIndex = 25 + ' + 'CbLookAhead + ' + Me.CbLookAhead.AutoSize = true + Me.CbLookAhead.Checked = true + Me.CbLookAhead.CheckState = System.Windows.Forms.CheckState.Checked + Me.CbLookAhead.Location = New System.Drawing.Point(16, 21) + Me.CbLookAhead.Name = "CbLookAhead" + Me.CbLookAhead.Size = New System.Drawing.Size(65, 17) + Me.CbLookAhead.TabIndex = 0 + Me.CbLookAhead.Text = "Enabled" + Me.CbLookAhead.UseVisualStyleBackColor = true + ' + 'GroupBox1 + ' + Me.GroupBox1.Controls.Add(Me.GroupBox2) + Me.GroupBox1.Controls.Add(Me.PnEcoRoll) + Me.GroupBox1.Controls.Add(Me.RdOverspeed) + Me.GroupBox1.Controls.Add(Me.RdOff) + Me.GroupBox1.Location = New System.Drawing.Point(9, 9) + Me.GroupBox1.Name = "GroupBox1" + Me.GroupBox1.Size = New System.Drawing.Size(515, 77) + Me.GroupBox1.TabIndex = 1 + Me.GroupBox1.TabStop = false + Me.GroupBox1.Text = "Overspeed" + ' + 'GroupBox2 + ' + Me.GroupBox2.Controls.Add(Me.Label22) + Me.GroupBox2.Controls.Add(Me.TbUnderSpeed) + Me.GroupBox2.Controls.Add(Me.Label20) + Me.GroupBox2.Enabled = false + Me.GroupBox2.Location = New System.Drawing.Point(338, 14) + Me.GroupBox2.Name = "GroupBox2" + Me.GroupBox2.Size = New System.Drawing.Size(168, 57) + Me.GroupBox2.TabIndex = 37 + Me.GroupBox2.TabStop = false + Me.GroupBox2.Text = "!! hidden !!" + Me.GroupBox2.Visible = false + ' + 'Label22 + ' + Me.Label22.AutoSize = true + Me.Label22.Location = New System.Drawing.Point(6, 16) + Me.Label22.Name = "Label22" + Me.Label22.Size = New System.Drawing.Size(91, 13) + Me.Label22.TabIndex = 1 + Me.Label22.Text = "Max. Underspeed" + Me.Label22.Visible = false + ' + 'TbUnderSpeed + ' + Me.TbUnderSpeed.Location = New System.Drawing.Point(9, 32) + Me.TbUnderSpeed.Name = "TbUnderSpeed" + Me.TbUnderSpeed.Size = New System.Drawing.Size(64, 20) + Me.TbUnderSpeed.TabIndex = 1 + Me.TbUnderSpeed.Visible = false + ' + 'Label20 + ' + Me.Label20.AutoSize = true + Me.Label20.Location = New System.Drawing.Point(75, 36) + Me.Label20.Name = "Label20" + Me.Label20.Size = New System.Drawing.Size(38, 13) + Me.Label20.TabIndex = 3 + Me.Label20.Text = "[km/h]" + Me.Label20.Visible = false + ' + 'PnEcoRoll + ' + Me.PnEcoRoll.Controls.Add(Me.Label21) + Me.PnEcoRoll.Controls.Add(Me.Label14) + Me.PnEcoRoll.Controls.Add(Me.TbVmin) + Me.PnEcoRoll.Controls.Add(Me.TbOverspeed) + Me.PnEcoRoll.Controls.Add(Me.Label23) + Me.PnEcoRoll.Controls.Add(Me.Label13) + Me.PnEcoRoll.Location = New System.Drawing.Point(91, 17) + Me.PnEcoRoll.Name = "PnEcoRoll" + Me.PnEcoRoll.Size = New System.Drawing.Size(232, 54) + Me.PnEcoRoll.TabIndex = 3 + ' + 'Label21 + ' + Me.Label21.AutoSize = true + Me.Label21.Location = New System.Drawing.Point(170, 31) + Me.Label21.Name = "Label21" + Me.Label21.Size = New System.Drawing.Size(38, 13) + Me.Label21.TabIndex = 3 + Me.Label21.Text = "[km/h]" + ' + 'Label14 + ' + Me.Label14.AutoSize = true + Me.Label14.Location = New System.Drawing.Point(170, 5) + Me.Label14.Name = "Label14" + Me.Label14.Size = New System.Drawing.Size(38, 13) + Me.Label14.TabIndex = 3 + Me.Label14.Text = "[km/h]" + ' + 'TbVmin + ' + Me.TbVmin.Location = New System.Drawing.Point(104, 28) + Me.TbVmin.Name = "TbVmin" + Me.TbVmin.Size = New System.Drawing.Size(64, 20) + Me.TbVmin.TabIndex = 2 + ' + 'TbOverspeed + ' + Me.TbOverspeed.Location = New System.Drawing.Point(104, 2) + Me.TbOverspeed.Name = "TbOverspeed" + Me.TbOverspeed.Size = New System.Drawing.Size(64, 20) + Me.TbOverspeed.TabIndex = 0 + ' + 'Label23 + ' + Me.Label23.AutoSize = true + Me.Label23.Location = New System.Drawing.Point(18, 31) + Me.Label23.Name = "Label23" + Me.Label23.Size = New System.Drawing.Size(80, 13) + Me.Label23.TabIndex = 1 + Me.Label23.Text = "Minimum speed" + ' + 'Label13 + ' + Me.Label13.AutoSize = true + Me.Label13.Location = New System.Drawing.Point(13, 5) + Me.Label13.Name = "Label13" + Me.Label13.Size = New System.Drawing.Size(85, 13) + Me.Label13.TabIndex = 1 + Me.Label13.Text = "Max. Overspeed" + ' + 'RdOverspeed + ' + Me.RdOverspeed.AutoSize = true + Me.RdOverspeed.Checked = true + Me.RdOverspeed.Location = New System.Drawing.Point(16, 44) + Me.RdOverspeed.Name = "RdOverspeed" + Me.RdOverspeed.Size = New System.Drawing.Size(77, 17) + Me.RdOverspeed.TabIndex = 1 + Me.RdOverspeed.TabStop = true + Me.RdOverspeed.Text = "Overspeed" + Me.RdOverspeed.UseVisualStyleBackColor = true + ' + 'RdOff + ' + Me.RdOff.AutoSize = true + Me.RdOff.Location = New System.Drawing.Point(16, 21) + Me.RdOff.Name = "RdOff" + Me.RdOff.Size = New System.Drawing.Size(39, 17) + Me.RdOff.TabIndex = 0 + Me.RdOff.Text = "Off" + Me.RdOff.UseVisualStyleBackColor = true + ' + 'StatusStrip1 + ' + Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripStatusLabelGEN}) + Me.StatusStrip1.Location = New System.Drawing.Point(0, 692) + Me.StatusStrip1.Name = "StatusStrip1" + Me.StatusStrip1.Size = New System.Drawing.Size(944, 22) + Me.StatusStrip1.SizingGrip = false + Me.StatusStrip1.TabIndex = 6 + Me.StatusStrip1.Text = "StatusStrip1" + ' + 'ToolStripStatusLabelGEN + ' + Me.ToolStripStatusLabelGEN.Name = "ToolStripStatusLabelGEN" + Me.ToolStripStatusLabelGEN.Size = New System.Drawing.Size(120, 17) + Me.ToolStripStatusLabelGEN.Text = "ToolStripStatusLabel1" + ' + 'ButOK + ' + Me.ButOK.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.ButOK.Location = New System.Drawing.Point(778, 665) + Me.ButOK.Name = "ButOK" + Me.ButOK.Size = New System.Drawing.Size(75, 23) + Me.ButOK.TabIndex = 0 + Me.ButOK.Text = "Save" + Me.ButOK.UseVisualStyleBackColor = true + ' + 'ButCancel + ' + Me.ButCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.ButCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel + Me.ButCancel.Location = New System.Drawing.Point(859, 665) + Me.ButCancel.Name = "ButCancel" + Me.ButCancel.Size = New System.Drawing.Size(75, 23) + Me.ButCancel.TabIndex = 1 + Me.ButCancel.Text = "Cancel" + Me.ButCancel.UseVisualStyleBackColor = true + ' + 'ToolStrip1 + ' + Me.ToolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden + Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripBtNew, Me.ToolStripBtOpen, Me.ToolStripBtSave, Me.ToolStripBtSaveAs, Me.ToolStripSeparator1, Me.ToolStripBtSendTo, Me.ToolStripSeparator2, Me.ToolStripButton1}) + Me.ToolStrip1.Location = New System.Drawing.Point(0, 0) + Me.ToolStrip1.Name = "ToolStrip1" + Me.ToolStrip1.Size = New System.Drawing.Size(944, 25) + Me.ToolStrip1.TabIndex = 20 + Me.ToolStrip1.Text = "ToolStrip1" + ' + 'ToolStripBtNew + ' + Me.ToolStripBtNew.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.ToolStripBtNew.Image = Global.TUGraz.VECTO.My.Resources.Resources.blue_document_icon + Me.ToolStripBtNew.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripBtNew.Name = "ToolStripBtNew" + Me.ToolStripBtNew.Size = New System.Drawing.Size(23, 22) + Me.ToolStripBtNew.Text = "New" + Me.ToolStripBtNew.ToolTipText = "New" + ' + 'ToolStripBtOpen + ' + Me.ToolStripBtOpen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.ToolStripBtOpen.Image = Global.TUGraz.VECTO.My.Resources.Resources.Open_icon + Me.ToolStripBtOpen.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripBtOpen.Name = "ToolStripBtOpen" + Me.ToolStripBtOpen.Size = New System.Drawing.Size(23, 22) + Me.ToolStripBtOpen.Text = "Open" + Me.ToolStripBtOpen.ToolTipText = "Open..." + ' + 'ToolStripBtSave + ' + Me.ToolStripBtSave.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.ToolStripBtSave.Image = Global.TUGraz.VECTO.My.Resources.Resources.Actions_document_save_icon + Me.ToolStripBtSave.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripBtSave.Name = "ToolStripBtSave" + Me.ToolStripBtSave.Size = New System.Drawing.Size(23, 22) + Me.ToolStripBtSave.Text = "Save" + Me.ToolStripBtSave.ToolTipText = "Save" + ' + 'ToolStripBtSaveAs + ' + Me.ToolStripBtSaveAs.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.ToolStripBtSaveAs.Image = Global.TUGraz.VECTO.My.Resources.Resources.Actions_document_save_as_icon + Me.ToolStripBtSaveAs.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripBtSaveAs.Name = "ToolStripBtSaveAs" + Me.ToolStripBtSaveAs.Size = New System.Drawing.Size(23, 22) + Me.ToolStripBtSaveAs.Text = "Save As" + Me.ToolStripBtSaveAs.ToolTipText = "Save As..." + ' + 'ToolStripSeparator1 + ' + Me.ToolStripSeparator1.Name = "ToolStripSeparator1" + Me.ToolStripSeparator1.Size = New System.Drawing.Size(6, 25) + ' + 'ToolStripBtSendTo + ' + Me.ToolStripBtSendTo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.ToolStripBtSendTo.Image = Global.TUGraz.VECTO.My.Resources.Resources.export_icon + Me.ToolStripBtSendTo.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripBtSendTo.Name = "ToolStripBtSendTo" + Me.ToolStripBtSendTo.Size = New System.Drawing.Size(23, 22) + Me.ToolStripBtSendTo.Text = "Send to Job List" + Me.ToolStripBtSendTo.ToolTipText = "Send to Job List" + ' + 'ToolStripSeparator2 + ' + Me.ToolStripSeparator2.Name = "ToolStripSeparator2" + Me.ToolStripSeparator2.Size = New System.Drawing.Size(6, 25) + ' + 'ToolStripButton1 + ' + Me.ToolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.ToolStripButton1.Image = Global.TUGraz.VECTO.My.Resources.Resources.Help_icon + Me.ToolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripButton1.Name = "ToolStripButton1" + Me.ToolStripButton1.Size = New System.Drawing.Size(23, 22) + Me.ToolStripButton1.Text = "Help" + ' + 'PictureBox1 + ' + Me.PictureBox1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.PictureBox1.BackColor = System.Drawing.Color.White + Me.PictureBox1.Image = Global.TUGraz.VECTO.My.Resources.Resources.VECTO_VECTO + Me.PictureBox1.Location = New System.Drawing.Point(0, 28) + Me.PictureBox1.Name = "PictureBox1" + Me.PictureBox1.Size = New System.Drawing.Size(944, 40) + Me.PictureBox1.TabIndex = 21 + Me.PictureBox1.TabStop = false + ' + 'CbEngOnly + ' + Me.CbEngOnly.AutoSize = true + Me.CbEngOnly.Location = New System.Drawing.Point(17, 84) + Me.CbEngOnly.Name = "CbEngOnly" + Me.CbEngOnly.Size = New System.Drawing.Size(113, 17) + Me.CbEngOnly.TabIndex = 0 + Me.CbEngOnly.Text = "Engine Only Mode" + Me.CbEngOnly.UseVisualStyleBackColor = true + ' + 'CmOpenFile + ' + Me.CmOpenFile.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.OpenWithToolStripMenuItem, Me.ShowInFolderToolStripMenuItem}) + Me.CmOpenFile.Name = "CmOpenFile" + Me.CmOpenFile.ShowImageMargin = false + Me.CmOpenFile.Size = New System.Drawing.Size(128, 48) + ' + 'OpenWithToolStripMenuItem + ' + Me.OpenWithToolStripMenuItem.Name = "OpenWithToolStripMenuItem" + Me.OpenWithToolStripMenuItem.Size = New System.Drawing.Size(127, 22) + Me.OpenWithToolStripMenuItem.Text = "Open with ..." + ' + 'ShowInFolderToolStripMenuItem + ' + Me.ShowInFolderToolStripMenuItem.Name = "ShowInFolderToolStripMenuItem" + Me.ShowInFolderToolStripMenuItem.Size = New System.Drawing.Size(127, 22) + Me.ShowInFolderToolStripMenuItem.Text = "Show in Folder" + ' + 'PicVehicle + ' + Me.PicVehicle.BackColor = System.Drawing.Color.LightGray + Me.PicVehicle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.PicVehicle.Location = New System.Drawing.Point(542, 127) + Me.PicVehicle.Name = "PicVehicle" + Me.PicVehicle.Size = New System.Drawing.Size(300, 88) + Me.PicVehicle.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage + Me.PicVehicle.TabIndex = 36 + Me.PicVehicle.TabStop = false + ' + 'PicBox + ' + Me.PicBox.BackColor = System.Drawing.Color.LightGray + 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, 296) + Me.PicBox.TabIndex = 36 + Me.PicBox.TabStop = false + ' + 'TbEngTxt + ' + Me.TbEngTxt.Location = New System.Drawing.Point(542, 218) + Me.TbEngTxt.Name = "TbEngTxt" + Me.TbEngTxt.ReadOnly = true + Me.TbEngTxt.Size = New System.Drawing.Size(390, 20) + Me.TbEngTxt.TabIndex = 6 + ' + 'TbVehCat + ' + Me.TbVehCat.Location = New System.Drawing.Point(848, 131) + Me.TbVehCat.Name = "TbVehCat" + Me.TbVehCat.ReadOnly = true + Me.TbVehCat.Size = New System.Drawing.Size(87, 20) + Me.TbVehCat.TabIndex = 2 + ' + 'TbAxleConf + ' + Me.TbAxleConf.Location = New System.Drawing.Point(904, 160) + Me.TbAxleConf.Name = "TbAxleConf" + Me.TbAxleConf.ReadOnly = true + Me.TbAxleConf.Size = New System.Drawing.Size(31, 20) + Me.TbAxleConf.TabIndex = 4 + ' + 'TbHVCclass + ' + Me.TbHVCclass.Location = New System.Drawing.Point(848, 189) + Me.TbHVCclass.Name = "TbHVCclass" + Me.TbHVCclass.ReadOnly = true + Me.TbHVCclass.Size = New System.Drawing.Size(87, 20) + Me.TbHVCclass.TabIndex = 5 + ' + 'TbGbxTxt + ' + Me.TbGbxTxt.Location = New System.Drawing.Point(542, 241) + Me.TbGbxTxt.Name = "TbGbxTxt" + Me.TbGbxTxt.ReadOnly = true + Me.TbGbxTxt.Size = New System.Drawing.Size(390, 20) + Me.TbGbxTxt.TabIndex = 7 + ' + 'TbMass + ' + Me.TbMass.Location = New System.Drawing.Point(848, 160) + Me.TbMass.Name = "TbMass" + Me.TbMass.ReadOnly = true + 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 + ' + 'TbShiftStrategyParams + ' + Me.TbShiftStrategyParams.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.TbShiftStrategyParams.Location = New System.Drawing.Point(85, 87) + Me.TbShiftStrategyParams.Name = "TbShiftStrategyParams" + Me.TbShiftStrategyParams.Size = New System.Drawing.Size(411, 20) + Me.TbShiftStrategyParams.TabIndex = 12 + ' + 'BtnShiftParamsForm + ' + Me.BtnShiftParamsForm.Location = New System.Drawing.Point(7, 87) + Me.BtnShiftParamsForm.Name = "BtnShiftParamsForm" + Me.BtnShiftParamsForm.Size = New System.Drawing.Size(72, 21) + Me.BtnShiftParamsForm.TabIndex = 11 + Me.BtnShiftParamsForm.TabStop = false + Me.BtnShiftParamsForm.Text = "Shift Parameters" + Me.BtnShiftParamsForm.UseVisualStyleBackColor = true + ' + 'BtnShiftStrategyParams + ' + Me.BtnShiftStrategyParams.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.BtnShiftStrategyParams.Image = CType(resources.GetObject("BtnShiftStrategyParams.Image"),System.Drawing.Image) + Me.BtnShiftStrategyParams.Location = New System.Drawing.Point(497, 85) + Me.BtnShiftStrategyParams.Name = "BtnShiftStrategyParams" + Me.BtnShiftStrategyParams.Size = New System.Drawing.Size(24, 24) + Me.BtnShiftStrategyParams.TabIndex = 13 + Me.BtnShiftStrategyParams.TabStop = false + Me.BtnShiftStrategyParams.UseVisualStyleBackColor = true + ' + 'VectoJobForm + ' + Me.AcceptButton = Me.ButOK + Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.CancelButton = Me.ButCancel + Me.ClientSize = New System.Drawing.Size(944, 714) + Me.Controls.Add(Me.lblEngineCharacteristics) + Me.Controls.Add(Me.TbHVCclass) + Me.Controls.Add(Me.TbMass) + Me.Controls.Add(Me.TbAxleConf) + Me.Controls.Add(Me.TbVehCat) + Me.Controls.Add(Me.TbGbxTxt) + Me.Controls.Add(Me.TbEngTxt) + Me.Controls.Add(Me.PicBox) + Me.Controls.Add(Me.PicVehicle) + Me.Controls.Add(Me.CbEngOnly) + Me.Controls.Add(Me.PictureBox1) + Me.Controls.Add(Me.ToolStrip1) + Me.Controls.Add(Me.ButCancel) + Me.Controls.Add(Me.TabControl1) + Me.Controls.Add(Me.ButOK) + Me.Controls.Add(Me.StatusStrip1) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle + Me.Icon = CType(resources.GetObject("$this.Icon"),System.Drawing.Icon) + Me.MaximizeBox = false + Me.Name = "VectoJobForm" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Job Editor" + Me.TabPgGen.ResumeLayout(false) + Me.TabPgGen.PerformLayout + Me.GrCycles.ResumeLayout(false) + Me.GrCycles.PerformLayout + Me.GrAux.ResumeLayout(false) + Me.GrAux.PerformLayout + CType(Me.picAuxInfo,System.ComponentModel.ISupportInitialize).EndInit + Me.TabControl1.ResumeLayout(false) + Me.TabPgDriver.ResumeLayout(false) + Me.GrVACC.ResumeLayout(false) + Me.GrVACC.PerformLayout + Me.GrLAC.ResumeLayout(false) + Me.GrLAC.PerformLayout + Me.pnLookAheadCoasting.ResumeLayout(false) + Me.pnLookAheadCoasting.PerformLayout + Me.GroupBox1.ResumeLayout(false) + Me.GroupBox1.PerformLayout + Me.GroupBox2.ResumeLayout(false) + Me.GroupBox2.PerformLayout + Me.PnEcoRoll.ResumeLayout(false) + Me.PnEcoRoll.PerformLayout + Me.StatusStrip1.ResumeLayout(false) + Me.StatusStrip1.PerformLayout + Me.ToolStrip1.ResumeLayout(false) + Me.ToolStrip1.PerformLayout + CType(Me.PictureBox1,System.ComponentModel.ISupportInitialize).EndInit + Me.CmOpenFile.ResumeLayout(false) + CType(Me.PicVehicle,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.PicBox,System.ComponentModel.ISupportInitialize).EndInit + Me.ResumeLayout(false) + Me.PerformLayout - End Sub +End Sub Friend WithEvents TabPgGen As TabPage Friend WithEvents TabControl1 As TabControl Friend WithEvents StatusStrip1 As StatusStrip @@ -1318,4 +1354,7 @@ Partial Class VectoJobForm Friend WithEvents Label15 As System.Windows.Forms.Label Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox Friend WithEvents lblEngineCharacteristics As System.Windows.Forms.Label + Friend WithEvents TbShiftStrategyParams As TextBox + Friend WithEvents BtnShiftParamsForm As Button + Friend WithEvents BtnShiftStrategyParams As Button End Class diff --git a/VECTO/GUI/VectoJobForm.resx b/VECTO/GUI/VectoJobForm.resx index 86bda0298ff9d20a16e9cd1ffc9613b4baff4457..4d5a0f15ba5cc7674e463946ac90736bcffcefd1 100644 --- a/VECTO/GUI/VectoJobForm.resx +++ b/VECTO/GUI/VectoJobForm.resx @@ -117,98 +117,116 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="BtnShiftStrategyParams.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAAtVJREFUOE+FkmtIk2EYhhc6zU1zyjyAlZn5Q0QS6k/EMDDSQiuzkmxM5wpEA00S + zTzbsozQEDUyVKjQbejUPGQSyyjUmofysFRKU/M859J5qORu77s1KX/0wPXju7/vvp4X3o/RVsHv7pDy + 0VklwIfaCPTXCzHQEPkXn5pEUDWJNH31kRGMf4eUocvF7GAShlqjQZ6H3qZjYUICQGliVfscvc+EGmNt + c0hhY/kONpYMrC/cwowqiYowchcYNaKRoa7mDDyfcuFRYpdnrBsEv7S3KT8XCTkUkq/3xGOj9xrQn0Cp + qQrGvnJ7uJTuwK58G4VJ8GMhh25eV29Ccp0yDmvd8SZBV7UA7sW2R5wfWsO+0ApO2ewMKlibE2N11siM + GCt6SL7YEQtdZxxUShECq7wQ9MQLZKnTfbbcqpQJuwxLDRWsTN+EbiobuslsLBsh+eybK3j/WgBfmQeq + 1RKcqPalAgexlYIIrNMtQAVLE1lYGs/Cd8JYJrR6SK5ovoCzjTzI1VLE9gjgVsiBYza7jJvHAhGwkpkG + gfZrJhZHM6D5QtBf4ed0yKSnENLEg0L3AlHKIBxq2Ik9BRy4FNrA4bFBYJlgbhCQgno4DeqhNMwPpuFb + TyICan3waqUF0coAHGtxpwJvuSPcJBwqYBUzwby8TUEF84OpmFOlYnYghR69XcLHUdl+RLX7I6TVc4uA + W8aCZZy5hhnO8KECUpzuu4Gpj8lU0FgShuIHgeAVucK/0d0k8KzgwjGXje0xZiPMS/oyGVIgxcme65jo + MvyBNUWhqMw/j7ryi+Dlu+KwfDcVcNNYEOfx6E2Ypq0iVKN6GYNxZRLG3iVSQXnOcRSk+EGadxK1j4Jx + IMsZPhXOsE+2QnPZOcPmP9MtD+d0SMPkXTVCDLdeRadciPjIg7H6V3sNXzAYtrEMjmW0udxCZFZmjLZO + eyX/NDkNOcG9FD9vY/yfYTB+A9kMOLKC3dXwAAAAAElFTkSuQmCC +</value> + </data> <metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>468, 15</value> </metadata> - <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="ButtonVEH.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAALVSURBVDhPhZJrSJNhGIYXOs1Nc8o8gJWZ+UNEEupPxDAw - 0kIrs5JsTOcKRANNEs0827KM0BA1MlSo0G3o1DxkEsso1JqH8rBUSlPzPOfSeajkbu+7NSl/9MD147u/ - 776eF96P0VbB7+6Q8tFZJcCH2gj01wsx0BD5F5+aRFA1iTR99ZERjH+HlKHLxexgEoZao0Geh96mY2FC - AkBpYlX7HL3PhBpjbXNIYWP5DjaWDKwv3MKMKomKMHIXGDWikaGu5gw8n3LhUWKXZ6wbBL+0tyk/Fwk5 - FJKv98Rjo/ca0J9AqakKxr5ye7iU7sCufBuFSfBjIYduXldvQnKdMg5r3fEmQVe1AO7FtkecH1rDvtAK - TtnsDCpYmxNjddbIjBgreki+2BELXWccVEoRAqu8EPTEC2Sp03223KqUCbsMSw0VrEzfhG4qG7rJbCwb - Ifnsmyt4/1oAX5kHqtUSnKj2pQIHsZWCCKzTLUAFSxNZWBrPwnfCWCa0ekiuaL6As408yNVSxPYI4FbI - gWM2u4ybxwIRsJKZBoH2ayYWRzOg+ULQX+HndMikpxDSxINC9wJRyiAcatiJPQUcuBTawOGxQWCZYG4Q - kIJ6OA3qoTTMD6bhW08iAmp98GqlBdHKABxrcacCb7kj3CQcKmAVM8G8vE1BBfODqZhTpWJ2IIUevV3C - x1HZfkS1+yOk1XOLgFvGgmWcuYYZzvChAlKc7ruBqY/JVNBYEobiB4HgFbnCv9HdJPCs4MIxl43tMWYj - zEv6MhlSIMXJnuuY6DL8gTVFoajMP4+68ovg5bvisHw3FXDTWBDn8ehNmKatIlSjehmDcWUSxt4lUkF5 - znEUpPhBmncStY+CcSDLGT4VzrBPtkJz2TnD5j/TLQ/ndEjD5F01Qgy3XkWnXIj4yIOx+ld7DV8wGLax - DI5ltLncQmRWZoy2Tnsl/zQ5DTnBvRQ/b2P8n2EwfgPZDDiygt3V8AAAAABJRU5ErkJggg== + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAAtVJREFUOE+FkmtIk2EYhhc6zU1zyjyAlZn5Q0QS6k/EMDDSQiuzkmxM5wpEA00S + zTzbsozQEDUyVKjQbejUPGQSyyjUmofysFRKU/M859J5qORu77s1KX/0wPXju7/vvp4X3o/RVsHv7pDy + 0VklwIfaCPTXCzHQEPkXn5pEUDWJNH31kRGMf4eUocvF7GAShlqjQZ6H3qZjYUICQGliVfscvc+EGmNt + c0hhY/kONpYMrC/cwowqiYowchcYNaKRoa7mDDyfcuFRYpdnrBsEv7S3KT8XCTkUkq/3xGOj9xrQn0Cp + qQrGvnJ7uJTuwK58G4VJ8GMhh25eV29Ccp0yDmvd8SZBV7UA7sW2R5wfWsO+0ApO2ewMKlibE2N11siM + GCt6SL7YEQtdZxxUShECq7wQ9MQLZKnTfbbcqpQJuwxLDRWsTN+EbiobuslsLBsh+eybK3j/WgBfmQeq + 1RKcqPalAgexlYIIrNMtQAVLE1lYGs/Cd8JYJrR6SK5ovoCzjTzI1VLE9gjgVsiBYza7jJvHAhGwkpkG + gfZrJhZHM6D5QtBf4ed0yKSnENLEg0L3AlHKIBxq2Ik9BRy4FNrA4bFBYJlgbhCQgno4DeqhNMwPpuFb + TyICan3waqUF0coAHGtxpwJvuSPcJBwqYBUzwby8TUEF84OpmFOlYnYghR69XcLHUdl+RLX7I6TVc4uA + W8aCZZy5hhnO8KECUpzuu4Gpj8lU0FgShuIHgeAVucK/0d0k8KzgwjGXje0xZiPMS/oyGVIgxcme65jo + MvyBNUWhqMw/j7ryi+Dlu+KwfDcVcNNYEOfx6E2Ypq0iVKN6GYNxZRLG3iVSQXnOcRSk+EGadxK1j4Jx + IMsZPhXOsE+2QnPZOcPmP9MtD+d0SMPkXTVCDLdeRadciPjIg7H6V3sNXzAYtrEMjmW0udxCZFZmjLZO + eyX/NDkNOcG9FD9vY/yfYTB+A9kMOLKC3dXwAAAAAElFTkSuQmCC </value> </data> <data name="ButtonGBX.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAALVSURBVDhPhZJrSJNhGIYXOs1Nc8o8gJWZ+UNEEupPxDAw - 0kIrs5JsTOcKRANNEs0827KM0BA1MlSo0G3o1DxkEsso1JqH8rBUSlPzPOfSeajkbu+7NSl/9MD147u/ - 776eF96P0VbB7+6Q8tFZJcCH2gj01wsx0BD5F5+aRFA1iTR99ZERjH+HlKHLxexgEoZao0Geh96mY2FC - AkBpYlX7HL3PhBpjbXNIYWP5DjaWDKwv3MKMKomKMHIXGDWikaGu5gw8n3LhUWKXZ6wbBL+0tyk/Fwk5 - FJKv98Rjo/ca0J9AqakKxr5ye7iU7sCufBuFSfBjIYduXldvQnKdMg5r3fEmQVe1AO7FtkecH1rDvtAK - TtnsDCpYmxNjddbIjBgreki+2BELXWccVEoRAqu8EPTEC2Sp03223KqUCbsMSw0VrEzfhG4qG7rJbCwb - Ifnsmyt4/1oAX5kHqtUSnKj2pQIHsZWCCKzTLUAFSxNZWBrPwnfCWCa0ekiuaL6As408yNVSxPYI4FbI - gWM2u4ybxwIRsJKZBoH2ayYWRzOg+ULQX+HndMikpxDSxINC9wJRyiAcatiJPQUcuBTawOGxQWCZYG4Q - kIJ6OA3qoTTMD6bhW08iAmp98GqlBdHKABxrcacCb7kj3CQcKmAVM8G8vE1BBfODqZhTpWJ2IIUevV3C - x1HZfkS1+yOk1XOLgFvGgmWcuYYZzvChAlKc7ruBqY/JVNBYEobiB4HgFbnCv9HdJPCs4MIxl43tMWYj - zEv6MhlSIMXJnuuY6DL8gTVFoajMP4+68ovg5bvisHw3FXDTWBDn8ehNmKatIlSjehmDcWUSxt4lUkF5 - znEUpPhBmncStY+CcSDLGT4VzrBPtkJz2TnD5j/TLQ/ndEjD5F01Qgy3XkWnXIj4yIOx+ld7DV8wGLax - DI5ltLncQmRWZoy2Tnsl/zQ5DTnBvRQ/b2P8n2EwfgPZDDiygt3V8AAAAABJRU5ErkJggg== + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAAtVJREFUOE+FkmtIk2EYhhc6zU1zyjyAlZn5Q0QS6k/EMDDSQiuzkmxM5wpEA00S + zTzbsozQEDUyVKjQbejUPGQSyyjUmofysFRKU/M859J5qORu77s1KX/0wPXju7/vvp4X3o/RVsHv7pDy + 0VklwIfaCPTXCzHQEPkXn5pEUDWJNH31kRGMf4eUocvF7GAShlqjQZ6H3qZjYUICQGliVfscvc+EGmNt + c0hhY/kONpYMrC/cwowqiYowchcYNaKRoa7mDDyfcuFRYpdnrBsEv7S3KT8XCTkUkq/3xGOj9xrQn0Cp + qQrGvnJ7uJTuwK58G4VJ8GMhh25eV29Ccp0yDmvd8SZBV7UA7sW2R5wfWsO+0ApO2ewMKlibE2N11siM + GCt6SL7YEQtdZxxUShECq7wQ9MQLZKnTfbbcqpQJuwxLDRWsTN+EbiobuslsLBsh+eybK3j/WgBfmQeq + 1RKcqPalAgexlYIIrNMtQAVLE1lYGs/Cd8JYJrR6SK5ovoCzjTzI1VLE9gjgVsiBYza7jJvHAhGwkpkG + gfZrJhZHM6D5QtBf4ed0yKSnENLEg0L3AlHKIBxq2Ik9BRy4FNrA4bFBYJlgbhCQgno4DeqhNMwPpuFb + TyICan3waqUF0coAHGtxpwJvuSPcJBwqYBUzwby8TUEF84OpmFOlYnYghR69XcLHUdl+RLX7I6TVc4uA + W8aCZZy5hhnO8KECUpzuu4Gpj8lU0FgShuIHgeAVucK/0d0k8KzgwjGXje0xZiPMS/oyGVIgxcme65jo + MvyBNUWhqMw/j7ryi+Dlu+KwfDcVcNNYEOfx6E2Ypq0iVKN6GYNxZRLG3iVSQXnOcRSk+EGadxK1j4Jx + IMsZPhXOsE+2QnPZOcPmP9MtD+d0SMPkXTVCDLdeRadciPjIg7H6V3sNXzAYtrEMjmW0udxCZFZmjLZO + eyX/NDkNOcG9FD9vY/yfYTB+A9kMOLKC3dXwAAAAAElFTkSuQmCC </value> </data> <data name="ButtonMAP.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAALVSURBVDhPhZJrSJNhGIYXOs1Nc8o8gJWZ+UNEEupPxDAw - 0kIrs5JsTOcKRANNEs0827KM0BA1MlSo0G3o1DxkEsso1JqH8rBUSlPzPOfSeajkbu+7NSl/9MD147u/ - 776eF96P0VbB7+6Q8tFZJcCH2gj01wsx0BD5F5+aRFA1iTR99ZERjH+HlKHLxexgEoZao0Geh96mY2FC - AkBpYlX7HL3PhBpjbXNIYWP5DjaWDKwv3MKMKomKMHIXGDWikaGu5gw8n3LhUWKXZ6wbBL+0tyk/Fwk5 - FJKv98Rjo/ca0J9AqakKxr5ye7iU7sCufBuFSfBjIYduXldvQnKdMg5r3fEmQVe1AO7FtkecH1rDvtAK - TtnsDCpYmxNjddbIjBgreki+2BELXWccVEoRAqu8EPTEC2Sp03223KqUCbsMSw0VrEzfhG4qG7rJbCwb - Ifnsmyt4/1oAX5kHqtUSnKj2pQIHsZWCCKzTLUAFSxNZWBrPwnfCWCa0ekiuaL6As408yNVSxPYI4FbI - gWM2u4ybxwIRsJKZBoH2ayYWRzOg+ULQX+HndMikpxDSxINC9wJRyiAcatiJPQUcuBTawOGxQWCZYG4Q - kIJ6OA3qoTTMD6bhW08iAmp98GqlBdHKABxrcacCb7kj3CQcKmAVM8G8vE1BBfODqZhTpWJ2IIUevV3C - x1HZfkS1+yOk1XOLgFvGgmWcuYYZzvChAlKc7ruBqY/JVNBYEobiB4HgFbnCv9HdJPCs4MIxl43tMWYj - zEv6MhlSIMXJnuuY6DL8gTVFoajMP4+68ovg5bvisHw3FXDTWBDn8ehNmKatIlSjehmDcWUSxt4lUkF5 - znEUpPhBmncStY+CcSDLGT4VzrBPtkJz2TnD5j/TLQ/ndEjD5F01Qgy3XkWnXIj4yIOx+ld7DV8wGLax - DI5ltLncQmRWZoy2Tnsl/zQ5DTnBvRQ/b2P8n2EwfgPZDDiygt3V8AAAAABJRU5ErkJggg== + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAAtVJREFUOE+FkmtIk2EYhhc6zU1zyjyAlZn5Q0QS6k/EMDDSQiuzkmxM5wpEA00S + zTzbsozQEDUyVKjQbejUPGQSyyjUmofysFRKU/M859J5qORu77s1KX/0wPXju7/vvp4X3o/RVsHv7pDy + 0VklwIfaCPTXCzHQEPkXn5pEUDWJNH31kRGMf4eUocvF7GAShlqjQZ6H3qZjYUICQGliVfscvc+EGmNt + c0hhY/kONpYMrC/cwowqiYowchcYNaKRoa7mDDyfcuFRYpdnrBsEv7S3KT8XCTkUkq/3xGOj9xrQn0Cp + qQrGvnJ7uJTuwK58G4VJ8GMhh25eV29Ccp0yDmvd8SZBV7UA7sW2R5wfWsO+0ApO2ewMKlibE2N11siM + GCt6SL7YEQtdZxxUShECq7wQ9MQLZKnTfbbcqpQJuwxLDRWsTN+EbiobuslsLBsh+eybK3j/WgBfmQeq + 1RKcqPalAgexlYIIrNMtQAVLE1lYGs/Cd8JYJrR6SK5ovoCzjTzI1VLE9gjgVsiBYza7jJvHAhGwkpkG + gfZrJhZHM6D5QtBf4ed0yKSnENLEg0L3AlHKIBxq2Ik9BRy4FNrA4bFBYJlgbhCQgno4DeqhNMwPpuFb + TyICan3waqUF0coAHGtxpwJvuSPcJBwqYBUzwby8TUEF84OpmFOlYnYghR69XcLHUdl+RLX7I6TVc4uA + W8aCZZy5hhnO8KECUpzuu4Gpj8lU0FgShuIHgeAVucK/0d0k8KzgwjGXje0xZiPMS/oyGVIgxcme65jo + MvyBNUWhqMw/j7ryi+Dlu+KwfDcVcNNYEOfx6E2Ypq0iVKN6GYNxZRLG3iVSQXnOcRSk+EGadxK1j4Jx + IMsZPhXOsE+2QnPZOcPmP9MtD+d0SMPkXTVCDLdeRadciPjIg7H6V3sNXzAYtrEMjmW0udxCZFZmjLZO + eyX/NDkNOcG9FD9vY/yfYTB+A9kMOLKC3dXwAAAAAElFTkSuQmCC </value> </data> <data name="btnDfVelocityDrop.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAALVSURBVDhPhZJrSJNhGIYXOs1Nc8o8gJWZ+UNEEupPxDAw - 0kIrs5JsTOcKRANNEs0827KM0BA1MlSo0G3o1DxkEsso1JqH8rBUSlPzPOfSeajkbu+7NSl/9MD147u/ - 776eF96P0VbB7+6Q8tFZJcCH2gj01wsx0BD5F5+aRFA1iTR99ZERjH+HlKHLxexgEoZao0Geh96mY2FC - AkBpYlX7HL3PhBpjbXNIYWP5DjaWDKwv3MKMKomKMHIXGDWikaGu5gw8n3LhUWKXZ6wbBL+0tyk/Fwk5 - FJKv98Rjo/ca0J9AqakKxr5ye7iU7sCufBuFSfBjIYduXldvQnKdMg5r3fEmQVe1AO7FtkecH1rDvtAK - TtnsDCpYmxNjddbIjBgreki+2BELXWccVEoRAqu8EPTEC2Sp03223KqUCbsMSw0VrEzfhG4qG7rJbCwb - Ifnsmyt4/1oAX5kHqtUSnKj2pQIHsZWCCKzTLUAFSxNZWBrPwnfCWCa0ekiuaL6As408yNVSxPYI4FbI - gWM2u4ybxwIRsJKZBoH2ayYWRzOg+ULQX+HndMikpxDSxINC9wJRyiAcatiJPQUcuBTawOGxQWCZYG4Q - kIJ6OA3qoTTMD6bhW08iAmp98GqlBdHKABxrcacCb7kj3CQcKmAVM8G8vE1BBfODqZhTpWJ2IIUevV3C - x1HZfkS1+yOk1XOLgFvGgmWcuYYZzvChAlKc7ruBqY/JVNBYEobiB4HgFbnCv9HdJPCs4MIxl43tMWYj - zEv6MhlSIMXJnuuY6DL8gTVFoajMP4+68ovg5bvisHw3FXDTWBDn8ehNmKatIlSjehmDcWUSxt4lUkF5 - znEUpPhBmncStY+CcSDLGT4VzrBPtkJz2TnD5j/TLQ/ndEjD5F01Qgy3XkWnXIj4yIOx+ld7DV8wGLax - DI5ltLncQmRWZoy2Tnsl/zQ5DTnBvRQ/b2P8n2EwfgPZDDiygt3V8AAAAABJRU5ErkJggg== + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAAtVJREFUOE+FkmtIk2EYhhc6zU1zyjyAlZn5Q0QS6k/EMDDSQiuzkmxM5wpEA00S + zTzbsozQEDUyVKjQbejUPGQSyyjUmofysFRKU/M859J5qORu77s1KX/0wPXju7/vvp4X3o/RVsHv7pDy + 0VklwIfaCPTXCzHQEPkXn5pEUDWJNH31kRGMf4eUocvF7GAShlqjQZ6H3qZjYUICQGliVfscvc+EGmNt + c0hhY/kONpYMrC/cwowqiYowchcYNaKRoa7mDDyfcuFRYpdnrBsEv7S3KT8XCTkUkq/3xGOj9xrQn0Cp + qQrGvnJ7uJTuwK58G4VJ8GMhh25eV29Ccp0yDmvd8SZBV7UA7sW2R5wfWsO+0ApO2ewMKlibE2N11siM + GCt6SL7YEQtdZxxUShECq7wQ9MQLZKnTfbbcqpQJuwxLDRWsTN+EbiobuslsLBsh+eybK3j/WgBfmQeq + 1RKcqPalAgexlYIIrNMtQAVLE1lYGs/Cd8JYJrR6SK5ovoCzjTzI1VLE9gjgVsiBYza7jJvHAhGwkpkG + gfZrJhZHM6D5QtBf4ed0yKSnENLEg0L3AlHKIBxq2Ik9BRy4FNrA4bFBYJlgbhCQgno4DeqhNMwPpuFb + TyICan3waqUF0coAHGtxpwJvuSPcJBwqYBUzwby8TUEF84OpmFOlYnYghR69XcLHUdl+RLX7I6TVc4uA + W8aCZZy5hhnO8KECUpzuu4Gpj8lU0FgShuIHgeAVucK/0d0k8KzgwjGXje0xZiPMS/oyGVIgxcme65jo + MvyBNUWhqMw/j7ryi+Dlu+KwfDcVcNNYEOfx6E2Ypq0iVKN6GYNxZRLG3iVSQXnOcRSk+EGadxK1j4Jx + IMsZPhXOsE+2QnPZOcPmP9MtD+d0SMPkXTVCDLdeRadciPjIg7H6V3sNXzAYtrEMjmW0udxCZFZmjLZO + eyX/NDkNOcG9FD9vY/yfYTB+A9kMOLKC3dXwAAAAAElFTkSuQmCC </value> </data> <data name="btnDfTargetSpeed.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAALVSURBVDhPhZJrSJNhGIYXOs1Nc8o8gJWZ+UNEEupPxDAw - 0kIrs5JsTOcKRANNEs0827KM0BA1MlSo0G3o1DxkEsso1JqH8rBUSlPzPOfSeajkbu+7NSl/9MD147u/ - 776eF96P0VbB7+6Q8tFZJcCH2gj01wsx0BD5F5+aRFA1iTR99ZERjH+HlKHLxexgEoZao0Geh96mY2FC - AkBpYlX7HL3PhBpjbXNIYWP5DjaWDKwv3MKMKomKMHIXGDWikaGu5gw8n3LhUWKXZ6wbBL+0tyk/Fwk5 - FJKv98Rjo/ca0J9AqakKxr5ye7iU7sCufBuFSfBjIYduXldvQnKdMg5r3fEmQVe1AO7FtkecH1rDvtAK - TtnsDCpYmxNjddbIjBgreki+2BELXWccVEoRAqu8EPTEC2Sp03223KqUCbsMSw0VrEzfhG4qG7rJbCwb - Ifnsmyt4/1oAX5kHqtUSnKj2pQIHsZWCCKzTLUAFSxNZWBrPwnfCWCa0ekiuaL6As408yNVSxPYI4FbI - gWM2u4ybxwIRsJKZBoH2ayYWRzOg+ULQX+HndMikpxDSxINC9wJRyiAcatiJPQUcuBTawOGxQWCZYG4Q - kIJ6OA3qoTTMD6bhW08iAmp98GqlBdHKABxrcacCb7kj3CQcKmAVM8G8vE1BBfODqZhTpWJ2IIUevV3C - x1HZfkS1+yOk1XOLgFvGgmWcuYYZzvChAlKc7ruBqY/JVNBYEobiB4HgFbnCv9HdJPCs4MIxl43tMWYj - zEv6MhlSIMXJnuuY6DL8gTVFoajMP4+68ovg5bvisHw3FXDTWBDn8ehNmKatIlSjehmDcWUSxt4lUkF5 - znEUpPhBmncStY+CcSDLGT4VzrBPtkJz2TnD5j/TLQ/ndEjD5F01Qgy3XkWnXIj4yIOx+ld7DV8wGLax - DI5ltLncQmRWZoy2Tnsl/zQ5DTnBvRQ/b2P8n2EwfgPZDDiygt3V8AAAAABJRU5ErkJggg== + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAAtVJREFUOE+FkmtIk2EYhhc6zU1zyjyAlZn5Q0QS6k/EMDDSQiuzkmxM5wpEA00S + zTzbsozQEDUyVKjQbejUPGQSyyjUmofysFRKU/M859J5qORu77s1KX/0wPXju7/vvp4X3o/RVsHv7pDy + 0VklwIfaCPTXCzHQEPkXn5pEUDWJNH31kRGMf4eUocvF7GAShlqjQZ6H3qZjYUICQGliVfscvc+EGmNt + c0hhY/kONpYMrC/cwowqiYowchcYNaKRoa7mDDyfcuFRYpdnrBsEv7S3KT8XCTkUkq/3xGOj9xrQn0Cp + qQrGvnJ7uJTuwK58G4VJ8GMhh25eV29Ccp0yDmvd8SZBV7UA7sW2R5wfWsO+0ApO2ewMKlibE2N11siM + GCt6SL7YEQtdZxxUShECq7wQ9MQLZKnTfbbcqpQJuwxLDRWsTN+EbiobuslsLBsh+eybK3j/WgBfmQeq + 1RKcqPalAgexlYIIrNMtQAVLE1lYGs/Cd8JYJrR6SK5ovoCzjTzI1VLE9gjgVsiBYza7jJvHAhGwkpkG + gfZrJhZHM6D5QtBf4ed0yKSnENLEg0L3AlHKIBxq2Ik9BRy4FNrA4bFBYJlgbhCQgno4DeqhNMwPpuFb + TyICan3waqUF0coAHGtxpwJvuSPcJBwqYBUzwby8TUEF84OpmFOlYnYghR69XcLHUdl+RLX7I6TVc4uA + W8aCZZy5hhnO8KECUpzuu4Gpj8lU0FgShuIHgeAVucK/0d0k8KzgwjGXje0xZiPMS/oyGVIgxcme65jo + MvyBNUWhqMw/j7ryi+Dlu+KwfDcVcNNYEOfx6E2Ypq0iVKN6GYNxZRLG3iVSQXnOcRSk+EGadxK1j4Jx + IMsZPhXOsE+2QnPZOcPmP9MtD+d0SMPkXTVCDLdeRadciPjIg7H6V3sNXzAYtrEMjmW0udxCZFZmjLZO + eyX/NDkNOcG9FD9vY/yfYTB+A9kMOLKC3dXwAAAAAElFTkSuQmCC </value> </data> <metadata name="StatusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> diff --git a/VECTO/GUI/VectoJobForm.vb b/VECTO/GUI/VectoJobForm.vb index 3083ca2290b7a902f10026dd5e167190e7ac2933..8b68fbe01a0e5cad1f448d95db79ab6d87083918 100644 --- a/VECTO/GUI/VectoJobForm.vb +++ b/VECTO/GUI/VectoJobForm.vb @@ -33,1490 +33,1501 @@ Imports TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox ''' </summary> ''' <remarks></remarks> Public Class VectoJobForm - Public VectoFile As String - Private _changed As Boolean = False + Public VectoFile As String + Private _changed As Boolean = False - Private _pgDriver As TabPage + Private _pgDriver As TabPage - Private _pgDriverOn As Boolean = True + Private _pgDriverOn As Boolean = True - Private _auxDialog As VehicleAuxiliariesDialog + Private _auxDialog As VehicleAuxiliariesDialog - Enum AuxViewColumns - AuxID = 0 - AuxType = 1 - AuxInputOrTech = 2 - End Enum + Enum AuxViewColumns + AuxID = 0 + AuxType = 1 + AuxInputOrTech = 2 + End Enum - 'AA-TB - 'Populate Advanced Auxiliaries - Private Sub PopulateAdvancedAuxiliaries() - 'Scan the program directory for DLL's which are AdvancedAuxiliaries and display - Dim aList As Dictionary(Of String, AdvancedAuxiliary) = DiscoverAdvancedAuxiliaries() + 'AA-TB + 'Populate Advanced Auxiliaries + Private Sub PopulateAdvancedAuxiliaries() + 'Scan the program directory for DLL's which are AdvancedAuxiliaries and display + Dim aList As Dictionary(Of String, AdvancedAuxiliary) = DiscoverAdvancedAuxiliaries() - cboAdvancedAuxiliaries.DataSource = aList.Select(Function(x) x.Value).ToList() - cboAdvancedAuxiliaries.DisplayMember = "AuxiliaryName" - End Sub + cboAdvancedAuxiliaries.DataSource = aList.Select(Function(x) x.Value).ToList() + cboAdvancedAuxiliaries.DisplayMember = "AuxiliaryName" + End Sub - 'Initialise form - Private Sub F02_GEN_Load(sender As Object, e As EventArgs) Handles Me.Load - Dim x As Integer + 'Initialise form + Private Sub F02_GEN_Load(sender As Object, e As EventArgs) Handles Me.Load + Dim x As Integer - _auxDialog = New VehicleAuxiliariesDialog + _auxDialog = New VehicleAuxiliariesDialog - _pgDriver = TabPgDriver + _pgDriver = TabPgDriver - For x = 0 To TabControl1.TabCount - 1 - TabControl1.TabPages(x).Show() - Next - - LvAux.Columns(AuxViewColumns.AuxInputOrTech).Width = -2 - - 'Declaration Mode - If Cfg.DeclMode Then - LvAux.Columns(AuxViewColumns.AuxInputOrTech).Text = "Technology" - Else - LvAux.Columns(AuxViewColumns.AuxInputOrTech).Text = "Input File" - End If - TbAuxPAdd.Enabled = Not Cfg.DeclMode - - CbEngOnly.Enabled = Not Cfg.DeclMode - GrCycles.Enabled = Not Cfg.DeclMode - GrVACC.Enabled = Not Cfg.DeclMode - RdOff.Enabled = Not Cfg.DeclMode - GrLAC.Enabled = Not Cfg.DeclMode - ButAuxAdd.Enabled = Not Cfg.DeclMode - ButAuxRem.Enabled = Not Cfg.DeclMode - PnEcoRoll.Enabled = Not Cfg.DeclMode - - _changed = False - 'AA-TB - PopulateAdvancedAuxiliaries() - - 'Attempt to select that found in Config - End Sub - - 'Close - Check for unsaved changes - Private Sub F02_GEN_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing - If e.CloseReason <> CloseReason.ApplicationExitCall And e.CloseReason <> CloseReason.WindowsShutDown Then - e.Cancel = ChangeCheckCancel() - End If - End Sub - - 'Set generic values for Declaration mode - Private Sub DeclInit() - - If Not Cfg.DeclMode Then Exit Sub - - LvCycles.Items.Clear() - CbEngOnly.Checked = False - TbDesMaxFile.Text = "" - RdOverspeed.Checked = True - CbLookAhead.Checked = True - - tbLacPreviewFactor.Text = DeclarationData.Driver.LookAhead.LookAheadDistanceFactor.ToGUIFormat() - tbLacDfTargetSpeedFile.Text = "" - tbLacDfVelocityDropFile.Text = "" - - TbOverspeed.Text = DeclarationData.Driver.OverSpeedEcoRoll.OverSpeed.AsKmph.ToGUIFormat() 'cDeclaration.Overspeed - TbUnderSpeed.Text = DeclarationData.Driver.OverSpeedEcoRoll.UnderSpeed.AsKmph.ToGUIFormat() _ - ' cDeclaration.Underspeed - TbVmin.Text = DeclarationData.Driver.OverSpeedEcoRoll.MinSpeed.AsKmph.ToGUIFormat() 'cDeclaration.ECvmin - TbAuxPAdd.Text = "" - If _ - LvAux.Items.Count <> 5 OrElse - (LvAux.Items(0).Text <> VectoCore.Configuration.Constants.Auxiliaries.IDs.Fan OrElse - LvAux.Items(1).Text <> VectoCore.Configuration.Constants.Auxiliaries.IDs.SteeringPump OrElse - LvAux.Items(2).Text <> VectoCore.Configuration.Constants.Auxiliaries.IDs.HeatingVentilationAirCondition OrElse - LvAux.Items(3).Text <> VectoCore.Configuration.Constants.Auxiliaries.IDs.ElectricSystem OrElse - LvAux.Items(4).Text <> VectoCore.Configuration.Constants.Auxiliaries.IDs.PneumaticSystem) Then - LvAux.Items.Clear() - - - LvAux.Items.Add(GetTechListForAux(AuxiliaryType.Fan, DeclarationData.Fan)) - - LvAux.Items.Add(GetTechListForAux(AuxiliaryType.SteeringPump, DeclarationData.SteeringPump)) - - LvAux.Items.Add(GetTechListForAux(AuxiliaryType.HVAC, DeclarationData.HeatingVentilationAirConditioning)) - - LvAux.Items.Add(GetTechListForAux(AuxiliaryType.ElectricSystem, DeclarationData.ElectricSystem)) - - LvAux.Items.Add(GetTechListForAux(AuxiliaryType.PneumaticSystem, DeclarationData.PneumaticSystem)) - - End If - End Sub - - Protected Function GetTechListForAux(type As AuxiliaryType, aux As IDeclarationAuxiliaryTable) _ - As ListViewItem - Dim listViewItem As ListViewItem - - listViewItem = New ListViewItem(type.Key()) - listViewItem.SubItems.Add(type.Name()) - Dim auxtech As String() = aux.GetTechnologies() - If auxtech.Count > 1 Then - listViewItem.SubItems.Add("") - Else - listViewItem.SubItems.Add(auxtech(0)) - End If - Return listViewItem - End Function - - - 'Show/Hide "Driver Assist" Tab - Private Sub SetDrivertab(onOff As Boolean) - If onOff Then - If Not _pgDriverOn Then - _pgDriverOn = True - TabControl1.TabPages.Insert(1, _pgDriver) - End If - Else - If _pgDriverOn Then - _pgDriverOn = False - TabControl1.Controls.Remove(_pgDriver) - End If - End If - End Sub + For x = 0 To TabControl1.TabCount - 1 + TabControl1.TabPages(x).Show() + Next + + LvAux.Columns(AuxViewColumns.AuxInputOrTech).Width = -2 + + 'Declaration Mode + If Cfg.DeclMode Then + LvAux.Columns(AuxViewColumns.AuxInputOrTech).Text = "Technology" + Else + LvAux.Columns(AuxViewColumns.AuxInputOrTech).Text = "Input File" + End If + TbAuxPAdd.Enabled = Not Cfg.DeclMode + + CbEngOnly.Enabled = Not Cfg.DeclMode + GrCycles.Enabled = Not Cfg.DeclMode + GrVACC.Enabled = Not Cfg.DeclMode + RdOff.Enabled = Not Cfg.DeclMode + GrLAC.Enabled = Not Cfg.DeclMode + ButAuxAdd.Enabled = Not Cfg.DeclMode + ButAuxRem.Enabled = Not Cfg.DeclMode + PnEcoRoll.Enabled = Not Cfg.DeclMode + + _changed = False + 'AA-TB + PopulateAdvancedAuxiliaries() + + 'Attempt to select that found in Config + End Sub + + 'Close - Check for unsaved changes + Private Sub F02_GEN_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing + If e.CloseReason <> CloseReason.ApplicationExitCall And e.CloseReason <> CloseReason.WindowsShutDown Then + e.Cancel = ChangeCheckCancel() + End If + End Sub + + 'Set generic values for Declaration mode + Private Sub DeclInit() + + If Not Cfg.DeclMode Then Exit Sub + + LvCycles.Items.Clear() + CbEngOnly.Checked = False + TbDesMaxFile.Text = "" + RdOverspeed.Checked = True + CbLookAhead.Checked = True + + tbLacPreviewFactor.Text = DeclarationData.Driver.LookAhead.LookAheadDistanceFactor.ToGUIFormat() + tbLacDfTargetSpeedFile.Text = "" + tbLacDfVelocityDropFile.Text = "" + + TbOverspeed.Text = DeclarationData.Driver.OverSpeedEcoRoll.OverSpeed.AsKmph.ToGUIFormat() 'cDeclaration.Overspeed + TbUnderSpeed.Text = DeclarationData.Driver.OverSpeedEcoRoll.UnderSpeed.AsKmph.ToGUIFormat() _ + ' cDeclaration.Underspeed + TbVmin.Text = DeclarationData.Driver.OverSpeedEcoRoll.MinSpeed.AsKmph.ToGUIFormat() 'cDeclaration.ECvmin + TbAuxPAdd.Text = "" + If _ + LvAux.Items.Count <> 5 OrElse + (LvAux.Items(0).Text <> VectoCore.Configuration.Constants.Auxiliaries.IDs.Fan OrElse + LvAux.Items(1).Text <> VectoCore.Configuration.Constants.Auxiliaries.IDs.SteeringPump OrElse + LvAux.Items(2).Text <> VectoCore.Configuration.Constants.Auxiliaries.IDs.HeatingVentilationAirCondition OrElse + LvAux.Items(3).Text <> VectoCore.Configuration.Constants.Auxiliaries.IDs.ElectricSystem OrElse + LvAux.Items(4).Text <> VectoCore.Configuration.Constants.Auxiliaries.IDs.PneumaticSystem) Then + LvAux.Items.Clear() + + + LvAux.Items.Add(GetTechListForAux(AuxiliaryType.Fan, DeclarationData.Fan)) + + LvAux.Items.Add(GetTechListForAux(AuxiliaryType.SteeringPump, DeclarationData.SteeringPump)) + + LvAux.Items.Add(GetTechListForAux(AuxiliaryType.HVAC, DeclarationData.HeatingVentilationAirConditioning)) + + LvAux.Items.Add(GetTechListForAux(AuxiliaryType.ElectricSystem, DeclarationData.ElectricSystem)) + + LvAux.Items.Add(GetTechListForAux(AuxiliaryType.PneumaticSystem, DeclarationData.PneumaticSystem)) + + End If + End Sub + + Protected Function GetTechListForAux(type As AuxiliaryType, aux As IDeclarationAuxiliaryTable) _ + As ListViewItem + Dim listViewItem As ListViewItem + + listViewItem = New ListViewItem(type.Key()) + listViewItem.SubItems.Add(type.Name()) + Dim auxtech As String() = aux.GetTechnologies() + If auxtech.Count > 1 Then + listViewItem.SubItems.Add("") + Else + listViewItem.SubItems.Add(auxtech(0)) + End If + Return listViewItem + End Function + + + 'Show/Hide "Driver Assist" Tab + Private Sub SetDrivertab(onOff As Boolean) + If onOff Then + If Not _pgDriverOn Then + _pgDriverOn = True + TabControl1.TabPages.Insert(1, _pgDriver) + End If + Else + If _pgDriverOn Then + _pgDriverOn = False + TabControl1.Controls.Remove(_pgDriver) + End If + End If + End Sub #Region "Browse Buttons" - Private Sub ButtonVEH_Click(sender As Object, e As EventArgs) Handles ButtonVEH.Click - If VehicleFileBrowser.OpenDialog(FileRepl(TbVEH.Text, GetPath(VectoFile))) Then - TbVEH.Text = GetFilenameWithoutDirectory(VehicleFileBrowser.Files(0), GetPath(VectoFile)) - End If - End Sub - - Private Sub ButtonMAP_Click(sender As Object, e As EventArgs) Handles ButtonMAP.Click - If EngineFileBrowser.OpenDialog(FileRepl(TbENG.Text, GetPath(VectoFile))) Then - TbENG.Text = GetFilenameWithoutDirectory(EngineFileBrowser.Files(0), GetPath(VectoFile)) - End If - End Sub - - Private Sub ButtonGBX_Click(sender As Object, e As EventArgs) Handles ButtonGBX.Click - If GearboxFileBrowser.OpenDialog(FileRepl(TbGBX.Text, GetPath(VectoFile))) Then - TbGBX.Text = GetFilenameWithoutDirectory(GearboxFileBrowser.Files(0), GetPath(VectoFile)) - End If - End Sub - - Private Sub BtDesMaxBr_Click_1(sender As Object, e As EventArgs) Handles BtDesMaxBr.Click - If DriverAccelerationFileBrowser.OpenDialog(FileRepl(TbDesMaxFile.Text, GetPath(VectoFile))) Then - TbDesMaxFile.Text = GetFilenameWithoutDirectory(DriverAccelerationFileBrowser.Files(0), GetPath(VectoFile)) - End If - End Sub - - Private Sub BtAccOpen_Click(sender As Object, e As EventArgs) Handles BtAccOpen.Click - OpenFiles(FileRepl(TbDesMaxFile.Text, GetPath(VectoFile))) - End Sub + Private Sub ButtonVEH_Click(sender As Object, e As EventArgs) Handles ButtonVEH.Click + If VehicleFileBrowser.OpenDialog(FileRepl(TbVEH.Text, GetPath(VectoFile))) Then + TbVEH.Text = GetFilenameWithoutDirectory(VehicleFileBrowser.Files(0), GetPath(VectoFile)) + End If + End Sub + + Private Sub ButtonMAP_Click(sender As Object, e As EventArgs) Handles ButtonMAP.Click + If EngineFileBrowser.OpenDialog(FileRepl(TbENG.Text, GetPath(VectoFile))) Then + TbENG.Text = GetFilenameWithoutDirectory(EngineFileBrowser.Files(0), GetPath(VectoFile)) + End If + End Sub + + Private Sub ButtonGBX_Click(sender As Object, e As EventArgs) Handles ButtonGBX.Click + If GearboxFileBrowser.OpenDialog(FileRepl(TbGBX.Text, GetPath(VectoFile))) Then + TbGBX.Text = GetFilenameWithoutDirectory(GearboxFileBrowser.Files(0), GetPath(VectoFile)) + End If + End Sub + + Private Sub BtDesMaxBr_Click_1(sender As Object, e As EventArgs) Handles BtDesMaxBr.Click + If DriverAccelerationFileBrowser.OpenDialog(FileRepl(TbDesMaxFile.Text, GetPath(VectoFile))) Then + TbDesMaxFile.Text = GetFilenameWithoutDirectory(DriverAccelerationFileBrowser.Files(0), GetPath(VectoFile)) + End If + End Sub + + Private Sub BtAccOpen_Click(sender As Object, e As EventArgs) Handles BtAccOpen.Click + OpenFiles(FileRepl(TbDesMaxFile.Text, GetPath(VectoFile))) + End Sub #End Region #Region "Open Buttons" - 'Open Vehicle Editor - Private Sub ButOpenVEH_Click(sender As Object, e As EventArgs) Handles ButOpenVEH.Click - Dim f As String - f = FileRepl(TbVEH.Text, GetPath(VectoFile)) - - 'Thus Veh-file is returned - VehicleForm.JobDir = GetPath(VectoFile) - VehicleForm.AutoSendTo = True - - If Not Trim(f) = "" Then - If Not File.Exists(f) Then - MsgBox("File not found!") - Exit Sub - End If - End If - - If Not VehicleForm.Visible Then - VehicleForm.Show() - Else - If VehicleForm.WindowState = FormWindowState.Minimized Then VehicleForm.WindowState = FormWindowState.Normal - VehicleForm.BringToFront() - End If - - If Not Trim(f) = "" Then - Try - VehicleForm.OpenVehicle(f) - Catch ex As Exception - MsgBox(ex.Message, MsgBoxStyle.OkOnly, "Error loading Vehicle File") - End Try - End If - End Sub - - 'Open Engine Editor - Private Sub ButOpenENG_Click(sender As Object, e As EventArgs) Handles ButOpenENG.Click - Dim f As String - f = FileRepl(TbENG.Text, GetPath(VectoFile)) - - 'Thus Veh-file is returned - EngineForm.JobDir = GetPath(VectoFile) - EngineForm.AutoSendTo = True - - If Not Trim(f) = "" Then - If Not File.Exists(f) Then - MsgBox("File not found!") - Exit Sub - End If - End If - - If Not EngineForm.Visible Then - EngineForm.Show() - Else - If EngineForm.WindowState = FormWindowState.Minimized Then EngineForm.WindowState = FormWindowState.Normal - EngineForm.BringToFront() - End If - Try - If Not Trim(f) = "" Then EngineForm.OpenEngineFile(f) - Catch ex As Exception - MsgBox(ex.Message, MsgBoxStyle.OkOnly, "Error loading Engine File") - End Try - End Sub - - 'Open Gearbox Editor - Private Sub ButOpenGBX_Click(sender As Object, e As EventArgs) Handles ButOpenGBX.Click - Dim f As String - f = FileRepl(TbGBX.Text, GetPath(VectoFile)) - - 'Thus Veh-file is returned - GearboxForm.JobDir = GetPath(VectoFile) - GearboxForm.AutoSendTo = True - - If Not Trim(f) = "" Then - If Not File.Exists(f) Then - MsgBox("File not found!") - Exit Sub - End If - End If - - If Not GearboxForm.Visible Then - GearboxForm.Show() - Else - If GearboxForm.WindowState = FormWindowState.Minimized Then GearboxForm.WindowState = FormWindowState.Normal - GearboxForm.BringToFront() - End If - Dim vehicleType As VehicleCategory - Try - If Not Trim(f) = "" Then - Dim vehInput As IVehicleDeclarationInputData = - CType(JSONInputDataFactory.ReadComponentData(FileRepl(TbVEH.Text, GetPath(VectoFile))), - IEngineeringInputDataProvider).JobInputData.Vehicle - vehicleType = vehInput.VehicleCategory - End If - - Catch ex As Exception - vehicleType = VehicleCategory.RigidTruck - End Try - Try - If Not Trim(f) = "" Then GearboxForm.OpenGbx(f, vehicleType) - Catch ex As Exception - MsgBox("Failed to open Gearbox File: " + ex.Message) - End Try - End Sub + 'Open Vehicle Editor + Private Sub ButOpenVEH_Click(sender As Object, e As EventArgs) Handles ButOpenVEH.Click + Dim f As String + f = FileRepl(TbVEH.Text, GetPath(VectoFile)) + + 'Thus Veh-file is returned + VehicleForm.JobDir = GetPath(VectoFile) + VehicleForm.AutoSendTo = True + + If Not Trim(f) = "" Then + If Not File.Exists(f) Then + MsgBox("File not found!") + Exit Sub + End If + End If + + If Not VehicleForm.Visible Then + VehicleForm.Show() + Else + If VehicleForm.WindowState = FormWindowState.Minimized Then VehicleForm.WindowState = FormWindowState.Normal + VehicleForm.BringToFront() + End If + + If Not Trim(f) = "" Then + Try + VehicleForm.OpenVehicle(f) + Catch ex As Exception + MsgBox(ex.Message, MsgBoxStyle.OkOnly, "Error loading Vehicle File") + End Try + End If + End Sub + + 'Open Engine Editor + Private Sub ButOpenENG_Click(sender As Object, e As EventArgs) Handles ButOpenENG.Click + Dim f As String + f = FileRepl(TbENG.Text, GetPath(VectoFile)) + + 'Thus Veh-file is returned + EngineForm.JobDir = GetPath(VectoFile) + EngineForm.AutoSendTo = True + + If Not Trim(f) = "" Then + If Not File.Exists(f) Then + MsgBox("File not found!") + Exit Sub + End If + End If + + If Not EngineForm.Visible Then + EngineForm.Show() + Else + If EngineForm.WindowState = FormWindowState.Minimized Then EngineForm.WindowState = FormWindowState.Normal + EngineForm.BringToFront() + End If + Try + If Not Trim(f) = "" Then EngineForm.OpenEngineFile(f) + Catch ex As Exception + MsgBox(ex.Message, MsgBoxStyle.OkOnly, "Error loading Engine File") + End Try + End Sub + + 'Open Gearbox Editor + Private Sub ButOpenGBX_Click(sender As Object, e As EventArgs) Handles ButOpenGBX.Click + Dim f As String + f = FileRepl(TbGBX.Text, GetPath(VectoFile)) + + 'Thus Veh-file is returned + GearboxForm.JobDir = GetPath(VectoFile) + GearboxForm.AutoSendTo = True + + If Not Trim(f) = "" Then + If Not File.Exists(f) Then + MsgBox("File not found!") + Exit Sub + End If + End If + + If Not GearboxForm.Visible Then + GearboxForm.Show() + Else + If GearboxForm.WindowState = FormWindowState.Minimized Then GearboxForm.WindowState = FormWindowState.Normal + GearboxForm.BringToFront() + End If + Dim vehicleType As VehicleCategory + Try + If Not Trim(f) = "" Then + Dim vehInput As IVehicleDeclarationInputData = + CType(JSONInputDataFactory.ReadComponentData(FileRepl(TbVEH.Text, GetPath(VectoFile))), + IEngineeringInputDataProvider).JobInputData.Vehicle + vehicleType = vehInput.VehicleCategory + End If + + Catch ex As Exception + vehicleType = VehicleCategory.RigidTruck + End Try + Try + If Not Trim(f) = "" Then GearboxForm.OpenGbx(f, vehicleType) + Catch ex As Exception + MsgBox("Failed to open Gearbox File: " + ex.Message) + End Try + End Sub #End Region #Region "Toolbar" - 'New - Private Sub ToolStripBtNew_Click(sender As Object, e As EventArgs) Handles ToolStripBtNew.Click - VectoNew() - End Sub - - 'Open - Private Sub ToolStripBtOpen_Click(sender As Object, e As EventArgs) Handles ToolStripBtOpen.Click - If JobfileFileBrowser.OpenDialog(VectoFile, False, "vecto") Then - Try - VECTOload2Form(JobfileFileBrowser.Files(0)) - Catch ex As Exception - MsgBox(ex.Message, MsgBoxStyle.OkOnly, "Error loading Vecto Job File") - End Try - - End If - End Sub - - 'Save - Private Sub ToolStripBtSave_Click(sender As Object, e As EventArgs) Handles ToolStripBtSave.Click - Save() - End Sub - - 'Save As - Private Sub ToolStripBtSaveAs_Click(sender As Object, e As EventArgs) Handles ToolStripBtSaveAs.Click - If JobfileFileBrowser.SaveDialog(VectoFile) Then Call VECTOsave(JobfileFileBrowser.Files(0)) - End Sub - - 'Send to Job file list in main form - Private Sub ToolStripBtSendTo_Click(sender As Object, e As EventArgs) Handles ToolStripBtSendTo.Click - If ChangeCheckCancel() Then Exit Sub - If VectoFile = "" Then - MsgBox("File not found!" & ChrW(10) & ChrW(10) & "Save file and try again.") - Else - MainForm.AddToJobListView(VectoFile) - End If - End Sub - - 'Help - Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs) Handles ToolStripButton1.Click - If File.Exists(MyAppPath & "User Manual\help.html") Then - Dim defaultBrowserPath As String = BrowserUtils.GetDefaultBrowserPath() - Process.Start(defaultBrowserPath, - String.Format("""file://{0}{1}""", MyAppPath, "User Manual\help.html#job-editor")) - Else - MsgBox("User Manual not found!", MsgBoxStyle.Critical) - End If - End Sub + 'New + Private Sub ToolStripBtNew_Click(sender As Object, e As EventArgs) Handles ToolStripBtNew.Click + VectoNew() + End Sub + + 'Open + Private Sub ToolStripBtOpen_Click(sender As Object, e As EventArgs) Handles ToolStripBtOpen.Click + If JobfileFileBrowser.OpenDialog(VectoFile, False, "vecto") Then + Try + VECTOload2Form(JobfileFileBrowser.Files(0)) + Catch ex As Exception + MsgBox(ex.Message, MsgBoxStyle.OkOnly, "Error loading Vecto Job File") + End Try + + End If + End Sub + + 'Save + Private Sub ToolStripBtSave_Click(sender As Object, e As EventArgs) Handles ToolStripBtSave.Click + Save() + End Sub + + 'Save As + Private Sub ToolStripBtSaveAs_Click(sender As Object, e As EventArgs) Handles ToolStripBtSaveAs.Click + If JobfileFileBrowser.SaveDialog(VectoFile) Then Call VECTOsave(JobfileFileBrowser.Files(0)) + End Sub + + 'Send to Job file list in main form + Private Sub ToolStripBtSendTo_Click(sender As Object, e As EventArgs) Handles ToolStripBtSendTo.Click + If ChangeCheckCancel() Then Exit Sub + If VectoFile = "" Then + MsgBox("File not found!" & ChrW(10) & ChrW(10) & "Save file and try again.") + Else + MainForm.AddToJobListView(VectoFile) + End If + End Sub + + 'Help + Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs) Handles ToolStripButton1.Click + If File.Exists(MyAppPath & "User Manual\help.html") Then + Dim defaultBrowserPath As String = BrowserUtils.GetDefaultBrowserPath() + Process.Start(defaultBrowserPath, + String.Format("""file://{0}{1}""", MyAppPath, "User Manual\help.html#job-editor")) + Else + MsgBox("User Manual not found!", MsgBoxStyle.Critical) + End If + End Sub #End Region - 'Save ("Save" or "Save As" when new file) - Private Function Save() As Boolean - If VectoFile = "" Then - If JobfileFileBrowser.SaveDialog("") Then - VectoFile = JobfileFileBrowser.Files(0) - Else - Return False - End If - End If - Try - Return VECTOsave(VectoFile) - Catch ex As Exception - MsgBox("Error when saving file" + Environment.NewLine + ex.Message) - Return False - End Try - End Function - - 'Open file - Public Sub VECTOload2Form(file As String) - - If ChangeCheckCancel() Then Exit Sub - - VectoNew() - - 'Read GEN - Dim vectoJob As IEngineeringJobInputData = Nothing - Dim inputData As IEngineeringInputDataProvider = Nothing - Try - inputData = TryCast(JSONInputDataFactory.ReadComponentData(file), - IEngineeringInputDataProvider) - vectoJob = inputData.JobInputData() - Catch ex As Exception - MsgBox("Failed to read Job-File" + Environment.NewLine + ex.Message) - Return - End Try - - - If Cfg.DeclMode <> vectoJob.SavedInDeclarationMode Then - Select Case WrongMode() - Case 1 - Close() - MainForm.RbDecl.Checked = Not MainForm.RbDecl.Checked - MainForm.OpenVectoFile(file) - Case -1 - Exit Sub - End Select - End If - - VectoFile = file - _basePath = Path.GetDirectoryName(file) - 'Update Form - - If inputData.JobInputData().EngineOnlyMode Then - TbENG.Text = GetRelativePath(inputData.JobInputData.EngineOnly.Source, _basePath) - CbEngOnly.Checked = True - Try - Dim sb As ICycleData - For Each sb In vectoJob.Cycles - Dim lv0 As ListViewItem = New ListViewItem - lv0.Text = GetRelativePath(sb.CycleData.Source, Path.GetDirectoryName(Path.GetFullPath(file))) 'sb.Name - LvCycles.Items.Add(lv0) - Next - Catch ex As Exception - End Try - CheckEngOnly() - Exit Sub - End If - CbEngOnly.Checked = False - CheckEngOnly() - 'Files ----------------------------- - TbVEH.Text = GetRelativePath(inputData.JobInputData.Vehicle.Source, _basePath) - TbENG.Text = GetRelativePath(inputData.JobInputData.Vehicle.EngineInputData.Source, _basePath) - TbGBX.Text = GetRelativePath(inputData.JobInputData.Vehicle.GearboxInputData.Source, _basePath) - - 'Start/Stop - Dim driver As IDriverEngineeringInputData = inputData.DriverInputData - - If (Cfg.DeclMode) Then - TbDesMaxFile.Text = "" - 'AA-TB - 'Try and Select any previously selected Auxiliary Type - Dim declarationInput As IDeclarationInputDataProvider = CType(inputData, IDeclarationInputDataProvider) - Dim auxInput As IAuxiliariesDeclarationInputData = declarationInput.JobInputData.Vehicle.AuxiliaryInputData() - - cboAdvancedAuxiliaries.SelectedIndex = 0 - cboAdvancedAuxiliaries.Enabled = False - LvAux.Items.Clear() - Dim entry As IAuxiliaryDeclarationInputData - For Each entry In auxInput.Auxiliaries - 'If entry.AuxiliaryType = AuxiliaryDemandType.Constant Then Continue For - Try - LvAux.Items.Add(CreateAuxListEntry(AuxiliaryTypeHelper.GetAuxKey(entry.Type), - AuxiliaryTypeHelper.ToString(entry.Type), String.Join("; ", entry.Technology))) - Catch ex As Exception - End Try - Next - Else - 'VACC - TbDesMaxFile.Text = - If(driver.AccelerationCurve Is Nothing, "", GetRelativePath(driver.AccelerationCurve.Source, _basePath)) - - cboAdvancedAuxiliaries.Enabled = True - Dim auxInput As IAuxiliariesEngineeringInputData = inputData.JobInputData.Vehicle.AuxiliaryInputData() - For Each item As AdvancedAuxiliary In cboAdvancedAuxiliaries.Items - If _ - AuxiliaryModelHelper.Parse(item.AssemblyName) = auxInput.AuxiliaryAssembly AndAlso - auxInput.AuxiliaryVersion = item.AuxiliaryVersion _ - Then - cboAdvancedAuxiliaries.SelectedItem = item - Exit For - End If - Next - 'AA-TB - 'Assign any previously saved Axiliary FilePath - txtAdvancedAuxiliaryFile.Text = - If _ - (IO.File.Exists(auxInput.AdvancedAuxiliaryFilePath), GetRelativePath(auxInput.AdvancedAuxiliaryFilePath, _basePath), - "") - - LvAux.Items.Clear() - For Each entry As IAuxiliaryEngineeringInputData In auxInput.Auxiliaries - If entry.AuxiliaryType = AuxiliaryDemandType.Constant Then - TbAuxPAdd.Text = entry.ConstantPowerDemand.ToGUIFormat() - Continue For - End If - - LvAux.Items.Add(CreateAuxListEntry(entry.ID, AuxiliaryTypeHelper.ParseKey(entry.ID).Name, - If(entry.DemandMap Is Nothing, "", GetRelativePath(entry.DemandMap.Source, _basePath)))) - Next - - End If - - Try - Dim sb As ICycleData - For Each sb In vectoJob.Cycles - Dim lv0 As ListViewItem = New ListViewItem - lv0.Text = GetRelativePath(sb.CycleData.Source, Path.GetDirectoryName(Path.GetFullPath(file))) 'sb.Name - LvCycles.Items.Add(lv0) - Next - Catch ex As Exception - End Try - - If driver.OverSpeedEcoRoll.Mode = DriverMode.EcoRoll Then - 'mk 2016-11-10: removed eco roll - instead automatically overspeed is used - 'RdEcoRoll.Checked = True - RdOverspeed.Checked = True - ElseIf driver.OverSpeedEcoRoll.Mode = DriverMode.Overspeed Then - RdOverspeed.Checked = True - Else - RdOff.Checked = True - End If - TbOverspeed.Text = driver.OverSpeedEcoRoll.OverSpeed.AsKmph.ToGUIFormat() - TbUnderSpeed.Text = driver.OverSpeedEcoRoll.UnderSpeed.AsKmph.ToGUIFormat() - TbVmin.Text = driver.OverSpeedEcoRoll.MinSpeed.AsKmph.ToGUIFormat() - If Not driver.Lookahead Is Nothing Then - CbLookAhead.Checked = driver.Lookahead.Enabled - 'TbAlookahead.Text = CStr(VEC0.ALookahead) - tbLacMinSpeed.Text = driver.Lookahead.MinSpeed.AsKmph.ToGUIFormat() - 'TbVminLA.Text = CStr(VEC0.VMinLa) - tbLacPreviewFactor.Text = driver.Lookahead.LookaheadDistanceFactor.ToGUIFormat() - tbDfCoastingOffset.Text = driver.Lookahead.CoastingDecisionFactorOffset.ToGUIFormat() - tbDfCoastingScale.Text = driver.Lookahead.CoastingDecisionFactorScaling.ToGUIFormat() - - tbLacDfTargetSpeedFile.Text = If(driver.Lookahead.CoastingDecisionFactorTargetSpeedLookup Is Nothing, "", - GetRelativePath(driver.Lookahead.CoastingDecisionFactorTargetSpeedLookup.Source, _basePath)) - tbLacDfVelocityDropFile.Text = If(driver.Lookahead.CoastingDecisionFactorVelocityDropLookup Is Nothing, "", - GetRelativePath(driver.Lookahead.CoastingDecisionFactorVelocityDropLookup.Source, _basePath)) - End If - '------------------------------------------------------------- - - DeclInit() - - - EngineForm.AutoSendTo = False - GearboxForm.AutoSendTo = False - VehicleForm.AutoSendTo = False - - - Dim x As Integer = Len(file) - While Mid(file, x, 1) <> "\" And x > 0 - x = x - 1 - End While - Text = Mid(file, x + 1, Len(file) - x) - _changed = False - ToolStripStatusLabelGEN.Text = "" 'file & " opened." - - UpdatePic() - - '------------------------------------------------------------- - End Sub - - Private Function CreateAuxListEntry(auxKey As String, type As String, technology As String) As ListViewItem - Dim lv0 As ListViewItem = New ListViewItem - lv0.SubItems(AuxViewColumns.AuxID).Text = auxKey - lv0.SubItems.Add(type) - lv0.SubItems.Add(technology) - Return lv0 - End Function - - - 'Save file - Private Function VECTOsave(file As String) As Boolean - Dim message As String = String.Empty - - 'AA-TB - 'Validation of Auxiliary Types/Advanced Auxiliaries - 'if not classic, check the file is valid, if not fail the operation and alert user. - If cboAdvancedAuxiliaries.SelectedIndex > 0 Then - - 'resolve absolute path for auxiliary file. - Dim absoluteAAUxFile As String = ResolveAAUXFilePath(GetPath(VectoFile), txtAdvancedAuxiliaryFile.Text) - - Dim aaAssemblyName As String = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary).AssemblyName - Dim aaAssemblyVersion As String = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary).AuxiliaryVersion - - - If Not ValidateAAUXFile(absoluteAAUxFile, aaAssemblyName, aaAssemblyVersion, message) Then - MessageBox.Show( - String.Format("You have selected an advanced auxiliary *Auxiliary Type*, but the file specified is invalid :{0}", - message)) - Return False - End If - - End If - - - Dim vectoJob As VectoJob = New VectoJob - vectoJob.FilePath = file - - 'Files ------------------------------------------------- ----------------- - - vectoJob.PathVeh = TbVEH.Text - vectoJob.PathEng = TbENG.Text - - For Each lv0 As ListViewItem In LvCycles.Items - Dim sb As SubPath = New SubPath - sb.Init(GetPath(file), lv0.Text) - vectoJob.CycleFiles.Add(sb) - Next - - vectoJob.PathGbx = TbGBX.Text - - - 'a_DesMax - vectoJob.DesMaxFile = TbDesMaxFile.Text - - 'AA-TB - vectoJob.AuxiliaryAssembly = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary).AssemblyName - vectoJob.AuxiliaryVersion = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary).AuxiliaryVersion - vectoJob.AdvancedAuxiliaryFilePath = txtAdvancedAuxiliaryFile.Text - - For Each lv0 As ListViewItem In LvAux.Items - Dim auxEntry As VectoJob.AuxEntry = New VectoJob.AuxEntry + 'Save ("Save" or "Save As" when new file) + Private Function Save() As Boolean + If VectoFile = "" Then + If JobfileFileBrowser.SaveDialog("") Then + VectoFile = JobfileFileBrowser.Files(0) + Else + Return False + End If + End If + Try + Return VECTOsave(VectoFile) + Catch ex As Exception + MsgBox("Error when saving file" + Environment.NewLine + ex.Message) + Return False + End Try + End Function + + 'Open file + Public Sub VECTOload2Form(file As String) + + If ChangeCheckCancel() Then Exit Sub + + VectoNew() + + 'Read GEN + Dim vectoJob As IEngineeringJobInputData = Nothing + Dim inputData As IEngineeringInputDataProvider = Nothing + Try + inputData = TryCast(JSONInputDataFactory.ReadComponentData(file), + IEngineeringInputDataProvider) + vectoJob = inputData.JobInputData() + Catch ex As Exception + MsgBox("Failed to read Job-File" + Environment.NewLine + ex.Message) + Return + End Try + + + If Cfg.DeclMode <> vectoJob.SavedInDeclarationMode Then + Select Case WrongMode() + Case 1 + Close() + MainForm.RbDecl.Checked = Not MainForm.RbDecl.Checked + MainForm.OpenVectoFile(file) + Case -1 + Exit Sub + End Select + End If + + VectoFile = file + _basePath = Path.GetDirectoryName(file) + 'Update Form + + If inputData.JobInputData().EngineOnlyMode Then + TbENG.Text = GetRelativePath(inputData.JobInputData.EngineOnly.Source, _basePath) + CbEngOnly.Checked = True + Try + Dim sb As ICycleData + For Each sb In vectoJob.Cycles + Dim lv0 As ListViewItem = New ListViewItem + lv0.Text = GetRelativePath(sb.CycleData.Source, Path.GetDirectoryName(Path.GetFullPath(file))) 'sb.Name + LvCycles.Items.Add(lv0) + Next + Catch ex As Exception + End Try + CheckEngOnly() + Exit Sub + End If + CbEngOnly.Checked = False + CheckEngOnly() + 'Files ----------------------------- + TbVEH.Text = GetRelativePath(inputData.JobInputData.Vehicle.Source, _basePath) + TbENG.Text = GetRelativePath(inputData.JobInputData.Vehicle.EngineInputData.Source, _basePath) + TbGBX.Text = GetRelativePath(inputData.JobInputData.Vehicle.GearboxInputData.Source, _basePath) + TbShiftStrategyParams.Text = GetRelativePath(inputData.GearshiftInputData.Source, _basePath) + + 'Start/Stop + Dim driver As IDriverEngineeringInputData = inputData.DriverInputData + + If (Cfg.DeclMode) Then + TbDesMaxFile.Text = "" + 'AA-TB + 'Try and Select any previously selected Auxiliary Type + Dim declarationInput As IDeclarationInputDataProvider = CType(inputData, IDeclarationInputDataProvider) + Dim auxInput As IAuxiliariesDeclarationInputData = declarationInput.JobInputData.Vehicle.AuxiliaryInputData() + + cboAdvancedAuxiliaries.SelectedIndex = 0 + cboAdvancedAuxiliaries.Enabled = False + LvAux.Items.Clear() + Dim entry As IAuxiliaryDeclarationInputData + For Each entry In auxInput.Auxiliaries + 'If entry.AuxiliaryType = AuxiliaryDemandType.Constant Then Continue For + Try + LvAux.Items.Add(CreateAuxListEntry(AuxiliaryTypeHelper.GetAuxKey(entry.Type), + AuxiliaryTypeHelper.ToString(entry.Type), String.Join("; ", entry.Technology))) + Catch ex As Exception + End Try + Next + Else + 'VACC + TbDesMaxFile.Text = + If(driver.AccelerationCurve Is Nothing, "", GetRelativePath(driver.AccelerationCurve.Source, _basePath)) + + cboAdvancedAuxiliaries.Enabled = True + Dim auxInput As IAuxiliariesEngineeringInputData = inputData.JobInputData.Vehicle.AuxiliaryInputData() + For Each item As AdvancedAuxiliary In cboAdvancedAuxiliaries.Items + If _ + AuxiliaryModelHelper.Parse(item.AssemblyName) = auxInput.AuxiliaryAssembly AndAlso + auxInput.AuxiliaryVersion = item.AuxiliaryVersion _ + Then + cboAdvancedAuxiliaries.SelectedItem = item + Exit For + End If + Next + 'AA-TB + 'Assign any previously saved Axiliary FilePath + txtAdvancedAuxiliaryFile.Text = + If _ + (IO.File.Exists(auxInput.AdvancedAuxiliaryFilePath), GetRelativePath(auxInput.AdvancedAuxiliaryFilePath, _basePath), + "") + + LvAux.Items.Clear() + For Each entry As IAuxiliaryEngineeringInputData In auxInput.Auxiliaries + If entry.AuxiliaryType = AuxiliaryDemandType.Constant Then + TbAuxPAdd.Text = entry.ConstantPowerDemand.ToGUIFormat() + Continue For + End If + + LvAux.Items.Add(CreateAuxListEntry(entry.ID, AuxiliaryTypeHelper.ParseKey(entry.ID).Name, + If(entry.DemandMap Is Nothing, "", GetRelativePath(entry.DemandMap.Source, _basePath)))) + Next + + End If + + BtnShiftStrategyParams.Enabled = Not Cfg.DeclMode + TbShiftStrategyParams.Enabled = not Cfg.DeclMode + BtnShiftParamsForm.Enabled = not cfg.DeclMode + + Try + Dim sb As ICycleData + For Each sb In vectoJob.Cycles + Dim lv0 As ListViewItem = New ListViewItem + lv0.Text = GetRelativePath(sb.CycleData.Source, Path.GetDirectoryName(Path.GetFullPath(file))) 'sb.Name + LvCycles.Items.Add(lv0) + Next + Catch ex As Exception + End Try + + If driver.OverSpeedEcoRoll.Mode = DriverMode.EcoRoll Then + 'mk 2016-11-10: removed eco roll - instead automatically overspeed is used + 'RdEcoRoll.Checked = True + RdOverspeed.Checked = True + ElseIf driver.OverSpeedEcoRoll.Mode = DriverMode.Overspeed Then + RdOverspeed.Checked = True + Else + RdOff.Checked = True + End If + TbOverspeed.Text = driver.OverSpeedEcoRoll.OverSpeed.AsKmph.ToGUIFormat() + TbUnderSpeed.Text = driver.OverSpeedEcoRoll.UnderSpeed.AsKmph.ToGUIFormat() + TbVmin.Text = driver.OverSpeedEcoRoll.MinSpeed.AsKmph.ToGUIFormat() + If Not driver.Lookahead Is Nothing Then + CbLookAhead.Checked = driver.Lookahead.Enabled + 'TbAlookahead.Text = CStr(VEC0.ALookahead) + tbLacMinSpeed.Text = driver.Lookahead.MinSpeed.AsKmph.ToGUIFormat() + 'TbVminLA.Text = CStr(VEC0.VMinLa) + tbLacPreviewFactor.Text = driver.Lookahead.LookaheadDistanceFactor.ToGUIFormat() + tbDfCoastingOffset.Text = driver.Lookahead.CoastingDecisionFactorOffset.ToGUIFormat() + tbDfCoastingScale.Text = driver.Lookahead.CoastingDecisionFactorScaling.ToGUIFormat() + + tbLacDfTargetSpeedFile.Text = If(driver.Lookahead.CoastingDecisionFactorTargetSpeedLookup Is Nothing, "", + GetRelativePath(driver.Lookahead.CoastingDecisionFactorTargetSpeedLookup.Source, _basePath)) + tbLacDfVelocityDropFile.Text = If(driver.Lookahead.CoastingDecisionFactorVelocityDropLookup Is Nothing, "", + GetRelativePath(driver.Lookahead.CoastingDecisionFactorVelocityDropLookup.Source, _basePath)) + End If + '------------------------------------------------------------- + + DeclInit() + + + EngineForm.AutoSendTo = False + GearboxForm.AutoSendTo = False + VehicleForm.AutoSendTo = False + + + Dim x As Integer = Len(file) + While Mid(file, x, 1) <> "\" And x > 0 + x = x - 1 + End While + Text = Mid(file, x + 1, Len(file) - x) + _changed = False + ToolStripStatusLabelGEN.Text = "" 'file & " opened." + + UpdatePic() + + '------------------------------------------------------------- + End Sub + + Private Function CreateAuxListEntry(auxKey As String, type As String, technology As String) As ListViewItem + Dim lv0 As ListViewItem = New ListViewItem + lv0.SubItems(AuxViewColumns.AuxID).Text = auxKey + lv0.SubItems.Add(type) + lv0.SubItems.Add(technology) + Return lv0 + End Function + + + 'Save file + Private Function VECTOsave(file As String) As Boolean + Dim message As String = String.Empty + + 'AA-TB + 'Validation of Auxiliary Types/Advanced Auxiliaries + 'if not classic, check the file is valid, if not fail the operation and alert user. + If cboAdvancedAuxiliaries.SelectedIndex > 0 Then + + 'resolve absolute path for auxiliary file. + Dim absoluteAAUxFile As String = ResolveAAUXFilePath(GetPath(VectoFile), txtAdvancedAuxiliaryFile.Text) + + Dim aaAssemblyName As String = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary).AssemblyName + Dim aaAssemblyVersion As String = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary).AuxiliaryVersion + + + If Not ValidateAAUXFile(absoluteAAUxFile, aaAssemblyName, aaAssemblyVersion, message) Then + MessageBox.Show( + String.Format("You have selected an advanced auxiliary *Auxiliary Type*, but the file specified is invalid :{0}", + message)) + Return False + End If + + End If + + + Dim vectoJob As VectoJob = New VectoJob + vectoJob.FilePath = file + + 'Files ------------------------------------------------- ----------------- + + vectoJob.PathVeh = TbVEH.Text + vectoJob.PathEng = TbENG.Text + + For Each lv0 As ListViewItem In LvCycles.Items + Dim sb As SubPath = New SubPath + sb.Init(GetPath(file), lv0.Text) + vectoJob.CycleFiles.Add(sb) + Next + + vectoJob.PathGbx = TbGBX.Text + vectoJob.PathShiftParams = TbShiftStrategyParams.Text + + 'a_DesMax + vectoJob.DesMaxFile = TbDesMaxFile.Text + + 'AA-TB + vectoJob.AuxiliaryAssembly = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary).AssemblyName + vectoJob.AuxiliaryVersion = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary).AuxiliaryVersion + vectoJob.AdvancedAuxiliaryFilePath = txtAdvancedAuxiliaryFile.Text + + For Each lv0 As ListViewItem In LvAux.Items + Dim auxEntry As VectoJob.AuxEntry = New VectoJob.AuxEntry - If Cfg.DeclMode Then - auxEntry.TechnologyList.Clear() - auxEntry.TechnologyList.AddRange( - lv0.SubItems(AuxViewColumns.AuxInputOrTech).Text.Split(";"c).Select( - Function(x) Trim(x))) - Else - auxEntry.Path.Init(GetPath(file), lv0.SubItems(AuxViewColumns.AuxInputOrTech).Text) - End If + If Cfg.DeclMode Then + auxEntry.TechnologyList.Clear() + auxEntry.TechnologyList.AddRange( + lv0.SubItems(AuxViewColumns.AuxInputOrTech).Text.Split(";"c).Select( + Function(x) Trim(x))) + Else + auxEntry.Path.Init(GetPath(file), lv0.SubItems(AuxViewColumns.AuxInputOrTech).Text) + End If - auxEntry.Type = AuxiliaryTypeHelper.ParseKey(lv0.SubItems(AuxViewColumns.AuxID).Text) - vectoJob.AuxPaths.Add(lv0.SubItems(AuxViewColumns.AuxID).Text, auxEntry) - Next - vectoJob.AuxPAdd = TbAuxPAdd.Text.ToDouble(0) + auxEntry.Type = AuxiliaryTypeHelper.ParseKey(lv0.SubItems(AuxViewColumns.AuxID).Text) + vectoJob.AuxPaths.Add(lv0.SubItems(AuxViewColumns.AuxID).Text, auxEntry) + Next + vectoJob.AuxPAdd = TbAuxPAdd.Text.ToDouble(0) - vectoJob.EngineOnly = CbEngOnly.Checked + vectoJob.EngineOnly = CbEngOnly.Checked - vectoJob.EcoRollOn = False 'RdEcoRoll.Checked - vectoJob.OverSpeedOn = RdOverspeed.Checked - vectoJob.OverSpeed = TbOverspeed.Text.ToDouble(0) - vectoJob.UnderSpeed = TbUnderSpeed.Text.ToDouble(0) - vectoJob.VMin = TbVmin.Text.ToDouble(0) - vectoJob.LookAheadOn = CbLookAhead.Checked - 'vec0.ALookahead = CSng(fTextboxToNumString(TbAlookahead.Text)) - 'vec0.VMinLa = CSng(fTextboxToNumString(TbVminLA.Text)) - vectoJob.LookAheadMinSpeed = tbLacMinSpeed.Text.ToDouble(0) - vectoJob.LacPreviewFactor = tbLacPreviewFactor.Text.ToDouble(0) - vectoJob.LacDfOffset = tbDfCoastingOffset.Text.ToDouble(0) - vectoJob.LacDfScale = tbDfCoastingScale.Text.ToDouble(0) - vectoJob.LacDfTargetSpeedFile = tbLacDfTargetSpeedFile.Text - vectoJob.LacDfVelocityDropFile = tbLacDfVelocityDropFile.Text - '------------------------------------------------------------ + vectoJob.EcoRollOn = False 'RdEcoRoll.Checked + vectoJob.OverSpeedOn = RdOverspeed.Checked + vectoJob.OverSpeed = TbOverspeed.Text.ToDouble(0) + vectoJob.UnderSpeed = TbUnderSpeed.Text.ToDouble(0) + vectoJob.VMin = TbVmin.Text.ToDouble(0) + vectoJob.LookAheadOn = CbLookAhead.Checked + 'vec0.ALookahead = CSng(fTextboxToNumString(TbAlookahead.Text)) + 'vec0.VMinLa = CSng(fTextboxToNumString(TbVminLA.Text)) + vectoJob.LookAheadMinSpeed = tbLacMinSpeed.Text.ToDouble(0) + vectoJob.LacPreviewFactor = tbLacPreviewFactor.Text.ToDouble(0) + vectoJob.LacDfOffset = tbDfCoastingOffset.Text.ToDouble(0) + vectoJob.LacDfScale = tbDfCoastingScale.Text.ToDouble(0) + vectoJob.LacDfTargetSpeedFile = tbLacDfTargetSpeedFile.Text + vectoJob.LacDfVelocityDropFile = tbLacDfVelocityDropFile.Text + '------------------------------------------------------------ - 'SAVE - If Not vectoJob.SaveFile Then - MsgBox("Cannot safe to " & file, MsgBoxStyle.Critical) - Return False - End If + 'SAVE + If Not vectoJob.SaveFile Then + MsgBox("Cannot safe to " & file, MsgBoxStyle.Critical) + Return False + End If - VectoFile = file + VectoFile = file - file = GetFilenameWithoutPath(VectoFile, True) + file = GetFilenameWithoutPath(VectoFile, True) - Text = file - ToolStripStatusLabelGEN.Text = "" + Text = file + ToolStripStatusLabelGEN.Text = "" - MainForm.AddToJobListView(VectoFile) + MainForm.AddToJobListView(VectoFile) - _changed = False + _changed = False - Return True - End Function + Return True + End Function - 'New file - Public Sub VectoNew() + 'New file + Public Sub VectoNew() - If ChangeCheckCancel() Then Exit Sub + If ChangeCheckCancel() Then Exit Sub - 'Files - TbVEH.Text = "" - TbENG.Text = "" - LvCycles.Items.Clear() - TbGBX.Text = "" - TbDesMaxFile.Text = "" + 'Files + TbVEH.Text = "" + TbENG.Text = "" + LvCycles.Items.Clear() + TbGBX.Text = "" + TbDesMaxFile.Text = "" - LvAux.Items.Clear() + LvAux.Items.Clear() - CbEngOnly.Checked = False + CbEngOnly.Checked = False - 'RdOff.Checked = True - RdOverspeed.Checked = True - CbLookAhead.Checked = True - 'TbAlookahead.Text = "-0.5" - TbOverspeed.Text = DeclarationData.Driver.OverSpeedEcoRoll.OverSpeed.AsKmph.ToGUIFormat() - TbUnderSpeed.Text = DeclarationData.Driver.OverSpeedEcoRoll.UnderSpeed.AsKmph.ToGUIFormat() - TbVmin.Text = DeclarationData.Driver.OverSpeedEcoRoll.MinSpeed.AsKmph.ToGUIFormat() + 'RdOff.Checked = True + RdOverspeed.Checked = True + CbLookAhead.Checked = True + 'TbAlookahead.Text = "-0.5" + TbOverspeed.Text = DeclarationData.Driver.OverSpeedEcoRoll.OverSpeed.AsKmph.ToGUIFormat() + TbUnderSpeed.Text = DeclarationData.Driver.OverSpeedEcoRoll.UnderSpeed.AsKmph.ToGUIFormat() + TbVmin.Text = DeclarationData.Driver.OverSpeedEcoRoll.MinSpeed.AsKmph.ToGUIFormat() + + 'TbVminLA.Text = "50" + tbLacMinSpeed.Text = DeclarationData.Driver.LookAhead.MinimumSpeed.AsKmph.ToGUIFormat() + tbLacPreviewFactor.Text = DeclarationData.Driver.LookAhead.LookAheadDistanceFactor.ToGUIFormat() + tbDfCoastingOffset.Text = DeclarationData.Driver.LookAhead.DecisionFactorCoastingOffset.ToGUIFormat() + tbDfCoastingScale.Text = DeclarationData.Driver.LookAhead.DecisionFactorCoastingScaling.ToGUIFormat() + tbLacDfTargetSpeedFile.Text = "" + tbLacDfVelocityDropFile.Text = "" + + cboAdvancedAuxiliaries.Enabled = Not Cfg.DeclMode + '--------------------------------------------------- + + DeclInit() - 'TbVminLA.Text = "50" - tbLacMinSpeed.Text = DeclarationData.Driver.LookAhead.MinimumSpeed.AsKmph.ToGUIFormat() - tbLacPreviewFactor.Text = DeclarationData.Driver.LookAhead.LookAheadDistanceFactor.ToGUIFormat() - tbDfCoastingOffset.Text = DeclarationData.Driver.LookAhead.DecisionFactorCoastingOffset.ToGUIFormat() - tbDfCoastingScale.Text = DeclarationData.Driver.LookAhead.DecisionFactorCoastingScaling.ToGUIFormat() - tbLacDfTargetSpeedFile.Text = "" - tbLacDfVelocityDropFile.Text = "" - - cboAdvancedAuxiliaries.Enabled = Not Cfg.DeclMode - '--------------------------------------------------- - - DeclInit() - - EngineForm.AutoSendTo = False - - VectoFile = "" - Text = "Job Editor" - ToolStripStatusLabelGEN.Text = "" - _changed = False - UpdatePic() - End Sub + EngineForm.AutoSendTo = False + + VectoFile = "" + Text = "Job Editor" + ToolStripStatusLabelGEN.Text = "" + _changed = False + UpdatePic() + End Sub #Region "Track changes" #Region "'Change' Events" - Private Sub TextBoxVEH_TextChanged(sender As Object, e As EventArgs) _ - Handles TbVEH.TextChanged - UpdatePic() - Change() - End Sub + Private Sub TextBoxVEH_TextChanged(sender As Object, e As EventArgs) _ + Handles TbVEH.TextChanged + UpdatePic() + Change() + End Sub - Private Sub TextBoxMAP_TextChanged(sender As Object, e As EventArgs) _ - Handles TbENG.TextChanged - UpdatePic() - Change() - End Sub + Private Sub TextBoxMAP_TextChanged(sender As Object, e As EventArgs) _ + Handles TbENG.TextChanged + UpdatePic() + Change() + End Sub - Private Sub TextBoxFLD_TextChanged(sender As Object, e As EventArgs) _ - Handles TbGBX.TextChanged - UpdatePic() - Change() - End Sub + Private Sub TextBoxFLD_TextChanged(sender As Object, e As EventArgs) _ + Handles TbGBX.TextChanged + UpdatePic() + Change() + End Sub - Private Sub TbDesMaxFile_TextChanged_1(sender As Object, e As EventArgs) Handles TbDesMaxFile.TextChanged - Change() - End Sub + Private Sub TbDesMaxFile_TextChanged_1(sender As Object, e As EventArgs) Handles TbDesMaxFile.TextChanged + Change() + End Sub - Private Sub TBSSspeed_TextChanged(sender As Object, e As EventArgs) - Change() - End Sub + Private Sub TBSSspeed_TextChanged(sender As Object, e As EventArgs) + Change() + End Sub - Private Sub TBSStime_TextChanged(sender As Object, e As EventArgs) + Private Sub TBSStime_TextChanged(sender As Object, e As EventArgs) - Change() - End Sub + Change() + End Sub - Private Sub TbOverspeed_TextChanged(sender As Object, e As EventArgs) Handles TbOverspeed.TextChanged - Change() - End Sub + Private Sub TbOverspeed_TextChanged(sender As Object, e As EventArgs) Handles TbOverspeed.TextChanged + Change() + End Sub - Private Sub TbUnderSpeed_TextChanged(sender As Object, e As EventArgs) Handles TbUnderSpeed.TextChanged - Change() - End Sub + Private Sub TbUnderSpeed_TextChanged(sender As Object, e As EventArgs) Handles TbUnderSpeed.TextChanged + Change() + End Sub - Private Sub TbVmin_TextChanged(sender As Object, e As EventArgs) _ - Handles TbVmin.TextChanged - Change() - End Sub + Private Sub TbVmin_TextChanged(sender As Object, e As EventArgs) _ + Handles TbVmin.TextChanged + Change() + End Sub - Private Sub LvCycles_AfterLabelEdit(sender As Object, e As LabelEditEventArgs) _ - Handles LvCycles.AfterLabelEdit - Change() - End Sub + Private Sub LvCycles_AfterLabelEdit(sender As Object, e As LabelEditEventArgs) _ + Handles LvCycles.AfterLabelEdit + Change() + End Sub #End Region - Private Sub Change() - If Not _changed Then - ToolStripStatusLabelGEN.Text = "Unsaved changes in current file" - _changed = True - End If - End Sub + Private Sub Change() + If Not _changed Then + ToolStripStatusLabelGEN.Text = "Unsaved changes in current file" + _changed = True + End If + End Sub - ' "Save changes? "... Returns True if User aborts - Private Function ChangeCheckCancel() As Boolean + ' "Save changes? "... Returns True if User aborts + Private Function ChangeCheckCancel() As Boolean - If _changed Then + If _changed Then - Select Case MsgBox("Save changes ?", MsgBoxStyle.YesNoCancel) - Case MsgBoxResult.Yes - Return Not Save() - Case MsgBoxResult.Cancel - Return True - Case Else 'MsgBoxResult.No - _changed = False - Return False - End Select + Select Case MsgBox("Save changes ?", MsgBoxStyle.YesNoCancel) + Case MsgBoxResult.Yes + Return Not Save() + Case MsgBoxResult.Cancel + Return True + Case Else 'MsgBoxResult.No + _changed = False + Return False + End Select - Else + Else - Return False + Return False - End If - End Function + End If + End Function #End Region #Region "Aux Listview" - Private Sub ButAuxAdd_Click(sender As Object, e As EventArgs) Handles ButAuxAdd.Click - Dim id As String + Private Sub ButAuxAdd_Click(sender As Object, e As EventArgs) Handles ButAuxAdd.Click + Dim id As String - _auxDialog.VehPath = GetPath(VectoFile) - _auxDialog.TbPath.Text = "" - '_auxDialog.CbType.SelectedIndex = -1 - '_auxDialog.CbType.Text = "" - _auxDialog.TbID.Text = "" '!!! Set Type before ID, because changing the type will overwrite the id !!! + _auxDialog.VehPath = GetPath(VectoFile) + _auxDialog.TbPath.Text = "" + '_auxDialog.CbType.SelectedIndex = -1 + '_auxDialog.CbType.Text = "" + _auxDialog.TbID.Text = "" '!!! Set Type before ID, because changing the type will overwrite the id !!! lbDlog: - If _auxDialog.ShowDialog = DialogResult.OK Then - - id = UCase(Trim(_auxDialog.TbID.Text)) - - Dim lv0 As ListViewItem - For Each lv0 In LvAux.Items - If lv0.SubItems(AuxViewColumns.AuxID).Text = id Then - MsgBox("ID '" & id & "' already defined!", MsgBoxStyle.Critical) - _auxDialog.TbID.SelectAll() - _auxDialog.TbID.Focus() - GoTo lbDlog - End If - Next - LvAux.Items.Add(CreateAuxListEntry(UCase(Trim(_auxDialog.TbID.Text)), Trim(_auxDialog.CbType.Text), - Trim(_auxDialog.TbPath.Text))) - Change() - End If - End Sub - - Private Sub ButAuxRem_Click(sender As Object, e As EventArgs) Handles ButAuxRem.Click - RemoveAuxItem() - End Sub - - Private Sub LvAux_DoubleClick(sender As Object, e As EventArgs) Handles LvAux.DoubleClick - EditAuxItem() - End Sub - - Private Sub LvAux_KeyDown(sender As Object, e As KeyEventArgs) Handles LvAux.KeyDown - Select Case e.KeyCode - Case Keys.Delete, Keys.Back - If Not Cfg.DeclMode Then RemoveAuxItem() - Case Keys.Enter - EditAuxItem() - End Select - End Sub - - Private Sub EditAuxItem() - If LvAux.SelectedItems.Count = 0 Then - Exit Sub - End If - - Dim selItem As ListViewItem = LvAux.SelectedItems(0) - _auxDialog.VehPath = GetPath(VectoFile) - '_auxDialog.CbType.SelectedIndex = -1 - - If selItem.SubItems(AuxViewColumns.AuxID).Text <> AuxiliaryTypeHelper.GetAuxKey(AuxiliaryType.SteeringPump) Then - _auxDialog.NumAxles = 0 - Else - _auxDialog.NumAxles = - If(String.IsNullOrWhiteSpace(TbAxleConf.Text), 1, AxleConfigurationHelper.Parse(TbAxleConf.Text).NumAxles()) - - End If - - _auxDialog.CbType.SelectedValue = selItem.SubItems(AuxViewColumns.AuxID).Text ' last call, updates GUI - If Cfg.DeclMode Then - If selItem.SubItems(AuxViewColumns.AuxID).Text = AuxiliaryTypeHelper.GetAuxKey(AuxiliaryType.SteeringPump) Then - Dim parts As String() = selItem.SubItems(AuxViewColumns.AuxInputOrTech).Text.Split(";"c) - _auxDialog.CbTech2.SelectedItem = VehicleAuxiliariesDialog.AxleNotSteered - _auxDialog.CbTech3.SelectedItem = VehicleAuxiliariesDialog.AxleNotSteered - _auxDialog.CbTech4.SelectedItem = VehicleAuxiliariesDialog.AxleNotSteered - If parts.Length > 0 Then _auxDialog.CbTech.SelectedValue = Trim(parts(0)) - If parts.Length > 1 Then _auxDialog.CbTech2.SelectedValue = Trim(parts(1)) - If parts.Length > 2 Then _auxDialog.CbTech3.SelectedValue = Trim(parts(2)) - If parts.Length > 3 Then _auxDialog.CbTech4.SelectedValue = Trim(parts(3)) - Else - _auxDialog.CbTech.SelectedValue = selItem.SubItems(AuxViewColumns.AuxInputOrTech).Text - _auxDialog.TbPath.Text = "" - - End If - Else - _auxDialog.CbTech.SelectedIndex = -1 - _auxDialog.TbPath.Text = selItem.SubItems(AuxViewColumns.AuxInputOrTech).Text - End If - - '_auxDialog.TbID.Text = selItem.SubItems(AuxViewColumns.AuxID).Text - - If _auxDialog.ShowDialog = DialogResult.OK Then - selItem.SubItems(AuxViewColumns.AuxID).Text = _auxDialog.CbType.SelectedValue.ToString() _ - 'UCase(Trim(_auxDialog.TbID.Text)) - selItem.SubItems(AuxViewColumns.AuxType).Text = _auxDialog.CbType.Text - - If Cfg.DeclMode Then - If _auxDialog.TbID.Text = AuxiliaryTypeHelper.GetAuxKey(AuxiliaryType.SteeringPump) Then - Dim techlist As List(Of String) = New List(Of String) - techlist.Add(_auxDialog.CbTech.Text) - If _auxDialog.CbTech2.Text <> VehicleAuxiliariesDialog.AxleNotSteered Then techlist.Add(_auxDialog.CbTech2.Text) - If _auxDialog.CbTech3.Text <> VehicleAuxiliariesDialog.AxleNotSteered Then techlist.Add(_auxDialog.CbTech3.Text) - If _auxDialog.CbTech4.Text <> VehicleAuxiliariesDialog.AxleNotSteered Then techlist.Add(_auxDialog.CbTech4.Text) - selItem.SubItems(AuxViewColumns.AuxInputOrTech).Text = String.Join("; ", techlist) - Else - selItem.SubItems(AuxViewColumns.AuxInputOrTech).Text = Trim(_auxDialog.CbTech.Text) - End If - - Else - selItem.SubItems(AuxViewColumns.AuxInputOrTech).Text = Trim(_auxDialog.TbPath.Text) - End If - - Change() - End If - End Sub - - Private Sub RemoveAuxItem() - Dim i As Integer - - If LvAux.SelectedItems.Count = 0 Then - If LvAux.Items.Count = 0 Then - Exit Sub - Else - LvAux.Items(LvAux.Items.Count - 1).Selected = True - End If - End If - - i = LvAux.SelectedItems(0).Index - - LvAux.SelectedItems(0).Remove() - - If LvAux.Items.Count > 0 Then - If i < LvAux.Items.Count Then - LvAux.Items(i).Selected = True - Else - LvAux.Items(LvAux.Items.Count - 1).Selected = True - End If - LvAux.Focus() - End If - - Change() - End Sub + If _auxDialog.ShowDialog = DialogResult.OK Then + + id = UCase(Trim(_auxDialog.TbID.Text)) + + Dim lv0 As ListViewItem + For Each lv0 In LvAux.Items + If lv0.SubItems(AuxViewColumns.AuxID).Text = id Then + MsgBox("ID '" & id & "' already defined!", MsgBoxStyle.Critical) + _auxDialog.TbID.SelectAll() + _auxDialog.TbID.Focus() + GoTo lbDlog + End If + Next + LvAux.Items.Add(CreateAuxListEntry(UCase(Trim(_auxDialog.TbID.Text)), Trim(_auxDialog.CbType.Text), + Trim(_auxDialog.TbPath.Text))) + Change() + End If + End Sub + + Private Sub ButAuxRem_Click(sender As Object, e As EventArgs) Handles ButAuxRem.Click + RemoveAuxItem() + End Sub + + Private Sub LvAux_DoubleClick(sender As Object, e As EventArgs) Handles LvAux.DoubleClick + EditAuxItem() + End Sub + + Private Sub LvAux_KeyDown(sender As Object, e As KeyEventArgs) Handles LvAux.KeyDown + Select Case e.KeyCode + Case Keys.Delete, Keys.Back + If Not Cfg.DeclMode Then RemoveAuxItem() + Case Keys.Enter + EditAuxItem() + End Select + End Sub + + Private Sub EditAuxItem() + If LvAux.SelectedItems.Count = 0 Then + Exit Sub + End If + + Dim selItem As ListViewItem = LvAux.SelectedItems(0) + _auxDialog.VehPath = GetPath(VectoFile) + '_auxDialog.CbType.SelectedIndex = -1 + + If selItem.SubItems(AuxViewColumns.AuxID).Text <> AuxiliaryTypeHelper.GetAuxKey(AuxiliaryType.SteeringPump) Then + _auxDialog.NumAxles = 0 + Else + _auxDialog.NumAxles = + If(String.IsNullOrWhiteSpace(TbAxleConf.Text), 1, AxleConfigurationHelper.Parse(TbAxleConf.Text).NumAxles()) + + End If + + _auxDialog.CbType.SelectedValue = selItem.SubItems(AuxViewColumns.AuxID).Text ' last call, updates GUI + If Cfg.DeclMode Then + If selItem.SubItems(AuxViewColumns.AuxID).Text = AuxiliaryTypeHelper.GetAuxKey(AuxiliaryType.SteeringPump) Then + Dim parts As String() = selItem.SubItems(AuxViewColumns.AuxInputOrTech).Text.Split(";"c) + _auxDialog.CbTech2.SelectedItem = VehicleAuxiliariesDialog.AxleNotSteered + _auxDialog.CbTech3.SelectedItem = VehicleAuxiliariesDialog.AxleNotSteered + _auxDialog.CbTech4.SelectedItem = VehicleAuxiliariesDialog.AxleNotSteered + If parts.Length > 0 Then _auxDialog.CbTech.SelectedValue = Trim(parts(0)) + If parts.Length > 1 Then _auxDialog.CbTech2.SelectedValue = Trim(parts(1)) + If parts.Length > 2 Then _auxDialog.CbTech3.SelectedValue = Trim(parts(2)) + If parts.Length > 3 Then _auxDialog.CbTech4.SelectedValue = Trim(parts(3)) + Else + _auxDialog.CbTech.SelectedValue = selItem.SubItems(AuxViewColumns.AuxInputOrTech).Text + _auxDialog.TbPath.Text = "" + + End If + Else + _auxDialog.CbTech.SelectedIndex = -1 + _auxDialog.TbPath.Text = selItem.SubItems(AuxViewColumns.AuxInputOrTech).Text + End If + + '_auxDialog.TbID.Text = selItem.SubItems(AuxViewColumns.AuxID).Text + + If _auxDialog.ShowDialog = DialogResult.OK Then + selItem.SubItems(AuxViewColumns.AuxID).Text = _auxDialog.CbType.SelectedValue.ToString() _ + 'UCase(Trim(_auxDialog.TbID.Text)) + selItem.SubItems(AuxViewColumns.AuxType).Text = _auxDialog.CbType.Text + + If Cfg.DeclMode Then + If _auxDialog.TbID.Text = AuxiliaryTypeHelper.GetAuxKey(AuxiliaryType.SteeringPump) Then + Dim techlist As List(Of String) = New List(Of String) + techlist.Add(_auxDialog.CbTech.Text) + If _auxDialog.CbTech2.Text <> VehicleAuxiliariesDialog.AxleNotSteered Then techlist.Add(_auxDialog.CbTech2.Text) + If _auxDialog.CbTech3.Text <> VehicleAuxiliariesDialog.AxleNotSteered Then techlist.Add(_auxDialog.CbTech3.Text) + If _auxDialog.CbTech4.Text <> VehicleAuxiliariesDialog.AxleNotSteered Then techlist.Add(_auxDialog.CbTech4.Text) + selItem.SubItems(AuxViewColumns.AuxInputOrTech).Text = String.Join("; ", techlist) + Else + selItem.SubItems(AuxViewColumns.AuxInputOrTech).Text = Trim(_auxDialog.CbTech.Text) + End If + + Else + selItem.SubItems(AuxViewColumns.AuxInputOrTech).Text = Trim(_auxDialog.TbPath.Text) + End If + + Change() + End If + End Sub + + Private Sub RemoveAuxItem() + Dim i As Integer + + If LvAux.SelectedItems.Count = 0 Then + If LvAux.Items.Count = 0 Then + Exit Sub + Else + LvAux.Items(LvAux.Items.Count - 1).Selected = True + End If + End If + + i = LvAux.SelectedItems(0).Index + + LvAux.SelectedItems(0).Remove() + + If LvAux.Items.Count > 0 Then + If i < LvAux.Items.Count Then + LvAux.Items(i).Selected = True + Else + LvAux.Items(LvAux.Items.Count - 1).Selected = True + End If + LvAux.Focus() + End If + + Change() + End Sub #End Region - 'OK (Save & Close) - Private Sub ButSave_Click(sender As Object, e As EventArgs) Handles ButOK.Click - If Not Save() Then Exit Sub - Close() - End Sub + 'OK (Save & Close) + Private Sub ButSave_Click(sender As Object, e As EventArgs) Handles ButOK.Click + If Not Save() Then Exit Sub + Close() + End Sub - 'Cancel - Private Sub ButCancel_Click(sender As Object, e As EventArgs) Handles ButCancel.Click - Close() - End Sub + 'Cancel + Private Sub ButCancel_Click(sender As Object, e As EventArgs) Handles ButCancel.Click + Close() + End Sub #Region "Cycle list" - Private Sub LvCycles_KeyDown(sender As Object, e As KeyEventArgs) Handles LvCycles.KeyDown - Select Case e.KeyCode - Case Keys.Delete, Keys.Back - RemoveCycle() - Case Keys.Enter - If LvCycles.SelectedItems.Count > 0 Then LvCycles.SelectedItems(0).BeginEdit() - End Select - End Sub - - Private Sub BtDRIadd_Click(sender As Object, e As EventArgs) Handles BtDRIadd.Click - Dim genDir As String = GetPath(VectoFile) - - If DrivingCycleFileBrowser.OpenDialog("", True) Then - Dim s As String - For Each s In DrivingCycleFileBrowser.Files - LvCycles.Items.Add(GetFilenameWithoutDirectory(s, genDir)) - Next - Change() - End If - End Sub - - Private Sub BtDRIrem_Click(sender As Object, e As EventArgs) Handles BtDRIrem.Click - RemoveCycle() - End Sub - - Private Sub RemoveCycle() - Dim i As Integer - - If LvCycles.SelectedItems.Count = 0 Then - If LvCycles.Items.Count = 0 Then - Exit Sub - Else - LvCycles.Items(LvCycles.Items.Count - 1).Selected = True - End If - End If - - i = LvCycles.SelectedItems(0).Index - - LvCycles.SelectedItems(0).Remove() - - If LvCycles.Items.Count > 0 Then - If i < LvCycles.Items.Count Then - LvCycles.Items(i).Selected = True - Else - LvCycles.Items(LvCycles.Items.Count - 1).Selected = True - End If - - LvCycles.Focus() - End If - - Change() - End Sub + Private Sub LvCycles_KeyDown(sender As Object, e As KeyEventArgs) Handles LvCycles.KeyDown + Select Case e.KeyCode + Case Keys.Delete, Keys.Back + RemoveCycle() + Case Keys.Enter + If LvCycles.SelectedItems.Count > 0 Then LvCycles.SelectedItems(0).BeginEdit() + End Select + End Sub + + Private Sub BtDRIadd_Click(sender As Object, e As EventArgs) Handles BtDRIadd.Click + Dim genDir As String = GetPath(VectoFile) + + If DrivingCycleFileBrowser.OpenDialog("", True) Then + Dim s As String + For Each s In DrivingCycleFileBrowser.Files + LvCycles.Items.Add(GetFilenameWithoutDirectory(s, genDir)) + Next + Change() + End If + End Sub + + Private Sub BtDRIrem_Click(sender As Object, e As EventArgs) Handles BtDRIrem.Click + RemoveCycle() + End Sub + + Private Sub RemoveCycle() + Dim i As Integer + + If LvCycles.SelectedItems.Count = 0 Then + If LvCycles.Items.Count = 0 Then + Exit Sub + Else + LvCycles.Items(LvCycles.Items.Count - 1).Selected = True + End If + End If + + i = LvCycles.SelectedItems(0).Index + + LvCycles.SelectedItems(0).Remove() + + If LvCycles.Items.Count > 0 Then + If i < LvCycles.Items.Count Then + LvCycles.Items(i).Selected = True + Else + LvCycles.Items(LvCycles.Items.Count - 1).Selected = True + End If + + LvCycles.Focus() + End If + + Change() + End Sub #End Region #Region "Enable/Disable GUI controls" - 'Engine only mode changed - Private Sub CbEngOnly_CheckedChanged(sender As Object, e As EventArgs) Handles CbEngOnly.CheckedChanged - CheckEngOnly() - Change() - End Sub + 'Engine only mode changed + Private Sub CbEngOnly_CheckedChanged(sender As Object, e As EventArgs) Handles CbEngOnly.CheckedChanged + CheckEngOnly() + Change() + End Sub - Private Sub CheckEngOnly() - Dim onOff As Boolean + Private Sub CheckEngOnly() + Dim onOff As Boolean - onOff = Not CbEngOnly.Checked + onOff = Not CbEngOnly.Checked - SetDrivertab(onOff) + SetDrivertab(onOff) - ButOpenVEH.Enabled = onOff - TbVEH.Enabled = onOff - ButtonVEH.Enabled = onOff - ButOpenGBX.Enabled = onOff - TbGBX.Enabled = onOff - ButtonGBX.Enabled = onOff - GrAux.Enabled = onOff - End Sub + ButOpenVEH.Enabled = onOff + TbVEH.Enabled = onOff + ButtonVEH.Enabled = onOff + ButOpenGBX.Enabled = onOff + TbGBX.Enabled = onOff + ButtonGBX.Enabled = onOff + GrAux.Enabled = onOff + End Sub - 'LAC changed - Private Sub CbLookAhead_CheckedChanged(sender As Object, e As EventArgs) _ - Handles CbLookAhead.CheckedChanged - Change() - pnLookAheadCoasting.Enabled = CbLookAhead.Checked - End Sub + 'LAC changed + Private Sub CbLookAhead_CheckedChanged(sender As Object, e As EventArgs) _ + Handles CbLookAhead.CheckedChanged + Change() + pnLookAheadCoasting.Enabled = CbLookAhead.Checked + End Sub - 'EcoRoll / Overspeed changed - Private Sub RdOff_CheckedChanged(sender As Object, e As EventArgs) _ - Handles RdOff.CheckedChanged, RdOverspeed.CheckedChanged - Dim ecoRoll As Boolean - Dim overspeed As Boolean + 'EcoRoll / Overspeed changed + Private Sub RdOff_CheckedChanged(sender As Object, e As EventArgs) _ + Handles RdOff.CheckedChanged, RdOverspeed.CheckedChanged + Dim ecoRoll As Boolean + Dim overspeed As Boolean - Change() + Change() - ecoRoll = False 'RdEcoRoll.Checked - overspeed = RdOverspeed.Checked + ecoRoll = False 'RdEcoRoll.Checked + overspeed = RdOverspeed.Checked - TbOverspeed.Enabled = overspeed Or ecoRoll - Label13.Enabled = overspeed Or ecoRoll - Label14.Enabled = overspeed Or ecoRoll + TbOverspeed.Enabled = overspeed Or ecoRoll + Label13.Enabled = overspeed Or ecoRoll + Label14.Enabled = overspeed Or ecoRoll - TbUnderSpeed.Enabled = ecoRoll - Label22.Enabled = ecoRoll - Label20.Enabled = ecoRoll + TbUnderSpeed.Enabled = ecoRoll + Label22.Enabled = ecoRoll + Label20.Enabled = ecoRoll - TbVmin.Enabled = overspeed Or ecoRoll - Label23.Enabled = overspeed Or ecoRoll - Label21.Enabled = overspeed Or ecoRoll - End Sub + TbVmin.Enabled = overspeed Or ecoRoll + Label23.Enabled = overspeed Or ecoRoll + Label21.Enabled = overspeed Or ecoRoll + End Sub #End Region - Public Sub UpdatePic() - - - TbHVCclass.Text = "" - TbVehCat.Text = "" - TbMass.Text = "" - TbAxleConf.Text = "" - TbEngTxt.Text = "" - TbGbxTxt.Text = "" - PicVehicle.Image = Nothing - PicBox.Image = Nothing - - Try - UpdateVehiclePic() - - Dim chart As Chart = Nothing - UpdateEnginePic(chart) - - - UpdateGearboxPic(chart) - - If chart Is Nothing Then Return - - Dim chartArea As ChartArea = New ChartArea() - chartArea.Name = "main" - - chartArea.AxisX.Title = "engine speed [1/min]" - chartArea.AxisX.TitleFont = New Font("Helvetica", 10) - chartArea.AxisX.LabelStyle.Font = New Font("Helvetica", 8) - chartArea.AxisX.LabelAutoFitStyle = LabelAutoFitStyles.None - chartArea.AxisX.MajorGrid.LineDashStyle = ChartDashStyle.Dot - - chartArea.AxisY.Title = "engine torque [Nm]" - chartArea.AxisY.TitleFont = New Font("Helvetica", 10) - chartArea.AxisY.LabelStyle.Font = New Font("Helvetica", 8) - chartArea.AxisY.LabelAutoFitStyle = LabelAutoFitStyles.None - chartArea.AxisY.MajorGrid.LineDashStyle = ChartDashStyle.Dot - - chartArea.AxisX.Minimum = 300 - chartArea.BorderDashStyle = ChartDashStyle.Solid - chartArea.BorderWidth = 1 - - chartArea.BackColor = Color.GhostWhite - - chart.ChartAreas.Add(chartArea) - chart.Update() - - Dim img As Bitmap = New Bitmap(chart.Width, chart.Height, PixelFormat.Format32bppArgb) - chart.DrawToBitmap(img, New Rectangle(0, 0, PicBox.Width, PicBox.Height)) - - PicBox.Image = img - Catch - End Try - End Sub - - Private Sub UpdateGearboxPic(ByRef chartArea As Chart) - Dim s As Series - Dim i As Integer - - Dim gearbox As IGearboxEngineeringInputData = Nothing - Dim gearboxFile As String = - 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), - IEngineeringInputDataProvider) - gearbox = inputData.JobInputData.Vehicle.GearboxInputData - Catch - End Try - End If - - If gearbox Is Nothing Then Return - - TbGbxTxt.Text = String.Format("{0}-Speed {1} {2}", gearbox.Gears.Count, gearbox.Type.ShortName(), gearbox.Model) - - If Cfg.DeclMode Then - For i = 1 To gearbox.Gears.Count - 'If FLD0.Init(ENG0.Nidle) Then '' use engine from below... - - 'Dim engine As CombustionEngineData = ConvertToEngineData(FLD0, F_VECTO.n_idle) - 'Dim shiftLines As ShiftPolygon = DeclarationData.Gearbox.ComputeShiftPolygon(Gear - 1, - ' engine.FullLoadCurve, gears, - ' engine, - ' Double.Parse(LvGears.Items(0).SubItems(F_GBX.GearboxTbl.Ratio).Text, - ' CultureInfo.InvariantCulture), - ' (.rdyn / 1000.0).SI(Of Meter)) - - 's = New Series - 's.Points.DataBindXY(shiftLines.Upshift.Select(Function(pt) pt.AngularSpeed.Value() / Constants.RPMToRad).ToList(), - ' shiftLines.Upshift.Select(Function(pt) pt.Torque.Value()).ToList()) - 's.ChartType = SeriesChartType.FastLine - 's.BorderWidth = 2 - 's.Color = Color.DarkRed - 's.Name = "Upshift curve (" & i & ")" - 'MyChart.Series.Add(s) - - 's = New Series - 's.Points.DataBindXY( - ' shiftLines.Downshift.Select(Function(pt) pt.AngularSpeed.Value() / Constants.RPMToRad).ToList(), - ' shiftLines.Downshift.Select(Function(pt) pt.Torque.Value()).ToList()) - 's.ChartType = SeriesChartType.FastLine - 's.BorderWidth = 2 - 's.Color = Color.DarkRed - 's.Name = "Downshift curve (" & i & ")" - 'MyChart.Series.Add(s) - 'End If - - ' OkCount += 1 - - ' pmax = FLD0.Pfull(FLD0.EngineRatedSpeed) - - 'End If - Next - Else - For Each gear As ITransmissionInputData In gearbox.Gears - If gear.ShiftPolygon Is Nothing OrElse gear.ShiftPolygon.Rows.Count = 0 Then Continue For - Dim shiftPolygon As ShiftPolygon = ShiftPolygonReader.Create(gear.ShiftPolygon) - s = New Series - s.Points.DataBindXY(shiftPolygon.Upshift.Select(Function(x) x.AngularSpeed.AsRPM).ToArray(), - shiftPolygon.Upshift.Select(Function(x) x.Torque.Value()).ToArray()) - s.ChartType = SeriesChartType.FastLine - s.BorderWidth = 2 - s.Color = Color.DarkRed - s.Name = "Upshift curve" - ' MyChart.Series.Add(s) 'MQ 2016-06-20: do not plot shift lines in engine dialog - - s = New Series - s.Points.DataBindXY(shiftPolygon.Downshift.Select(Function(x) x.AngularSpeed.AsRPM).ToArray(), - shiftPolygon.Downshift.Select(Function(x) x.Torque.Value()).ToArray()) - s.ChartType = SeriesChartType.FastLine - s.BorderWidth = 2 - s.Color = Color.DarkRed - s.Name = "Downshift curve" - 'MyChart.Series.Add(s) 'MQ 2016-06-20:do not plot shift lines in engine dialog - Next - End If - End Sub - - Private Sub UpdateEnginePic(ByRef chart As Chart) - Dim s As Series - 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 - Try - Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(engineFile), - IEngineeringInputDataProvider) - engine = inputData.JobInputData.Vehicle.EngineInputData - Catch - Return - End Try - End If - - 'engine.FilePath = fFileRepl(TbENG.Text, GetPath(VECTOfile)) - - 'Create plot - chart = New Chart - chart.Width = PicBox.Width - chart.Height = PicBox.Height - - - 'Dim FLD0 As EngineFullLoadCurve = New EngineFullLoadCurve - - If engine Is Nothing Then Return - - - engine.IdleSpeed.Value() - - Dim fullLoadCurve As EngineFullLoadCurve = FullLoadCurveReader.Create(engine.FullLoadCurve) - - s = New Series - s.Points.DataBindXY(fullLoadCurve.FullLoadEntries.Select(Function(x) x.EngineSpeed.AsRPM).ToArray(), - fullLoadCurve.FullLoadEntries.Select(Function(x) x.TorqueFullLoad.Value()).ToArray()) - s.ChartType = SeriesChartType.FastLine - s.BorderWidth = 2 - s.Color = Color.DarkBlue - s.Name = "Full load" - chart.Series.Add(s) - - s = New Series - s.Points.DataBindXY(fullLoadCurve.FullLoadEntries.Select(Function(x) x.EngineSpeed.AsRPM).ToArray(), - fullLoadCurve.FullLoadEntries.Select(Function(x) x.TorqueDrag.Value()).ToArray()) - s.ChartType = SeriesChartType.FastLine - s.BorderWidth = 2 - s.Color = Color.Blue - s.Name = "Motoring" - chart.Series.Add(s) - - 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"), - pmax.ToString("#"), engine.Model) - - Dim fuelConsumptionMap As FuelConsumptionMap = FuelConsumptionMapReader.Create(engine.FuelConsumptionMap) - - s = New Series - s.Points.DataBindXY(fuelConsumptionMap.Entries.Select(Function(x) x.EngineSpeed.AsRPM).ToArray(), - fuelConsumptionMap.Entries.Select(Function(x) x.Torque.Value()).ToArray()) - s.ChartType = SeriesChartType.Point - s.MarkerSize = 3 - 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() - Dim HDVclass As String - - Dim vehicle As IVehicleEngineeringInputData = Nothing - - Dim vehicleFile As String = - 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), - IEngineeringInputDataProvider) - vehicle = inputData.JobInputData.Vehicle - Catch - End Try - End If - - If vehicle Is Nothing Then Return - - Dim maxMass As Kilogram = vehicle.GrossVehicleMassRating 'CSng(fTextboxToNumString(TbMassMass.Text)) - - Dim s0 As Segment = Nothing - Try - s0 = DeclarationData.Segments.Lookup(vehicle.VehicleCategory, vehicle.AxleConfiguration, maxMass, 0.SI(Of Kilogram), - True) - Catch - End Try - If Not s0.Found Then - HDVclass = "-" - Else - HDVclass = s0.VehicleClass.GetClassNumber() - - If Cfg.DeclMode Then - LvCycles.Items.Clear() - Dim m0 As Mission - For Each m0 In s0.Missions - LvCycles.Items.Add(m0.MissionType.ToString()) - Next - End If + Public Sub UpdatePic() + + + TbHVCclass.Text = "" + TbVehCat.Text = "" + TbMass.Text = "" + TbAxleConf.Text = "" + TbEngTxt.Text = "" + TbGbxTxt.Text = "" + PicVehicle.Image = Nothing + PicBox.Image = Nothing + + Try + UpdateVehiclePic() + + Dim chart As Chart = Nothing + UpdateEnginePic(chart) + + + UpdateGearboxPic(chart) + + If chart Is Nothing Then Return + + Dim chartArea As ChartArea = New ChartArea() + chartArea.Name = "main" + + chartArea.AxisX.Title = "engine speed [1/min]" + chartArea.AxisX.TitleFont = New Font("Helvetica", 10) + chartArea.AxisX.LabelStyle.Font = New Font("Helvetica", 8) + chartArea.AxisX.LabelAutoFitStyle = LabelAutoFitStyles.None + chartArea.AxisX.MajorGrid.LineDashStyle = ChartDashStyle.Dot + + chartArea.AxisY.Title = "engine torque [Nm]" + chartArea.AxisY.TitleFont = New Font("Helvetica", 10) + chartArea.AxisY.LabelStyle.Font = New Font("Helvetica", 8) + chartArea.AxisY.LabelAutoFitStyle = LabelAutoFitStyles.None + chartArea.AxisY.MajorGrid.LineDashStyle = ChartDashStyle.Dot + + chartArea.AxisX.Minimum = 300 + chartArea.BorderDashStyle = ChartDashStyle.Solid + chartArea.BorderWidth = 1 + + chartArea.BackColor = Color.GhostWhite + + chart.ChartAreas.Add(chartArea) + chart.Update() + + Dim img As Bitmap = New Bitmap(chart.Width, chart.Height, PixelFormat.Format32bppArgb) + chart.DrawToBitmap(img, New Rectangle(0, 0, PicBox.Width, PicBox.Height)) + + PicBox.Image = img + Catch + End Try + End Sub + + Private Sub UpdateGearboxPic(ByRef chartArea As Chart) + Dim s As Series + Dim i As Integer + + Dim gearbox As IGearboxEngineeringInputData = Nothing + Dim gearboxFile As String = + 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), + IEngineeringInputDataProvider) + gearbox = inputData.JobInputData.Vehicle.GearboxInputData + Catch + End Try + End If + + If gearbox Is Nothing Then Return + + TbGbxTxt.Text = String.Format("{0}-Speed {1} {2}", gearbox.Gears.Count, gearbox.Type.ShortName(), gearbox.Model) + + If Cfg.DeclMode Then + For i = 1 To gearbox.Gears.Count + 'If FLD0.Init(ENG0.Nidle) Then '' use engine from below... + + 'Dim engine As CombustionEngineData = ConvertToEngineData(FLD0, F_VECTO.n_idle) + 'Dim shiftLines As ShiftPolygon = DeclarationData.Gearbox.ComputeShiftPolygon(Gear - 1, + ' engine.FullLoadCurve, gears, + ' engine, + ' Double.Parse(LvGears.Items(0).SubItems(F_GBX.GearboxTbl.Ratio).Text, + ' CultureInfo.InvariantCulture), + ' (.rdyn / 1000.0).SI(Of Meter)) + + 's = New Series + 's.Points.DataBindXY(shiftLines.Upshift.Select(Function(pt) pt.AngularSpeed.Value() / Constants.RPMToRad).ToList(), + ' shiftLines.Upshift.Select(Function(pt) pt.Torque.Value()).ToList()) + 's.ChartType = SeriesChartType.FastLine + 's.BorderWidth = 2 + 's.Color = Color.DarkRed + 's.Name = "Upshift curve (" & i & ")" + 'MyChart.Series.Add(s) + + 's = New Series + 's.Points.DataBindXY( + ' shiftLines.Downshift.Select(Function(pt) pt.AngularSpeed.Value() / Constants.RPMToRad).ToList(), + ' shiftLines.Downshift.Select(Function(pt) pt.Torque.Value()).ToList()) + 's.ChartType = SeriesChartType.FastLine + 's.BorderWidth = 2 + 's.Color = Color.DarkRed + 's.Name = "Downshift curve (" & i & ")" + 'MyChart.Series.Add(s) + 'End If + + ' OkCount += 1 + + ' pmax = FLD0.Pfull(FLD0.EngineRatedSpeed) + + 'End If + Next + Else + For Each gear As ITransmissionInputData In gearbox.Gears + If gear.ShiftPolygon Is Nothing OrElse gear.ShiftPolygon.Rows.Count = 0 Then Continue For + Dim shiftPolygon As ShiftPolygon = ShiftPolygonReader.Create(gear.ShiftPolygon) + s = New Series + s.Points.DataBindXY(shiftPolygon.Upshift.Select(Function(x) x.AngularSpeed.AsRPM).ToArray(), + shiftPolygon.Upshift.Select(Function(x) x.Torque.Value()).ToArray()) + s.ChartType = SeriesChartType.FastLine + s.BorderWidth = 2 + s.Color = Color.DarkRed + s.Name = "Upshift curve" + ' MyChart.Series.Add(s) 'MQ 2016-06-20: do not plot shift lines in engine dialog + + s = New Series + s.Points.DataBindXY(shiftPolygon.Downshift.Select(Function(x) x.AngularSpeed.AsRPM).ToArray(), + shiftPolygon.Downshift.Select(Function(x) x.Torque.Value()).ToArray()) + s.ChartType = SeriesChartType.FastLine + s.BorderWidth = 2 + s.Color = Color.DarkRed + s.Name = "Downshift curve" + 'MyChart.Series.Add(s) 'MQ 2016-06-20:do not plot shift lines in engine dialog + Next + End If + End Sub + + Private Sub UpdateEnginePic(ByRef chart As Chart) + Dim s As Series + 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 + Try + Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(engineFile), + IEngineeringInputDataProvider) + engine = inputData.JobInputData.Vehicle.EngineInputData + Catch + Return + End Try + End If + + 'engine.FilePath = fFileRepl(TbENG.Text, GetPath(VECTOfile)) + + 'Create plot + chart = New Chart + chart.Width = PicBox.Width + chart.Height = PicBox.Height + + + 'Dim FLD0 As EngineFullLoadCurve = New EngineFullLoadCurve + + If engine Is Nothing Then Return + + + engine.IdleSpeed.Value() + + Dim fullLoadCurve As EngineFullLoadCurve = FullLoadCurveReader.Create(engine.FullLoadCurve) + + s = New Series + s.Points.DataBindXY(fullLoadCurve.FullLoadEntries.Select(Function(x) x.EngineSpeed.AsRPM).ToArray(), + fullLoadCurve.FullLoadEntries.Select(Function(x) x.TorqueFullLoad.Value()).ToArray()) + s.ChartType = SeriesChartType.FastLine + s.BorderWidth = 2 + s.Color = Color.DarkBlue + s.Name = "Full load" + chart.Series.Add(s) + + s = New Series + s.Points.DataBindXY(fullLoadCurve.FullLoadEntries.Select(Function(x) x.EngineSpeed.AsRPM).ToArray(), + fullLoadCurve.FullLoadEntries.Select(Function(x) x.TorqueDrag.Value()).ToArray()) + s.ChartType = SeriesChartType.FastLine + s.BorderWidth = 2 + s.Color = Color.Blue + s.Name = "Motoring" + chart.Series.Add(s) + + 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"), + pmax.ToString("#"), engine.Model) + + Dim fuelConsumptionMap As FuelConsumptionMap = FuelConsumptionMapReader.Create(engine.FuelConsumptionMap) + + s = New Series + s.Points.DataBindXY(fuelConsumptionMap.Entries.Select(Function(x) x.EngineSpeed.AsRPM).ToArray(), + fuelConsumptionMap.Entries.Select(Function(x) x.Torque.Value()).ToArray()) + s.ChartType = SeriesChartType.Point + s.MarkerSize = 3 + 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() + Dim HDVclass As String + + Dim vehicle As IVehicleEngineeringInputData = Nothing + + Dim vehicleFile As String = + 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), + IEngineeringInputDataProvider) + vehicle = inputData.JobInputData.Vehicle + Catch + End Try + End If + + If vehicle Is Nothing Then Return + + Dim maxMass As Kilogram = vehicle.GrossVehicleMassRating 'CSng(fTextboxToNumString(TbMassMass.Text)) + + Dim s0 As Segment = Nothing + Try + s0 = DeclarationData.Segments.Lookup(vehicle.VehicleCategory, vehicle.AxleConfiguration, maxMass, 0.SI(Of Kilogram), + True) + Catch + End Try + If Not s0.Found Then + HDVclass = "-" + Else + HDVclass = s0.VehicleClass.GetClassNumber() + + If Cfg.DeclMode Then + LvCycles.Items.Clear() + Dim m0 As Mission + For Each m0 In s0.Missions + LvCycles.Items.Add(m0.MissionType.ToString()) + Next + End If - End If + End If - PicVehicle.Image = ConvPicPath(If(Not s0.Found, -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" - TbAxleConf.Text = vehicle.AxleConfiguration.GetName() 'ConvAxleConf(VEH0.AxleConf) - End Sub + PicVehicle.Image = ConvPicPath(If(Not s0.Found, -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" + TbAxleConf.Text = vehicle.AxleConfiguration.GetName() 'ConvAxleConf(VEH0.AxleConf) + End Sub #Region "Open File Context Menu" - Private _contextMenuFiles As String() - Private _basePath As String = "" - - Private Sub OpenFiles(ParamArray files() As String) - If files.Length = 0 Then Exit Sub - - _contextMenuFiles = files - OpenWithToolStripMenuItem.Text = "Open with " & Cfg.OpenCmdName - CmOpenFile.Show(Windows.Forms.Cursor.Position) - End Sub - - Private Sub OpenWithToolStripMenuItem_Click(sender As Object, e As EventArgs) _ - Handles OpenWithToolStripMenuItem.Click - If Not FileOpenAlt(_contextMenuFiles(0)) Then MsgBox("Failed to open file!") - End Sub - - Private Sub ShowInFolderToolStripMenuItem_Click(sender As Object, e As EventArgs) _ - Handles ShowInFolderToolStripMenuItem.Click - If File.Exists(_contextMenuFiles(0)) Then - Try - Process.Start("explorer", "/select,""" & _contextMenuFiles(0) & "") - Catch ex As Exception - MsgBox("Failed to open file!") - End Try - Else - MsgBox("File not found!") - End If - End Sub + Private _contextMenuFiles As String() + Private _basePath As String = "" + + Private Sub OpenFiles(ParamArray files() As String) + If files.Length = 0 Then Exit Sub + + _contextMenuFiles = files + OpenWithToolStripMenuItem.Text = "Open with " & Cfg.OpenCmdName + CmOpenFile.Show(Windows.Forms.Cursor.Position) + End Sub + + Private Sub OpenWithToolStripMenuItem_Click(sender As Object, e As EventArgs) _ + Handles OpenWithToolStripMenuItem.Click + If Not FileOpenAlt(_contextMenuFiles(0)) Then MsgBox("Failed to open file!") + End Sub + + Private Sub ShowInFolderToolStripMenuItem_Click(sender As Object, e As EventArgs) _ + Handles ShowInFolderToolStripMenuItem.Click + If File.Exists(_contextMenuFiles(0)) Then + Try + Process.Start("explorer", "/select,""" & _contextMenuFiles(0) & "") + Catch ex As Exception + MsgBox("Failed to open file!") + End Try + Else + MsgBox("File not found!") + End If + End Sub #End Region - 'AA-TB - Private Sub picAuxInfo_MouseEnter(sender As Object, e As EventArgs) Handles picAuxInfo.MouseEnter + 'AA-TB + 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 - 'Get tooltip - Dim item As AdvancedAuxiliary + item = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary) - item = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary) + If item.AuxiliaryVersion = "CLASSIC" Then - If item.AuxiliaryVersion = "CLASSIC" Then + ToolTip1.ToolTipTitle = "Classic Vecto Auxiliaries" + ToolTip1.SetToolTip(picAuxInfo, "Uses original basic auxiliaries calculation") - ToolTip1.ToolTipTitle = "Classic Vecto Auxiliaries" - ToolTip1.SetToolTip(picAuxInfo, "Uses original basic auxiliaries calculation") + Else - Else + ToolTip1.ToolTipTitle = "Advanced Auxiliary Information" + ToolTip1.SetToolTip(picAuxInfo, item.AuxiliaryName & " : Version=" & item.AuxiliaryVersion) - ToolTip1.ToolTipTitle = "Advanced Auxiliary Information" - ToolTip1.SetToolTip(picAuxInfo, item.AuxiliaryName & " : Version=" & item.AuxiliaryVersion) + End If + End Sub - End If - End Sub + 'AA-TB + Private Sub btnBrowseAAUXFile_Click(sender As Object, e As EventArgs) Handles btnBrowseAAUXFile.Click - 'AA-TB - Private Sub btnBrowseAAUXFile_Click(sender As Object, e As EventArgs) Handles btnBrowseAAUXFile.Click + If String.IsNullOrEmpty(VectoFile) Then + MessageBox.Show( + "Please complete and save a valid new .vecto file before adding/configuring advanced bus auxiliaries.") + Return + End If - If String.IsNullOrEmpty(VectoFile) Then - MessageBox.Show( - "Please complete and save a valid new .vecto file before adding/configuring advanced bus auxiliaries.") - Return - End If + Dim aauxFileValidated As Boolean = False + Dim fbAux As New FileBrowser("aaux", False, False) + Dim message As String = String.Empty + Dim absoluteAuxPath As String + Dim assembly As AdvancedAuxiliary - Dim aauxFileValidated As Boolean = False - Dim fbAux As New FileBrowser("aaux", False, False) - Dim message As String = String.Empty - Dim absoluteAuxPath As String - Dim assembly As AdvancedAuxiliary + 'If Classic is selected, then bail + If cboAdvancedAuxiliaries.SelectedIndex = 0 Then Return - 'If Classic is selected, then bail - If cboAdvancedAuxiliaries.SelectedIndex = 0 Then Return + 'Get Absolute Path for AAUX FILE. + absoluteAuxPath = ResolveAAUXFilePath(GetPath(VectoFile), txtAdvancedAuxiliaryFile.Text) - 'Get Absolute Path for AAUX FILE. - absoluteAuxPath = ResolveAAUXFilePath(GetPath(VectoFile), txtAdvancedAuxiliaryFile.Text) + 'Set Extensions + fbAux.Extensions = New String() {"AAUX"} - 'Set Extensions - fbAux.Extensions = New String() {"AAUX"} + Try - Try + assembly = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary) - assembly = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary) + Dim validAAUXFile As Boolean = ValidateAAUXFile(absoluteAuxPath, assembly.AssemblyName, + assembly.AuxiliaryVersion, message) + Dim fileExists As Boolean = File.Exists(absoluteAuxPath) - Dim validAAUXFile As Boolean = ValidateAAUXFile(absoluteAuxPath, assembly.AssemblyName, - assembly.AuxiliaryVersion, message) - Dim fileExists As Boolean = File.Exists(absoluteAuxPath) + If fileExists AndAlso validAAUXFile Then + ConfigureAdvancedAuxiliaries(assembly.AssemblyName, assembly.AuxiliaryVersion, + txtAdvancedAuxiliaryFile.Text, VectoFile) + Else - If fileExists AndAlso validAAUXFile Then - ConfigureAdvancedAuxiliaries(assembly.AssemblyName, assembly.AuxiliaryVersion, - txtAdvancedAuxiliaryFile.Text, VectoFile) - Else + Dim needToFindOrCreateFile As Boolean = True - Dim needToFindOrCreateFile As Boolean = True + While needToFindOrCreateFile - While needToFindOrCreateFile + 'Find / Create file and configure. + If fbAux.CustomDialog(absoluteAuxPath, False, False, FileBrowserFileExtensionMode.ForceExt, False, String.Empty) _ + Then + txtAdvancedAuxiliaryFile.Text = GetFilenameWithoutDirectory(fbAux.Files(0), GetPath(VectoFile)) + assembly = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary) - 'Find / Create file and configure. - If fbAux.CustomDialog(absoluteAuxPath, False, False, FileBrowserFileExtensionMode.ForceExt, False, String.Empty) _ - Then - txtAdvancedAuxiliaryFile.Text = GetFilenameWithoutDirectory(fbAux.Files(0), GetPath(VectoFile)) - assembly = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary) + If _ + File.Exists(ResolveAAUXFilePath(GetPath(VectoFile), txtAdvancedAuxiliaryFile.Text)) OrElse + MsgBox("Do you want to create a new .AAUX file?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then + needToFindOrCreateFile = False + ConfigureAdvancedAuxiliaries(assembly.AssemblyName, assembly.AuxiliaryVersion, + txtAdvancedAuxiliaryFile.Text, VectoFile) + End If + Else + needToFindOrCreateFile = False + End If - If _ - File.Exists(ResolveAAUXFilePath(GetPath(VectoFile), txtAdvancedAuxiliaryFile.Text)) OrElse - MsgBox("Do you want to create a new .AAUX file?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then - needToFindOrCreateFile = False - ConfigureAdvancedAuxiliaries(assembly.AssemblyName, assembly.AuxiliaryVersion, - txtAdvancedAuxiliaryFile.Text, VectoFile) - End If - Else - needToFindOrCreateFile = False - End If + End While - End While + End If - End If + Catch ex As Exception + MessageBox.Show("There was an error configuring your Advanced Auxiliary File") + End Try + End Sub - Catch ex As Exception - MessageBox.Show("There was an error configuring your Advanced Auxiliary File") - End Try - End Sub + 'AA-TB + Private Sub cboAdvancedAuxiliaries_SelectedIndexChanged(sender As Object, e As EventArgs) _ + Handles cboAdvancedAuxiliaries.SelectedIndexChanged - 'AA-TB - Private Sub cboAdvancedAuxiliaries_SelectedIndexChanged(sender As Object, e As EventArgs) _ - Handles cboAdvancedAuxiliaries.SelectedIndexChanged + 'Enable or otherwise the text box and browser button associated with Advanced Axuiliaries + If cboAdvancedAuxiliaries.SelectedIndex = 0 Then - 'Enable or otherwise the text box and browser button associated with Advanced Axuiliaries - If cboAdvancedAuxiliaries.SelectedIndex = 0 Then + btnBrowseAAUXFile.Enabled = False + txtAdvancedAuxiliaryFile.Enabled = False - btnBrowseAAUXFile.Enabled = False - txtAdvancedAuxiliaryFile.Enabled = False + Else - Else + btnBrowseAAUXFile.Enabled = True + txtAdvancedAuxiliaryFile.Enabled = True - btnBrowseAAUXFile.Enabled = True - txtAdvancedAuxiliaryFile.Enabled = True + End If + End Sub - End If - End Sub + 'AA-TB + Private Sub btnAAUXOpen_Click(sender As Object, e As EventArgs) Handles btnAAUXOpen.Click - 'AA-TB - Private Sub btnAAUXOpen_Click(sender As Object, e As EventArgs) Handles btnAAUXOpen.Click + OpenFiles(FileRepl(txtAdvancedAuxiliaryFile.Text, GetPath(VectoFile))) + End Sub - OpenFiles(FileRepl(txtAdvancedAuxiliaryFile.Text, GetPath(VectoFile))) - End Sub + Private Sub btnDfTargetSpeed_Click(sender As Object, e As EventArgs) Handles btnDfTargetSpeed.Click + If DriverDecisionFactorTargetSpeedFileBrowser.OpenDialog(FileRepl(tbLacDfTargetSpeedFile.Text, GetPath(VectoFile))) _ + Then _ + tbLacDfTargetSpeedFile.Text = GetFilenameWithoutDirectory(DriverDecisionFactorTargetSpeedFileBrowser.Files(0), + GetPath(VectoFile)) + End Sub - Private Sub btnDfTargetSpeed_Click(sender As Object, e As EventArgs) Handles btnDfTargetSpeed.Click - If DriverDecisionFactorTargetSpeedFileBrowser.OpenDialog(FileRepl(tbLacDfTargetSpeedFile.Text, GetPath(VectoFile))) _ - Then _ - tbLacDfTargetSpeedFile.Text = GetFilenameWithoutDirectory(DriverDecisionFactorTargetSpeedFileBrowser.Files(0), - GetPath(VectoFile)) - End Sub + Private Sub btnDfVelocityDrop_Click_1(sender As Object, e As EventArgs) Handles btnDfVelocityDrop.Click + If DriverDecisionFactorVelocityDropFileBrowser.OpenDialog(FileRepl(tbLacDfVelocityDropFile.Text, GetPath(VectoFile))) _ + Then _ + tbLacDfVelocityDropFile.Text = GetFilenameWithoutDirectory(DriverDecisionFactorVelocityDropFileBrowser.Files(0), + GetPath(VectoFile)) + End Sub - Private Sub btnDfVelocityDrop_Click_1(sender As Object, e As EventArgs) Handles btnDfVelocityDrop.Click - If DriverDecisionFactorVelocityDropFileBrowser.OpenDialog(FileRepl(tbLacDfVelocityDropFile.Text, GetPath(VectoFile))) _ - Then _ - tbLacDfVelocityDropFile.Text = GetFilenameWithoutDirectory(DriverDecisionFactorVelocityDropFileBrowser.Files(0), - GetPath(VectoFile)) - End Sub + Private Sub LvCycles_MouseClick(sender As Object, e As MouseEventArgs) Handles LvCycles.MouseClick + If e.Button = MouseButtons.Right AndAlso LvCycles.SelectedItems.Count > 0 Then + OpenFiles(FileRepl(LvCycles.SelectedItems(0).SubItems(0).Text, GetPath(VectoFile))) + End If + End Sub - Private Sub LvCycles_MouseClick(sender As Object, e As MouseEventArgs) Handles LvCycles.MouseClick - If e.Button = MouseButtons.Right AndAlso LvCycles.SelectedItems.Count > 0 Then - OpenFiles(FileRepl(LvCycles.SelectedItems(0).SubItems(0).Text, GetPath(VectoFile))) - End If - End Sub + Private Sub LvAux_SelectedIndexChanged(sender As Object, e As EventArgs) Handles LvAux.SelectedIndexChanged + End Sub - Private Sub LvAux_SelectedIndexChanged(sender As Object, e As EventArgs) Handles LvAux.SelectedIndexChanged - End Sub + Private Sub BtnShiftStrategyParams_Click(sender As Object, e As EventArgs) Handles BtnShiftStrategyParams.Click + If TCUFileBrowser.OpenDialog(FileRepl(TbShiftStrategyParams.Text, GetPath(VectoFile))) Then + TbShiftStrategyParams.Text = GetFilenameWithoutDirectory(TCUFileBrowser.Files(0), GetPath(VectoFile)) + End If + End Sub End Class diff --git a/VECTO/Input Files/VectoJob.vb b/VECTO/Input Files/VectoJob.vb index db329070571a497c56a3f2453474721b1c6f3105..cae2cc5f78baf171cde89e73a894fa399a504c97 100644 --- a/VECTO/Input Files/VectoJob.vb +++ b/VECTO/Input Files/VectoJob.vb @@ -48,6 +48,7 @@ Public Class VectoJob Private ReadOnly _vehicleFile As SubPath Private ReadOnly _engineFile As SubPath Private ReadOnly _gearboxFile As SubPath + Private ReadOnly _tcuFile As SubPath Private _startStop As Boolean Public StartStopDelay As Double @@ -97,6 +98,7 @@ Public Class VectoJob _vehicleFile = New SubPath _engineFile = New SubPath _gearboxFile = New SubPath + _tcuFile = new SubPath _driverAccelerationFile = New SubPath @@ -188,6 +190,19 @@ Public Class VectoJob End Set End Property + Public Property PathShiftParams(Optional ByVal original As Boolean = False) As String + Get + If original Then + Return _tcuFile.OriginalPath + Else + Return _tcuFile.FullPath + End If + End Get + Set(value As String) + _tcuFile.Init(_myPath, value) + End Set + End Property + Public ReadOnly Property IDriverDeclarationInputData_SavedInDeclarationMode As Boolean _ Implements IDriverDeclarationInputData.SavedInDeclarationMode @@ -422,7 +437,8 @@ Public Class VectoJob Public ReadOnly Property GearshiftInputData As IGearshiftEngineeringInputData Implements IEngineeringInputDataProvider.GearshiftInputData get - Return Nothing + if not file.Exists(_tcuFile.FullPath) Then Return Nothing + Return new JSONComponentInputData(_tcuFile.FullPath, me).GearshiftInputData End Get End Property diff --git a/VECTO/OutputData/JSONFileWriter.vb b/VECTO/OutputData/JSONFileWriter.vb index e1060c9e3fa01798f8893ad826b123011556127a..79bae31d2c3fd81ae12d65b0d3659430506e88d8 100644 --- a/VECTO/OutputData/JSONFileWriter.vb +++ b/VECTO/OutputData/JSONFileWriter.vb @@ -11,413 +11,415 @@ Imports TUGraz.VectoCore.Models.Declaration Imports TUGraz.VectoCommon.Utils Public Class JSONFileWriter - Implements IOutputFileWriter - Public Const EngineFormatVersion As Integer = 4 + Implements IOutputFileWriter + Public Const EngineFormatVersion As Integer = 4 - Public Const GearboxFormatVersion As Integer = 6 - - Public Const VehicleFormatVersion As Integer = 7 - - Private Const VectoJobFormatVersion As Integer = 4 - - Private Shared _instance As JSONFileWriter - - Public Shared ReadOnly Property Instance As JSONFileWriter - Get - If _instance Is Nothing Then _instance = New JSONFileWriter() - Return _instance - End Get - End Property - - Public Sub SaveEngine(eng As IEngineEngineeringInputData, filename As String) _ - Implements IOutputFileWriter.SaveEngine - - 'Header - Dim header As Dictionary(Of String, Object) = GetHeader(EngineFormatVersion) - - 'Body - Dim body As Dictionary(Of String, Object) = New Dictionary(Of String, Object) - - body.Add("SavedInDeclMode", Cfg.DeclMode) - - body.Add("ModelName", eng.Model) - - body.Add("Displacement", eng.Displacement.ConvertToCubicCentiMeter().ToString()) - body.Add("IdlingSpeed", eng.IdleSpeed.AsRPM) - body.Add("Inertia", eng.Inertia.Value()) - - body.Add("WHTC-Urban", eng.WHTCUrban) - body.Add("WHTC-Rural", eng.WHTCRural) - body.Add("WHTC-Motorway", eng.WHTCMotorway) - body.Add("WHTC-Engineering", eng.WHTCEngineering) - body.Add("ColdHotBalancingFactor", eng.ColdHotBalancingFactor) - body.Add("CFRegPer", eng.CorrectionFactorRegPer) - body.Add("RatedPower", eng.RatedPowerDeclared.Value()) - body.Add("RatedSpeed", eng.RatedSpeedDeclared.AsRPM) - body.Add("MaxTorque", eng.MaxTorqueDeclared.Value()) - body.Add("FuelType", eng.FuelType.ToString()) - - body.Add("FullLoadCurve", GetRelativePath(eng.FullLoadCurve.Source, Path.GetDirectoryName(filename))) - - body.Add("FuelMap", GetRelativePath(eng.FuelConsumptionMap.Source, Path.GetDirectoryName(filename))) - - WriteFile(header, body, filename) - End Sub - - Protected Function GetHeader(fileVersion As Integer) As Dictionary(Of String, Object) - Dim header As Dictionary(Of String, Object) = New Dictionary(Of String, Object) - - header.Add("CreatedBy", "") - header.Add("Date", Now.ToUniversalTime().ToString("o")) - header.Add("AppVersion", VECTOvers) - header.Add("FileVersion", fileVersion) - Return header - End Function - - Public Sub SaveGearbox(gbx As IGearboxEngineeringInputData, axl As IAxleGearInputData, filename As String) _ - Implements IOutputFileWriter.SaveGearbox - - 'Header - Dim header As Dictionary(Of String, Object) = GetHeader(GearboxFormatVersion) - - - 'Body - Dim body As Dictionary(Of String, Object) = New Dictionary(Of String, Object) - - body.Add(JsonKeys.SavedInDeclMode, Cfg.DeclMode) - body.Add(JsonKeys.Gearbox_ModelName, gbx.Model) - body.Add(JsonKeys.Gearbox_Inertia, gbx.Inertia.Value()) - body.Add(JsonKeys.Gearbox_TractionInterruption, gbx.TractionInterruption.Value()) - - Dim ls As New List(Of Dictionary(Of String, Object)) - Dim axlgDict As New Dictionary(Of String, Object) - axlgDict.Add(JsonKeys.Gearbox_Gear_Ratio, axl.Ratio) - If axl.LossMap Is Nothing Then - axlgDict.Add(JsonKeys.Gearbox_Gear_Efficiency, axl.Efficiency) - Else - axlgDict.Add(JsonKeys.Gearbox_Gear_LossMapFile, GetRelativePath(axl.LossMap.Source, Path.GetDirectoryName(filename))) - End If - ls.Add(axlgDict) - - For Each gear As ITransmissionInputData In gbx.Gears - Dim gearDict As New Dictionary(Of String, Object) - gearDict.Add(JsonKeys.Gearbox_Gear_Ratio, gear.Ratio) - If gear.LossMap Is Nothing Then - gearDict.Add(JsonKeys.Gearbox_Gear_Efficiency, gear.Efficiency) - Else - gearDict.Add(JsonKeys.Gearbox_Gear_LossMapFile, - GetRelativePath(gear.LossMap.Source, Path.GetDirectoryName(filename))) - End If - gearDict.Add(JsonKeys.Gearbox_Gear_ShiftPolygonFile, If _ - (Not gbx.SavedInDeclarationMode AndAlso Not gear.ShiftPolygon Is Nothing, - GetRelativePath(gear.ShiftPolygon.Source, Path.GetDirectoryName(filename)), "")) - gearDict.Add("MaxTorque", If(gear.MaxTorque Is Nothing, "", gear.MaxTorque.Value().ToString())) - gearDict.Add("MaxSpeed", If(gear.MaxInputSpeed Is Nothing, "", gear.MaxInputSpeed.AsRPM.ToString())) - - ls.Add(gearDict) - Next - body.Add(JsonKeys.Gearbox_Gears, ls) - body.Add(JsonKeys.Gearbox_TorqueReserve, gbx.TorqueReserve*100) - body.Add(JsonKeys.Gearbox_ShiftTime, gbx.MinTimeBetweenGearshift.Value()) - body.Add(JsonKeys.Gearbox_StartTorqueReserve, gbx.StartTorqueReserve*100) - body.Add(JsonKeys.Gearbox_StartSpeed, gbx.StartSpeed.Value()) - body.Add(JsonKeys.Gearbox_StartAcceleration, gbx.StartAcceleration.Value()) - body.Add(JsonKeys.Gearbox_GearboxType, gbx.Type.ToString()) - - Dim torqueConverter As ITorqueConverterEngineeringInputData = gbx.TorqueConverter - Dim torqueConverterDict As New Dictionary(Of String, Object) - torqueConverterDict.Add("Enabled", Not torqueConverter Is Nothing AndAlso gbx.Type.AutomaticTransmission()) - If gbx.Type.AutomaticTransmission() AndAlso Not torqueConverter Is Nothing Then - torqueConverterDict.Add("File", GetRelativePath(torqueConverter.TCData.Source, Path.GetDirectoryName(filename))) - torqueConverterDict.Add(JsonKeys.Gearbox_TorqueConverter_ReferenceRPM, torqueConverter.ReferenceRPM.AsRPM) - torqueConverterDict.Add(JsonKeys.Gearbox_TorqueConverter_Inertia, torqueConverter.Inertia.Value()) - torqueConverterDict.Add("MaxTCSpeed", torqueConverter.MaxInputSpeed.AsRPM) - torqueConverterDict.Add("ShiftPolygon", - If (Not gbx.SavedInDeclarationMode AndAlso Not torqueConverter.ShiftPolygon Is Nothing, - GetRelativePath(torqueConverter.ShiftPolygon.Source, Path.GetDirectoryName(filename)), "")) - torqueConverterDict.Add("CLUpshiftMinAcceleration", torqueConverter.CLUpshiftMinAcceleration.Value()) - torqueConverterDict.Add("CCUpshiftMinAcceleration", torqueConverter.CCUpshiftMinAcceleration.Value()) - End If - body.Add(JsonKeys.Gearbox_TorqueConverter, torqueConverterDict) - - body.Add("DownshiftAfterUpshiftDelay", gbx.DownshiftAfterUpshiftDelay.Value()) - body.Add("UpshiftAfterDownshiftDelay", gbx.UpshiftAfterDownshiftDelay.Value()) - body.Add("UpshiftMinAcceleration", gbx.UpshiftMinAcceleration.Value()) - - body.Add("PowershiftShiftTime", gbx.PowershiftShiftTime.Value()) - - WriteFile(header, body, filename) - End Sub - - Public Sub SaveVehicle(vehicle As IVehicleEngineeringInputData, airdrag As IAirdragEngineeringInputData, - retarder As IRetarderInputData, - pto As IPTOTransmissionInputData, angledrive As IAngledriveInputData, filename As String) _ - Implements IOutputFileWriter.SaveVehicle - Dim basePath As String = Path.GetDirectoryName(filename) - - 'Header - Dim header As Dictionary(Of String, Object) = GetHeader(VehicleFormatVersion) - - 'Body - Dim retarderOut As Dictionary(Of String, Object) = New Dictionary(Of String, Object)() - If retarder Is Nothing Then - retarderOut.Add("Type", RetarderType.None.GetName()) - Else - retarderOut.Add("Type", retarder.Type.GetName()) - retarderOut.Add("Ratio", retarder.Ratio) - retarderOut.Add("File", - If _ - (retarder.Type.IsDedicatedComponent AndAlso Not retarder.LossMap Is Nothing, - GetRelativePath(retarder.LossMap.Source, basePath), "")) - End If - - Dim ptoOut As Dictionary(Of String, Object) = New Dictionary(Of String, Object) - If pto Is Nothing Then - ptoOut.Add("Type", "None") - Else - ptoOut.Add("Type", pto.PTOTransmissionType) - ptoOut.Add("LossMap", - If _ - (pto.PTOTransmissionType <> "None" AndAlso Not pto.PTOLossMap Is Nothing, - GetRelativePath(pto.PTOLossMap.Source, basePath), "")) - ptoOut.Add("Cycle", - If _ - (pto.PTOTransmissionType <> "None" AndAlso Not pto.PTOCycle Is Nothing, - GetRelativePath(pto.PTOCycle.Source, basePath), "")) - End If - - Dim angledriveOut As Dictionary(Of String, Object) = New Dictionary(Of String, Object) From { - {"Type", angledrive.Type.ToString()}, - {"Ratio", angledrive.Ratio}, - {"LossMap", - If _ - (angledrive.Type = AngledriveType.SeparateAngledrive AndAlso Not angledrive.LossMap Is Nothing, - GetRelativePath(angledrive.LossMap.Source, basePath), "")}} - - Dim torqueLimits As Dictionary(Of String, String) = New Dictionary(Of String, String) - For Each entry As ITorqueLimitInputData In vehicle.TorqueLimits - torqueLimits.Add(entry.Gear().ToString(), entry.MaxTorque.Value().ToString()) - Next - - Dim body As Dictionary(Of String, Object) = New Dictionary(Of String, Object) From { - {"SavedInDeclMode", Cfg.DeclMode}, - {"VehCat", vehicle.VehicleCategory.ToString()}, - {"LegislativeClass", vehicle.LegislativeClass.ToString()}, - {"CurbWeight", vehicle.CurbMassChassis.Value()}, - {"CurbWeightExtra", vehicle.CurbMassExtra.Value()}, - {"Loading", vehicle.Loading.Value()}, - {"MassMax", vehicle.GrossVehicleMassRating.ConvertToTon().Value}, - {"rdyn", vehicle.DynamicTyreRadius.ConvertToMilliMeter().Value}, - {"CdCorrMode", airdrag.CrossWindCorrectionMode.GetName()}, - {"CdCorrFile", - If((airdrag.CrossWindCorrectionMode = CrossWindCorrectionMode.SpeedDependentCorrectionFactor OrElse - airdrag.CrossWindCorrectionMode = CrossWindCorrectionMode.VAirBetaLookupTable) AndAlso - Not airdrag.CrosswindCorrectionMap Is Nothing, GetRelativePath(airdrag.CrosswindCorrectionMap.Source, basePath), - "") - }, - {"Retarder", retarderOut}, - {"Angledrive", angledriveOut}, - {"PTO", ptoOut}, - {"TorqueLimits", torqueLimits}, - {"IdlingSpeed", vehicle.EngineIdleSpeed.AsRPM}, - {"AxleConfig", New Dictionary(Of String, Object) From { - {"Type", vehicle.AxleConfiguration.GetName()}, - {"Axles", From axle In vehicle.Axles Select New Dictionary(Of String, Object) From { - {"Inertia", axle.Tyre.Inertia.Value()}, - {"Wheels", axle.Tyre.Dimension}, - {"AxleWeightShare", axle.AxleWeightShare}, - {"TwinTyres", axle.TwinTyres}, - {"RRCISO", axle.Tyre.RollResistanceCoefficient}, - {"FzISO", axle.Tyre.TyreTestLoad.Value()}, - {"Type", axle.AxleType.ToString()} - }}}}} - - If (Not IsNothing(airdrag.AirDragArea)) Then - body("CdA") = airdrag.AirDragArea.Value() - End If - If (Not IsNothing(vehicle.Height)) Then - body("VehicleHeight") = vehicle.Height.Value() - End If - WriteFile(header, body, filename) - End Sub - - Public Sub SaveJob(input As IEngineeringInputDataProvider, filename As String) _ - Implements IOutputFileWriter.SaveJob - Dim basePath As String = Path.GetDirectoryName(filename) - 'Header - Dim header As Dictionary(Of String, Object) = GetHeader(VectoJobFormatVersion) - - 'Body - Dim body As Dictionary(Of String, Object) = New Dictionary(Of String, Object) - - 'SavedInDeclMode = Cfg.DeclMode - - Dim job As IEngineeringJobInputData = input.JobInputData() - - body.Add("SavedInDeclMode", job.SavedInDeclarationMode) - body.Add("EngineOnlyMode", job.EngineOnlyMode) - - If job.EngineOnlyMode Then - body.Add("EngineFile", GetRelativePath(job.EngineOnly.Source, basePath)) - body.Add("Cycles", - job.Cycles.Select(Function(x) GetRelativePath(x.CycleData.Source, Path.GetDirectoryName(filename))).ToArray()) - WriteFile(header, body, filename) - Return - End If - - 'Main Files - body.Add("VehicleFile", GetRelativePath(job.Vehicle.Source, basePath)) - body.Add("EngineFile", GetRelativePath(input.JobInputData.Vehicle.EngineInputData.Source, basePath)) - body.Add("GearboxFile", GetRelativePath(input.JobInputData.Vehicle.GearboxInputData.Source, basePath)) - - - Dim aux As IAuxiliariesEngineeringInputData = job.Vehicle.AuxiliaryInputData() - 'AA-TB - 'ADVANCED AUXILIARIES - body.Add("AuxiliaryAssembly", aux.AuxiliaryAssembly.GetName()) - body.Add("AuxiliaryVersion", aux.AuxiliaryVersion) - body.Add("AdvancedAuxiliaryFilePath", GetRelativePath(aux.AdvancedAuxiliaryFilePath, basePath)) - - Dim pAdd As Double = 0.0 - Dim auxList As List(Of Object) = New List(Of Object) - For Each auxEntry As IAuxiliaryEngineeringInputData In aux.Auxiliaries - If auxEntry.AuxiliaryType = AuxiliaryDemandType.Constant Then - pAdd += auxEntry.ConstantPowerDemand.Value() - Continue For - End If - Dim auxOut As Dictionary(Of String, Object) = New Dictionary(Of String, Object) - Dim engineeringAuxEntry As IAuxiliaryDeclarationInputData = TryCast(auxEntry, IAuxiliaryDeclarationInputData) - If Not job.SavedInDeclarationMode Then - auxOut.Add("ID", auxEntry.ID) - auxOut.Add("Type", AuxiliaryTypeHelper.ParseKey(auxEntry.ID).Name()) - auxOut.Add("Path", GetRelativePath(auxEntry.DemandMap.Source, basePath)) - auxOut.Add("Technology", New String() {}) - Else - auxOut.Add("ID", auxEntry.ID) - auxOut.Add("Type", AuxiliaryTypeHelper.ParseKey(auxEntry.ID).Name()) - auxOut.Add("Technology", engineeringAuxEntry.Technology) - End If - auxList.Add(auxOut) - Next - - body.Add("Aux", auxList) - If Not job.SavedInDeclarationMode Then - body.Add("Padd", pAdd) - End If - - Dim driver As IDriverEngineeringInputData = input.DriverInputData - - If Not job.SavedInDeclarationMode Then - body.Add("VACC", GetRelativePath(driver.AccelerationCurve.Source, basePath)) - End If - 'body.Add("StartStop", New Dictionary(Of String, Object) From { - ' {"Enabled", driver.StartStop.Enabled}, - ' {"MaxSpeed", driver.StartStop.MaxSpeed.AsKmph}, - ' {"MinTime", driver.StartStop.MinTime.Value()}, - ' {"Delay", driver.StartStop.Delay.Value()}}) - If Not job.SavedInDeclarationMode Then - Dim dfTargetSpeed As String = If( - Not driver.Lookahead.CoastingDecisionFactorTargetSpeedLookup Is Nothing AndAlso - File.Exists(driver.Lookahead.CoastingDecisionFactorTargetSpeedLookup.Source), - GetRelativePath(driver.Lookahead.CoastingDecisionFactorTargetSpeedLookup.Source, basePath), "") - Dim dfVelocityDrop As String = If( - Not driver.Lookahead.CoastingDecisionFactorVelocityDropLookup Is Nothing AndAlso - File.Exists(driver.Lookahead.CoastingDecisionFactorVelocityDropLookup.Source), - GetRelativePath(driver.Lookahead.CoastingDecisionFactorVelocityDropLookup.Source, basePath), "") - body.Add("LAC", New Dictionary(Of String, Object) From { - {"Enabled", driver.Lookahead.Enabled}, - {"PreviewDistanceFactor", driver.Lookahead.LookaheadDistanceFactor}, - {"DF_offset", driver.Lookahead.CoastingDecisionFactorOffset}, - {"DF_scaling", driver.Lookahead.CoastingDecisionFactorScaling}, - {"DF_targetSpeedLookup", dfTargetSpeed}, - {"Df_velocityDropLookup", dfVelocityDrop}, - {"MinSpeed", driver.Lookahead.MinSpeed.AsKmph}}) - End If - - 'Overspeed / EcoRoll - Dim overspeedDic As Dictionary(Of String, Object) = New Dictionary(Of String, Object) - - overspeedDic.Add("Mode", driver.OverSpeedEcoRoll.Mode.ToString()) - - overspeedDic.Add("MinSpeed", driver.OverSpeedEcoRoll.MinSpeed.AsKmph) - overspeedDic.Add("OverSpeed", driver.OverSpeedEcoRoll.OverSpeed.AsKmph) - overspeedDic.Add("UnderSpeed", driver.OverSpeedEcoRoll.UnderSpeed.AsKmph) - body.Add("OverSpeedEcoRoll", overspeedDic) - - 'Cycles - If Not job.SavedInDeclarationMode Then - body.Add("Cycles", - job.Cycles.Select(Function(x) GetRelativePath(x.CycleData.Source, Path.GetDirectoryName(filename))).ToArray()) - End If - - WriteFile(header, body, filename) - End Sub - - Public Sub SaveJob(input As IVTPDeclarationInputDataProvider, filename As String) Implements IOutputFileWriter.SaveJob - Dim header As Dictionary(Of String, Object) = GetHeader(VectoJobFormatVersion) - Dim body As Dictionary(Of string, Object) = SaveVTPJob(input.JobInputData, filename, true) - WriteFile(header, body, filename) - end Sub - Public Sub SaveJob(input As IVTPEngineeringInputDataProvider, filename As String) Implements IOutputFileWriter.SaveJob - Dim header As Dictionary(Of String, Object) = GetHeader(VectoJobFormatVersion) - Dim body As Dictionary(Of string, Object) = SaveVTPJob(input.JobInputData, filename, False) - WriteFile(header, body, filename) - End Sub - - Private Function SaveVTPJob(job As IVTPDeclarationJobInputData, filename As String, declarationmode As Boolean) As Dictionary(Of String,Object) - - 'Body - Dim body As Dictionary(Of String, Object) = New Dictionary(Of String, Object) - body.Add("SavedInDeclMode", declarationmode) - body.Add("DeclarationVehicle", GetRelativePath(job.Vehicle.Source, Path.GetDirectoryName(filename))) + Public Const GearboxFormatVersion As Integer = 6 + + Public Const VehicleFormatVersion As Integer = 7 + + Private Const VectoJobFormatVersion As Integer = 4 + + Private Shared _instance As JSONFileWriter + + Public Shared ReadOnly Property Instance As JSONFileWriter + Get + If _instance Is Nothing Then _instance = New JSONFileWriter() + Return _instance + End Get + End Property + + Public Sub SaveEngine(eng As IEngineEngineeringInputData, filename As String) _ + Implements IOutputFileWriter.SaveEngine + + 'Header + Dim header As Dictionary(Of String, Object) = GetHeader(EngineFormatVersion) + + 'Body + Dim body As Dictionary(Of String, Object) = New Dictionary(Of String, Object) + + body.Add("SavedInDeclMode", Cfg.DeclMode) + + body.Add("ModelName", eng.Model) + + body.Add("Displacement", eng.Displacement.ConvertToCubicCentiMeter().ToString()) + body.Add("IdlingSpeed", eng.IdleSpeed.AsRPM) + body.Add("Inertia", eng.Inertia.Value()) + + body.Add("WHTC-Urban", eng.WHTCUrban) + body.Add("WHTC-Rural", eng.WHTCRural) + body.Add("WHTC-Motorway", eng.WHTCMotorway) + body.Add("WHTC-Engineering", eng.WHTCEngineering) + body.Add("ColdHotBalancingFactor", eng.ColdHotBalancingFactor) + body.Add("CFRegPer", eng.CorrectionFactorRegPer) + body.Add("RatedPower", eng.RatedPowerDeclared.Value()) + body.Add("RatedSpeed", eng.RatedSpeedDeclared.AsRPM) + body.Add("MaxTorque", eng.MaxTorqueDeclared.Value()) + body.Add("FuelType", eng.FuelType.ToString()) + + body.Add("FullLoadCurve", GetRelativePath(eng.FullLoadCurve.Source, Path.GetDirectoryName(filename))) + + body.Add("FuelMap", GetRelativePath(eng.FuelConsumptionMap.Source, Path.GetDirectoryName(filename))) + + WriteFile(header, body, filename) + End Sub + + Protected Function GetHeader(fileVersion As Integer) As Dictionary(Of String, Object) + Dim header As Dictionary(Of String, Object) = New Dictionary(Of String, Object) + + header.Add("CreatedBy", "") + header.Add("Date", Now.ToUniversalTime().ToString("o")) + header.Add("AppVersion", VECTOvers) + header.Add("FileVersion", fileVersion) + Return header + End Function + + Public Sub SaveGearbox(gbx As IGearboxEngineeringInputData, axl As IAxleGearInputData, filename As String) _ + Implements IOutputFileWriter.SaveGearbox + + 'Header + Dim header As Dictionary(Of String, Object) = GetHeader(GearboxFormatVersion) + + + 'Body + Dim body As Dictionary(Of String, Object) = New Dictionary(Of String, Object) + + body.Add(JsonKeys.SavedInDeclMode, Cfg.DeclMode) + body.Add(JsonKeys.Gearbox_ModelName, gbx.Model) + body.Add(JsonKeys.Gearbox_Inertia, gbx.Inertia.Value()) + body.Add(JsonKeys.Gearbox_TractionInterruption, gbx.TractionInterruption.Value()) + + Dim ls As New List(Of Dictionary(Of String, Object)) + Dim axlgDict As New Dictionary(Of String, Object) + axlgDict.Add(JsonKeys.Gearbox_Gear_Ratio, axl.Ratio) + If axl.LossMap Is Nothing Then + axlgDict.Add(JsonKeys.Gearbox_Gear_Efficiency, axl.Efficiency) + Else + axlgDict.Add(JsonKeys.Gearbox_Gear_LossMapFile, GetRelativePath(axl.LossMap.Source, Path.GetDirectoryName(filename))) + End If + ls.Add(axlgDict) + + For Each gear As ITransmissionInputData In gbx.Gears + Dim gearDict As New Dictionary(Of String, Object) + gearDict.Add(JsonKeys.Gearbox_Gear_Ratio, gear.Ratio) + If gear.LossMap Is Nothing Then + gearDict.Add(JsonKeys.Gearbox_Gear_Efficiency, gear.Efficiency) + Else + gearDict.Add(JsonKeys.Gearbox_Gear_LossMapFile, + GetRelativePath(gear.LossMap.Source, Path.GetDirectoryName(filename))) + End If + gearDict.Add(JsonKeys.Gearbox_Gear_ShiftPolygonFile, If _ + (Not gbx.SavedInDeclarationMode AndAlso Not gear.ShiftPolygon Is Nothing, + GetRelativePath(gear.ShiftPolygon.Source, Path.GetDirectoryName(filename)), "")) + gearDict.Add("MaxTorque", If(gear.MaxTorque Is Nothing, "", gear.MaxTorque.Value().ToString())) + gearDict.Add("MaxSpeed", If(gear.MaxInputSpeed Is Nothing, "", gear.MaxInputSpeed.AsRPM.ToString())) + + ls.Add(gearDict) + Next + body.Add(JsonKeys.Gearbox_Gears, ls) + body.Add(JsonKeys.Gearbox_TorqueReserve, gbx.TorqueReserve*100) + body.Add(JsonKeys.Gearbox_ShiftTime, gbx.MinTimeBetweenGearshift.Value()) + body.Add(JsonKeys.Gearbox_StartTorqueReserve, gbx.StartTorqueReserve*100) + body.Add(JsonKeys.Gearbox_StartSpeed, gbx.StartSpeed.Value()) + body.Add(JsonKeys.Gearbox_StartAcceleration, gbx.StartAcceleration.Value()) + body.Add(JsonKeys.Gearbox_GearboxType, gbx.Type.ToString()) + + Dim torqueConverter As ITorqueConverterEngineeringInputData = gbx.TorqueConverter + Dim torqueConverterDict As New Dictionary(Of String, Object) + torqueConverterDict.Add("Enabled", Not torqueConverter Is Nothing AndAlso gbx.Type.AutomaticTransmission()) + If gbx.Type.AutomaticTransmission() AndAlso Not torqueConverter Is Nothing Then + torqueConverterDict.Add("File", GetRelativePath(torqueConverter.TCData.Source, Path.GetDirectoryName(filename))) + torqueConverterDict.Add(JsonKeys.Gearbox_TorqueConverter_ReferenceRPM, torqueConverter.ReferenceRPM.AsRPM) + torqueConverterDict.Add(JsonKeys.Gearbox_TorqueConverter_Inertia, torqueConverter.Inertia.Value()) + torqueConverterDict.Add("MaxTCSpeed", torqueConverter.MaxInputSpeed.AsRPM) + torqueConverterDict.Add("ShiftPolygon", + If (Not gbx.SavedInDeclarationMode AndAlso Not torqueConverter.ShiftPolygon Is Nothing, + GetRelativePath(torqueConverter.ShiftPolygon.Source, Path.GetDirectoryName(filename)), "")) + torqueConverterDict.Add("CLUpshiftMinAcceleration", torqueConverter.CLUpshiftMinAcceleration.Value()) + torqueConverterDict.Add("CCUpshiftMinAcceleration", torqueConverter.CCUpshiftMinAcceleration.Value()) + End If + body.Add(JsonKeys.Gearbox_TorqueConverter, torqueConverterDict) + + body.Add("DownshiftAfterUpshiftDelay", gbx.DownshiftAfterUpshiftDelay.Value()) + body.Add("UpshiftAfterDownshiftDelay", gbx.UpshiftAfterDownshiftDelay.Value()) + body.Add("UpshiftMinAcceleration", gbx.UpshiftMinAcceleration.Value()) + + body.Add("PowershiftShiftTime", gbx.PowershiftShiftTime.Value()) + + WriteFile(header, body, filename) + End Sub + + Public Sub SaveVehicle(vehicle As IVehicleEngineeringInputData, airdrag As IAirdragEngineeringInputData, + retarder As IRetarderInputData, + pto As IPTOTransmissionInputData, angledrive As IAngledriveInputData, filename As String) _ + Implements IOutputFileWriter.SaveVehicle + Dim basePath As String = Path.GetDirectoryName(filename) + + 'Header + Dim header As Dictionary(Of String, Object) = GetHeader(VehicleFormatVersion) + + 'Body + Dim retarderOut As Dictionary(Of String, Object) = New Dictionary(Of String, Object)() + If retarder Is Nothing Then + retarderOut.Add("Type", RetarderType.None.GetName()) + Else + retarderOut.Add("Type", retarder.Type.GetName()) + retarderOut.Add("Ratio", retarder.Ratio) + retarderOut.Add("File", + If _ + (retarder.Type.IsDedicatedComponent AndAlso Not retarder.LossMap Is Nothing, + GetRelativePath(retarder.LossMap.Source, basePath), "")) + End If + + Dim ptoOut As Dictionary(Of String, Object) = New Dictionary(Of String, Object) + If pto Is Nothing Then + ptoOut.Add("Type", "None") + Else + ptoOut.Add("Type", pto.PTOTransmissionType) + ptoOut.Add("LossMap", + If _ + (pto.PTOTransmissionType <> "None" AndAlso Not pto.PTOLossMap Is Nothing, + GetRelativePath(pto.PTOLossMap.Source, basePath), "")) + ptoOut.Add("Cycle", + If _ + (pto.PTOTransmissionType <> "None" AndAlso Not pto.PTOCycle Is Nothing, + GetRelativePath(pto.PTOCycle.Source, basePath), "")) + End If + + Dim angledriveOut As Dictionary(Of String, Object) = New Dictionary(Of String, Object) From { + {"Type", angledrive.Type.ToString()}, + {"Ratio", angledrive.Ratio}, + {"LossMap", + If _ + (angledrive.Type = AngledriveType.SeparateAngledrive AndAlso Not angledrive.LossMap Is Nothing, + GetRelativePath(angledrive.LossMap.Source, basePath), "")}} + + Dim torqueLimits As Dictionary(Of String, String) = New Dictionary(Of String, String) + For Each entry As ITorqueLimitInputData In vehicle.TorqueLimits + torqueLimits.Add(entry.Gear().ToString(), entry.MaxTorque.Value().ToString()) + Next + + Dim body As Dictionary(Of String, Object) = New Dictionary(Of String, Object) From { + {"SavedInDeclMode", Cfg.DeclMode}, + {"VehCat", vehicle.VehicleCategory.ToString()}, + {"LegislativeClass", vehicle.LegislativeClass.ToString()}, + {"CurbWeight", vehicle.CurbMassChassis.Value()}, + {"CurbWeightExtra", vehicle.CurbMassExtra.Value()}, + {"Loading", vehicle.Loading.Value()}, + {"MassMax", vehicle.GrossVehicleMassRating.ConvertToTon().Value}, + {"rdyn", vehicle.DynamicTyreRadius.ConvertToMilliMeter().Value}, + {"CdCorrMode", airdrag.CrossWindCorrectionMode.GetName()}, + {"CdCorrFile", + If((airdrag.CrossWindCorrectionMode = CrossWindCorrectionMode.SpeedDependentCorrectionFactor OrElse + airdrag.CrossWindCorrectionMode = CrossWindCorrectionMode.VAirBetaLookupTable) AndAlso + Not airdrag.CrosswindCorrectionMap Is Nothing, GetRelativePath(airdrag.CrosswindCorrectionMap.Source, basePath), + "") + }, + {"Retarder", retarderOut}, + {"Angledrive", angledriveOut}, + {"PTO", ptoOut}, + {"TorqueLimits", torqueLimits}, + {"IdlingSpeed", vehicle.EngineIdleSpeed.AsRPM}, + {"AxleConfig", New Dictionary(Of String, Object) From { + {"Type", vehicle.AxleConfiguration.GetName()}, + {"Axles", From axle In vehicle.Axles Select New Dictionary(Of String, Object) From { + {"Inertia", axle.Tyre.Inertia.Value()}, + {"Wheels", axle.Tyre.Dimension}, + {"AxleWeightShare", axle.AxleWeightShare}, + {"TwinTyres", axle.TwinTyres}, + {"RRCISO", axle.Tyre.RollResistanceCoefficient}, + {"FzISO", axle.Tyre.TyreTestLoad.Value()}, + {"Type", axle.AxleType.ToString()} + }}}}} + + If (Not IsNothing(airdrag.AirDragArea)) Then + body("CdA") = airdrag.AirDragArea.Value() + End If + If (Not IsNothing(vehicle.Height)) Then + body("VehicleHeight") = vehicle.Height.Value() + End If + WriteFile(header, body, filename) + End Sub + + Public Sub SaveJob(input As IEngineeringInputDataProvider, filename As String) _ + Implements IOutputFileWriter.SaveJob + Dim basePath As String = Path.GetDirectoryName(filename) + 'Header + Dim header As Dictionary(Of String, Object) = GetHeader(VectoJobFormatVersion) + + 'Body + Dim body As Dictionary(Of String, Object) = New Dictionary(Of String, Object) + + 'SavedInDeclMode = Cfg.DeclMode + + Dim job As IEngineeringJobInputData = input.JobInputData() + + body.Add("SavedInDeclMode", job.SavedInDeclarationMode) + body.Add("EngineOnlyMode", job.EngineOnlyMode) + + If job.EngineOnlyMode Then + body.Add("EngineFile", GetRelativePath(job.EngineOnly.Source, basePath)) + body.Add("Cycles", + job.Cycles.Select(Function(x) GetRelativePath(x.CycleData.Source, Path.GetDirectoryName(filename))).ToArray()) + WriteFile(header, body, filename) + Return + End If + + 'Main Files + body.Add("VehicleFile", GetRelativePath(job.Vehicle.Source, basePath)) + body.Add("EngineFile", GetRelativePath(input.JobInputData.Vehicle.EngineInputData.Source, basePath)) + body.Add("GearboxFile", GetRelativePath(input.JobInputData.Vehicle.GearboxInputData.Source, basePath)) + if not job.SavedInDeclarationMode then + body.Add("TCU", GetRelativePath(input.GearshiftInputData.Source, basePath)) + end if + + Dim aux As IAuxiliariesEngineeringInputData = job.Vehicle.AuxiliaryInputData() + 'AA-TB + 'ADVANCED AUXILIARIES + body.Add("AuxiliaryAssembly", aux.AuxiliaryAssembly.GetName()) + body.Add("AuxiliaryVersion", aux.AuxiliaryVersion) + body.Add("AdvancedAuxiliaryFilePath", GetRelativePath(aux.AdvancedAuxiliaryFilePath, basePath)) + + Dim pAdd As Double = 0.0 + Dim auxList As List(Of Object) = New List(Of Object) + For Each auxEntry As IAuxiliaryEngineeringInputData In aux.Auxiliaries + If auxEntry.AuxiliaryType = AuxiliaryDemandType.Constant Then + pAdd += auxEntry.ConstantPowerDemand.Value() + Continue For + End If + Dim auxOut As Dictionary(Of String, Object) = New Dictionary(Of String, Object) + Dim engineeringAuxEntry As IAuxiliaryDeclarationInputData = TryCast(auxEntry, IAuxiliaryDeclarationInputData) + If Not job.SavedInDeclarationMode Then + auxOut.Add("ID", auxEntry.ID) + auxOut.Add("Type", AuxiliaryTypeHelper.ParseKey(auxEntry.ID).Name()) + auxOut.Add("Path", GetRelativePath(auxEntry.DemandMap.Source, basePath)) + auxOut.Add("Technology", New String() {}) + Else + auxOut.Add("ID", auxEntry.ID) + auxOut.Add("Type", AuxiliaryTypeHelper.ParseKey(auxEntry.ID).Name()) + auxOut.Add("Technology", engineeringAuxEntry.Technology) + End If + auxList.Add(auxOut) + Next + + body.Add("Aux", auxList) + If Not job.SavedInDeclarationMode Then + body.Add("Padd", pAdd) + End If + + Dim driver As IDriverEngineeringInputData = input.DriverInputData + + If Not job.SavedInDeclarationMode Then + body.Add("VACC", GetRelativePath(driver.AccelerationCurve.Source, basePath)) + End If + 'body.Add("StartStop", New Dictionary(Of String, Object) From { + ' {"Enabled", driver.StartStop.Enabled}, + ' {"MaxSpeed", driver.StartStop.MaxSpeed.AsKmph}, + ' {"MinTime", driver.StartStop.MinTime.Value()}, + ' {"Delay", driver.StartStop.Delay.Value()}}) + If Not job.SavedInDeclarationMode Then + Dim dfTargetSpeed As String = If( + Not driver.Lookahead.CoastingDecisionFactorTargetSpeedLookup Is Nothing AndAlso + File.Exists(driver.Lookahead.CoastingDecisionFactorTargetSpeedLookup.Source), + GetRelativePath(driver.Lookahead.CoastingDecisionFactorTargetSpeedLookup.Source, basePath), "") + Dim dfVelocityDrop As String = If( + Not driver.Lookahead.CoastingDecisionFactorVelocityDropLookup Is Nothing AndAlso + File.Exists(driver.Lookahead.CoastingDecisionFactorVelocityDropLookup.Source), + GetRelativePath(driver.Lookahead.CoastingDecisionFactorVelocityDropLookup.Source, basePath), "") + body.Add("LAC", New Dictionary(Of String, Object) From { + {"Enabled", driver.Lookahead.Enabled}, + {"PreviewDistanceFactor", driver.Lookahead.LookaheadDistanceFactor}, + {"DF_offset", driver.Lookahead.CoastingDecisionFactorOffset}, + {"DF_scaling", driver.Lookahead.CoastingDecisionFactorScaling}, + {"DF_targetSpeedLookup", dfTargetSpeed}, + {"Df_velocityDropLookup", dfVelocityDrop}, + {"MinSpeed", driver.Lookahead.MinSpeed.AsKmph}}) + End If + + 'Overspeed / EcoRoll + Dim overspeedDic As Dictionary(Of String, Object) = New Dictionary(Of String, Object) + + overspeedDic.Add("Mode", driver.OverSpeedEcoRoll.Mode.ToString()) + + overspeedDic.Add("MinSpeed", driver.OverSpeedEcoRoll.MinSpeed.AsKmph) + overspeedDic.Add("OverSpeed", driver.OverSpeedEcoRoll.OverSpeed.AsKmph) + overspeedDic.Add("UnderSpeed", driver.OverSpeedEcoRoll.UnderSpeed.AsKmph) + body.Add("OverSpeedEcoRoll", overspeedDic) + + 'Cycles + If Not job.SavedInDeclarationMode Then + body.Add("Cycles", + job.Cycles.Select(Function(x) GetRelativePath(x.CycleData.Source, Path.GetDirectoryName(filename))).ToArray()) + End If + + WriteFile(header, body, filename) + End Sub + + Public Sub SaveJob(input As IVTPDeclarationInputDataProvider, filename As String) Implements IOutputFileWriter.SaveJob + Dim header As Dictionary(Of String, Object) = GetHeader(VectoJobFormatVersion) + Dim body As Dictionary(Of string, Object) = SaveVTPJob(input.JobInputData, filename, true) + WriteFile(header, body, filename) + end Sub + Public Sub SaveJob(input As IVTPEngineeringInputDataProvider, filename As String) Implements IOutputFileWriter.SaveJob + Dim header As Dictionary(Of String, Object) = GetHeader(VectoJobFormatVersion) + Dim body As Dictionary(Of string, Object) = SaveVTPJob(input.JobInputData, filename, False) + WriteFile(header, body, filename) + End Sub + + Private Function SaveVTPJob(job As IVTPDeclarationJobInputData, filename As String, declarationmode As Boolean) As Dictionary(Of String,Object) + + 'Body + Dim body As Dictionary(Of String, Object) = New Dictionary(Of String, Object) + body.Add("SavedInDeclMode", declarationmode) + body.Add("DeclarationVehicle", GetRelativePath(job.Vehicle.Source, Path.GetDirectoryName(filename))) if declarationmode Then body.add("ManufacturerRecord", GetRelativePath(job.ManufacturerReportInputData.Source, Path.GetDirectoryName(filename))) body.Add("Mileage", job.Mileage.ConvertToKiloMeter().Value) body.add("NCVTestFuel", job.NetCalorificValueTestFuel.ConvertToMegaJoulePerKilogram().Value()) End If - body.Add("FanPowerCoefficients", job.FanPowerCoefficents) - body.Add("FanDiameter", job.FanDiameter.Value()) - body.Add("Cycles", - job.Cycles.Select(Function(x) GetRelativePath(x.CycleData.Source, Path.GetDirectoryName(filename))).ToArray()) - return body - End Function - - Public Sub ExportJob(input As IEngineeringInputDataProvider, filename As String, separateFiles As Boolean) _ - Implements IOutputFileWriter.ExportJob - Throw New NotImplementedException - End Sub - - ''' <summary> - ''' Writes the Content variable into a JSON file. - ''' </summary> - ''' <param name="path"></param> - ''' <remarks></remarks> - Public Shared Sub WriteFile(content As JToken, path As String) - Dim file As StreamWriter - Dim str As String - - If content.Count = 0 Then - Return - End If - - Try - str = JsonConvert.SerializeObject(content, Formatting.Indented) - file = My.Computer.FileSystem.OpenTextFileWriter(path, False) - Catch ex As Exception - Throw - End Try - - file.Write(str) - file.Close() - End Sub - - Public Shared Sub WriteFile(content As Dictionary(Of String, Object), path As String) - WriteFile(JToken.FromObject(content), path) - End Sub - - Protected Shared Sub WriteFile(header As Dictionary(Of String, Object), body As Dictionary(Of String, Object), - path As String) - WriteFile(JToken.FromObject(New Dictionary(Of String, Object) From {{"Header", header}, {"Body", body}}), path) - End Sub + body.Add("FanPowerCoefficients", job.FanPowerCoefficents) + body.Add("FanDiameter", job.FanDiameter.Value()) + body.Add("Cycles", + job.Cycles.Select(Function(x) GetRelativePath(x.CycleData.Source, Path.GetDirectoryName(filename))).ToArray()) + return body + End Function + + Public Sub ExportJob(input As IEngineeringInputDataProvider, filename As String, separateFiles As Boolean) _ + Implements IOutputFileWriter.ExportJob + Throw New NotImplementedException + End Sub + + ''' <summary> + ''' Writes the Content variable into a JSON file. + ''' </summary> + ''' <param name="path"></param> + ''' <remarks></remarks> + Public Shared Sub WriteFile(content As JToken, path As String) + Dim file As StreamWriter + Dim str As String + + If content.Count = 0 Then + Return + End If + + Try + str = JsonConvert.SerializeObject(content, Formatting.Indented) + file = My.Computer.FileSystem.OpenTextFileWriter(path, False) + Catch ex As Exception + Throw + End Try + + file.Write(str) + file.Close() + End Sub + + Public Shared Sub WriteFile(content As Dictionary(Of String, Object), path As String) + WriteFile(JToken.FromObject(content), path) + End Sub + + Protected Shared Sub WriteFile(header As Dictionary(Of String, Object), body As Dictionary(Of String, Object), + path As String) + WriteFile(JToken.FromObject(New Dictionary(Of String, Object) From {{"Header", header}, {"Body", body}}), path) + End Sub End Class diff --git a/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs b/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs index d4e0c8030f56687408379ee4d507795e957f635f..f3f76e39e685c43829f4ea227241f97ecb33aff9 100644 --- a/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs +++ b/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs @@ -414,5 +414,6 @@ namespace TUGraz.VectoCommon.InputData TableData PredictionDurationLookup { get; } TableData ShareIdleLow { get; } TableData ShareEngineHigh { get; } + string Source { get; } } } diff --git a/VectoCore/VectoCore/Configuration/Constants.cs b/VectoCore/VectoCore/Configuration/Constants.cs index b4ed52a403292ee4ee3bd4fd9d6551cdb0332ed3..0a37d975eeec1ab66fabd3625c80dc19b0d5c762 100644 --- a/VectoCore/VectoCore/Configuration/Constants.cs +++ b/VectoCore/VectoCore/Configuration/Constants.cs @@ -85,6 +85,8 @@ namespace TUGraz.VectoCore.Configuration public const string GearboxDataFile = ".vgbx"; + public const string GearshiftDataFile = ".vtcu"; + public const string CycleFile = ".vdri"; public const string DriverAccelerationCurve = ".vacc"; diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs index 5c34c50fb4c081111d38e12a31eb6692c16427a0..16a2e4c975be4fda1583f62739f8bc234de68769 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs @@ -55,6 +55,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON protected IRetarderInputData Retarder; protected IPTOTransmissionInputData PTOTransmission; private IAirdragEngineeringInputData AirdragData; + protected IGearshiftEngineeringInputData GearshiftData; private string _filename; @@ -72,7 +73,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON case Constants.FileExtensions.GearboxDataFile: tmp = JSONInputDataFactory.ReadGearbox(filename, tolerateMissing); break; + case Constants.FileExtensions.GearshiftDataFile: + tmp = JSONInputDataFactory.ReadShiftParameters(filename, tolerateMissing); + break; } + tmp.Switch() .If<IVehicleEngineeringInputData>(c => VehicleData = c) .If<IAirdragEngineeringInputData>(c => AirdragData = c) @@ -82,7 +87,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON .If<IRetarderInputData>(c => Retarder = c) .If<ITorqueConverterEngineeringInputData>(c => TorqueConverter = c) .If<IAngledriveInputData>(c => Angledrive = c) - .If<IPTOTransmissionInputData>(c => PTOTransmission = c); + .If<IPTOTransmissionInputData>(c => PTOTransmission = c) + .If<IGearshiftEngineeringInputData>(c => GearshiftData = c); + _filename = filename; } @@ -108,7 +115,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON get { return null; } } - public IGearshiftEngineeringInputData GearshiftInputData { get { return null; } } + public IGearshiftEngineeringInputData GearshiftInputData { get { return GearshiftData; } } public DataSourceType SourceType { diff --git a/VectoCore/VectoCore/OutputData/ModalDataContainer.cs b/VectoCore/VectoCore/OutputData/ModalDataContainer.cs index 3a8373979bd54f704e47abcff38f87af00e0ce6d..8c0a9161ede70e89b61f4ab44fe1c15aef7a7d09 100644 --- a/VectoCore/VectoCore/OutputData/ModalDataContainer.cs +++ b/VectoCore/VectoCore/OutputData/ModalDataContainer.cs @@ -247,6 +247,7 @@ namespace TUGraz.VectoCore.OutputData ModalResultField.FCMap, ModalResultField.FCAUXc, ModalResultField.FCWHTCc, ModalResultField.FCAAUX, ModalResultField.FCFinal }.Select(x => x.GetName())); + // TODO: 2018-11-20: Disable additional columns after testing gearshifting! //#if TRACE strCols = strCols.Concat(_additionalColumns); //#endif diff --git a/VectoCore/VectoCore/VectoCore.csproj b/VectoCore/VectoCore/VectoCore.csproj index 315d72bd7dadc144da57d957c435990a4fb42721..2a7f10fc5e601e2a933b1c30fe583ecf1395681a 100644 --- a/VectoCore/VectoCore/VectoCore.csproj +++ b/VectoCore/VectoCore/VectoCore.csproj @@ -163,7 +163,7 @@ <Compile Include="InputData\Reader\Impl\EngineeringModeVectoRunDataFactory.cs" /> <Compile Include="InputData\Reader\Impl\EngineOnlyVectoRunDataFactory.cs" /> <Compile Include="InputData\Reader\ShiftPolygonReader.cs" /> - <Compile Include="Models\SimulationComponent\Data\ShiftStrategy\IAccelerationReserveLookup.cs" /> + <Compile Include="Models\SimulationComponent\Data\ShiftStrategy\ShiftStrategyInterfaces.cs" /> <Compile Include="Models\SimulationComponent\Data\ShiftStrategy\ShareTorque99lLookup.cs" /> <Compile Include="InputData\Reader\ShiftStrategy\ShareTorque99lLookupReader.cs" /> <Compile Include="Models\SimulationComponent\Data\ShiftStrategy\AccelerationReserveLookup.cs" />