diff --git a/VECTO/GUI/EngineForm.vb b/VECTO/GUI/EngineForm.vb index 03ec3d2acdd8faf66a55b6975cab888a37d09467..523ac4287414cd54c5171da37b43c25ab8dfe42f 100644 --- a/VECTO/GUI/EngineForm.vb +++ b/VECTO/GUI/EngineForm.vb @@ -54,7 +54,7 @@ Public Class EngineForm TbInertia.Text = CStr( - DeclarationData.Engine.EngineInertia((fTextboxToNumString(TbDispl.Text) / 1000.0).SI(Of CubicMeter), + DeclarationData.Engine.EngineInertia((fTextboxToNumString(TbDispl.Text) / 1000.0 / 1000.0).SI(Of CubicMeter), GearboxType.AMT).Value()) End Sub diff --git a/VECTO/GUI/FileSignDialog.vb b/VECTO/GUI/FileSignDialog.vb index 1806f515bea64057da62e12d8bd05c34b74cf028..9431398f0b607d11737567a8a38100a12270889f 100644 --- a/VECTO/GUI/FileSignDialog.vb +++ b/VECTO/GUI/FileSignDialog.vb @@ -39,7 +39,7 @@ Public Class FileSignDialog ClearForm(False) - mainDirectory = fPATH(TbSigFile.Text) + mainDirectory = GetPath(TbSigFile.Text) Lic.FileSigning.NewFile() diff --git a/VECTO/GUI/GearboxForm.Designer.vb b/VECTO/GUI/GearboxForm.Designer.vb index 8d98a304ca5cda4474d71ea0373a0cb887e96c26..2a30dc0a0a1726f8e14787a41d3dde403fbbf5ea 100644 --- a/VECTO/GUI/GearboxForm.Designer.vb +++ b/VECTO/GUI/GearboxForm.Designer.vb @@ -35,96 +35,95 @@ Partial Class GearboxForm 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. <DebuggerStepThrough()> _ Private Sub InitializeComponent() - Me.components = New Container() - Dim resources As ComponentResourceManager = New ComponentResourceManager(GetType(GearboxForm)) - Me.ToolStrip1 = New ToolStrip() - Me.ToolStripBtNew = New ToolStripButton() - Me.ToolStripBtOpen = New ToolStripButton() - Me.ToolStripBtSave = New ToolStripButton() - Me.ToolStripBtSaveAs = New ToolStripButton() - Me.ToolStripSeparator3 = New ToolStripSeparator() - Me.ToolStripBtSendTo = New ToolStripButton() - Me.ToolStripSeparator1 = New ToolStripSeparator() - Me.ToolStripButton1 = New ToolStripButton() - Me.StatusStrip1 = New StatusStrip() - Me.LbStatus = New ToolStripStatusLabel() - Me.ButCancel = New Button() - Me.ButOK = New Button() - Me.TbTracInt = New TextBox() - Me.LvGears = New ListView() - Me.ColumnHeader1 = CType(New ColumnHeader(), ColumnHeader) - Me.ColumnHeader2 = CType(New ColumnHeader(), ColumnHeader) - Me.ColumnHeader3 = CType(New ColumnHeader(), ColumnHeader) - Me.ColumnHeader5 = CType(New ColumnHeader(), ColumnHeader) - Me.ColumnHeader6 = CType(New ColumnHeader(), ColumnHeader) - Me.TBI_getr = New TextBox() - Me.Label49 = New Label() - Me.Label33 = New Label() - Me.Label48 = New Label() - Me.Label6 = New Label() - Me.Label3 = New Label() - Me.TbName = New TextBox() - Me.PictureBox1 = New PictureBox() - Me.BtRemGear = New Button() - Me.GrGearShift = New GroupBox() - Me.GroupBox1 = New GroupBox() - Me.tbUpshiftMinAcceleration = New TextBox() - Me.tbUpshiftAfterDownshift = New TextBox() - Me.tbDownshiftAfterUpshift = New TextBox() - Me.Label24 = New Label() - Me.Label23 = New Label() - Me.Label22 = New Label() - Me.Label21 = New Label() - Me.Label20 = New Label() - Me.Label19 = New Label() - Me.PnTorqRes = New Panel() - Me.Label2 = New Label() - Me.Label4 = New Label() - Me.TbTqResv = New TextBox() - Me.ChShiftInside = New CheckBox() - Me.TbShiftTime = New TextBox() - Me.Label12 = New Label() - Me.Label13 = New Label() - Me.ChSkipGears = New CheckBox() - Me.GroupBox2 = New GroupBox() - Me.TbStartAcc = New TextBox() - Me.Label11 = New Label() - Me.TbStartSpeed = New TextBox() - Me.Label9 = New Label() - Me.Label10 = New Label() - Me.TbTqResvStart = New TextBox() - Me.Label8 = New Label() - Me.Label5 = New Label() - Me.Label7 = New Label() - Me.CmOpenFile = New ContextMenuStrip(Me.components) - Me.OpenWithToolStripMenuItem = New ToolStripMenuItem() - Me.ShowInFolderToolStripMenuItem = New ToolStripMenuItem() - Me.GroupBox3 = New GroupBox() - Me.PnTC = New Panel() - Me.Label17 = New Label() - Me.Label18 = New Label() - Me.Label15 = New Label() - Me.TbTCinertia = New TextBox() - Me.Label1 = New Label() - Me.Label14 = New Label() - Me.BtTCfileBrowse = New Button() - Me.TbTCfile = New TextBox() - Me.BtTCfileOpen = New Button() - Me.TbTCrefrpm = New TextBox() - Me.ChTCon = New CheckBox() - Me.Label16 = New Label() - Me.CbGStype = New ComboBox() - Me.BtAddGear = New Button() - Me.GroupBox4 = New GroupBox() - Me.Label32 = New Label() - Me.PnInertiaTI = New Panel() - Me.PicBox = New PictureBox() - Me.TBTCShiftPolygon = New TextBox() - Me.LblTCShiftFile = New Label() - Me.BtTCShiftFileBrowse = New Button() + Me.components = New System.ComponentModel.Container() + Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(GearboxForm)) + 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.ToolStripSeparator3 = New System.Windows.Forms.ToolStripSeparator() + Me.ToolStripBtSendTo = New System.Windows.Forms.ToolStripButton() + Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator() + Me.ToolStripButton1 = New System.Windows.Forms.ToolStripButton() + Me.StatusStrip1 = New System.Windows.Forms.StatusStrip() + Me.LbStatus = New System.Windows.Forms.ToolStripStatusLabel() + Me.ButCancel = New System.Windows.Forms.Button() + Me.ButOK = New System.Windows.Forms.Button() + Me.TbTracInt = New System.Windows.Forms.TextBox() + Me.LvGears = New System.Windows.Forms.ListView() + Me.ColumnHeader1 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) + Me.ColumnHeader2 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) + Me.ColumnHeader3 = 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.TBI_getr = New System.Windows.Forms.TextBox() + Me.Label49 = New System.Windows.Forms.Label() + Me.Label33 = New System.Windows.Forms.Label() + Me.Label48 = New System.Windows.Forms.Label() + Me.Label6 = New System.Windows.Forms.Label() + Me.Label3 = New System.Windows.Forms.Label() + Me.TbName = New System.Windows.Forms.TextBox() + Me.PictureBox1 = New System.Windows.Forms.PictureBox() + Me.BtRemGear = New System.Windows.Forms.Button() + Me.GrGearShift = New System.Windows.Forms.GroupBox() + Me.GroupBox1 = New System.Windows.Forms.GroupBox() + Me.tbUpshiftMinAcceleration = New System.Windows.Forms.TextBox() + Me.tbUpshiftAfterDownshift = New System.Windows.Forms.TextBox() + Me.tbDownshiftAfterUpshift = New System.Windows.Forms.TextBox() + Me.Label24 = New System.Windows.Forms.Label() + Me.Label23 = New System.Windows.Forms.Label() + Me.Label22 = New System.Windows.Forms.Label() + Me.Label21 = New System.Windows.Forms.Label() + Me.Label20 = New System.Windows.Forms.Label() + Me.Label19 = New System.Windows.Forms.Label() + Me.PnTorqRes = New System.Windows.Forms.Panel() + Me.Label2 = New System.Windows.Forms.Label() + Me.Label4 = New System.Windows.Forms.Label() + Me.TbTqResv = New System.Windows.Forms.TextBox() + Me.ChShiftInside = New System.Windows.Forms.CheckBox() + Me.TbShiftTime = New System.Windows.Forms.TextBox() + Me.Label12 = New System.Windows.Forms.Label() + Me.Label13 = New System.Windows.Forms.Label() + Me.ChSkipGears = New System.Windows.Forms.CheckBox() + Me.GroupBox2 = New System.Windows.Forms.GroupBox() + Me.TbStartAcc = New System.Windows.Forms.TextBox() + Me.Label11 = New System.Windows.Forms.Label() + Me.TbStartSpeed = New System.Windows.Forms.TextBox() + Me.Label9 = New System.Windows.Forms.Label() + Me.Label10 = New System.Windows.Forms.Label() + Me.TbTqResvStart = New System.Windows.Forms.TextBox() + Me.Label8 = New System.Windows.Forms.Label() + Me.Label5 = New System.Windows.Forms.Label() + Me.Label7 = New System.Windows.Forms.Label() + Me.CmOpenFile = New System.Windows.Forms.ContextMenuStrip(Me.components) + Me.OpenWithToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ShowInFolderToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.GroupBox3 = New System.Windows.Forms.GroupBox() + Me.BtTCShiftFileBrowse = New System.Windows.Forms.Button() + Me.LblTCShiftFile = New System.Windows.Forms.Label() + Me.TBTCShiftPolygon = New System.Windows.Forms.TextBox() + Me.PnTC = New System.Windows.Forms.Panel() + Me.Label17 = New System.Windows.Forms.Label() + Me.Label18 = New System.Windows.Forms.Label() + Me.Label15 = New System.Windows.Forms.Label() + Me.TbTCinertia = New System.Windows.Forms.TextBox() + Me.Label1 = New System.Windows.Forms.Label() + Me.Label14 = New System.Windows.Forms.Label() + Me.BtTCfileBrowse = New System.Windows.Forms.Button() + Me.TbTCfile = New System.Windows.Forms.TextBox() + Me.BtTCfileOpen = New System.Windows.Forms.Button() + Me.TbTCrefrpm = New System.Windows.Forms.TextBox() + Me.Label16 = New System.Windows.Forms.Label() + Me.CbGStype = New System.Windows.Forms.ComboBox() + Me.BtAddGear = New System.Windows.Forms.Button() + Me.GroupBox4 = New System.Windows.Forms.GroupBox() + Me.Label32 = New System.Windows.Forms.Label() + Me.PnInertiaTI = New System.Windows.Forms.Panel() + Me.PicBox = New System.Windows.Forms.PictureBox() Me.ToolStrip1.SuspendLayout() Me.StatusStrip1.SuspendLayout() - CType(Me.PictureBox1, ISupportInitialize).BeginInit() + CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() Me.GrGearShift.SuspendLayout() Me.GroupBox1.SuspendLayout() Me.PnTorqRes.SuspendLayout() @@ -134,94 +133,94 @@ Partial Class GearboxForm Me.PnTC.SuspendLayout() Me.GroupBox4.SuspendLayout() Me.PnInertiaTI.SuspendLayout() - CType(Me.PicBox, ISupportInitialize).BeginInit() + CType(Me.PicBox, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'ToolStrip1 ' - Me.ToolStrip1.GripStyle = ToolStripGripStyle.Hidden - Me.ToolStrip1.Items.AddRange(New ToolStripItem() {Me.ToolStripBtNew, Me.ToolStripBtOpen, Me.ToolStripBtSave, Me.ToolStripBtSaveAs, Me.ToolStripSeparator3, Me.ToolStripBtSendTo, Me.ToolStripSeparator1, Me.ToolStripButton1}) - Me.ToolStrip1.Location = New Point(0, 0) + 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.ToolStripSeparator3, Me.ToolStripBtSendTo, Me.ToolStripSeparator1, Me.ToolStripButton1}) + Me.ToolStrip1.Location = New System.Drawing.Point(0, 0) Me.ToolStrip1.Name = "ToolStrip1" - Me.ToolStrip1.Size = New Size(877, 25) + Me.ToolStrip1.Size = New System.Drawing.Size(877, 25) Me.ToolStrip1.TabIndex = 30 Me.ToolStrip1.Text = "ToolStrip1" ' 'ToolStripBtNew ' - Me.ToolStripBtNew.DisplayStyle = ToolStripItemDisplayStyle.Image - Me.ToolStripBtNew.Image = My.Resources.Resources.blue_document_icon - Me.ToolStripBtNew.ImageTransparentColor = Color.Magenta + 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 Size(23, 22) + Me.ToolStripBtNew.Size = New System.Drawing.Size(23, 22) Me.ToolStripBtNew.Text = "ToolStripButton1" Me.ToolStripBtNew.ToolTipText = "New" ' 'ToolStripBtOpen ' - Me.ToolStripBtOpen.DisplayStyle = ToolStripItemDisplayStyle.Image - Me.ToolStripBtOpen.Image = My.Resources.Resources.Open_icon - Me.ToolStripBtOpen.ImageTransparentColor = Color.Magenta + 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 Size(23, 22) + Me.ToolStripBtOpen.Size = New System.Drawing.Size(23, 22) Me.ToolStripBtOpen.Text = "ToolStripButton1" Me.ToolStripBtOpen.ToolTipText = "Open..." ' 'ToolStripBtSave ' - Me.ToolStripBtSave.DisplayStyle = ToolStripItemDisplayStyle.Image - Me.ToolStripBtSave.Image = My.Resources.Resources.Actions_document_save_icon - Me.ToolStripBtSave.ImageTransparentColor = Color.Magenta + 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 Size(23, 22) + Me.ToolStripBtSave.Size = New System.Drawing.Size(23, 22) Me.ToolStripBtSave.Text = "ToolStripButton1" Me.ToolStripBtSave.ToolTipText = "Save" ' 'ToolStripBtSaveAs ' - Me.ToolStripBtSaveAs.DisplayStyle = ToolStripItemDisplayStyle.Image - Me.ToolStripBtSaveAs.Image = My.Resources.Resources.Actions_document_save_as_icon - Me.ToolStripBtSaveAs.ImageTransparentColor = Color.Magenta + 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 Size(23, 22) + Me.ToolStripBtSaveAs.Size = New System.Drawing.Size(23, 22) Me.ToolStripBtSaveAs.Text = "ToolStripButton1" Me.ToolStripBtSaveAs.ToolTipText = "Save As..." ' 'ToolStripSeparator3 ' Me.ToolStripSeparator3.Name = "ToolStripSeparator3" - Me.ToolStripSeparator3.Size = New Size(6, 25) + Me.ToolStripSeparator3.Size = New System.Drawing.Size(6, 25) ' 'ToolStripBtSendTo ' - Me.ToolStripBtSendTo.DisplayStyle = ToolStripItemDisplayStyle.Image - Me.ToolStripBtSendTo.Image = My.Resources.Resources.export_icon - Me.ToolStripBtSendTo.ImageTransparentColor = Color.Magenta + 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 Size(23, 22) + Me.ToolStripBtSendTo.Size = New System.Drawing.Size(23, 22) Me.ToolStripBtSendTo.Text = "Send to Job Editor" Me.ToolStripBtSendTo.ToolTipText = "Send to Job Editor" ' 'ToolStripSeparator1 ' Me.ToolStripSeparator1.Name = "ToolStripSeparator1" - Me.ToolStripSeparator1.Size = New Size(6, 25) + Me.ToolStripSeparator1.Size = New System.Drawing.Size(6, 25) ' 'ToolStripButton1 ' - Me.ToolStripButton1.DisplayStyle = ToolStripItemDisplayStyle.Image - Me.ToolStripButton1.Image = My.Resources.Resources.Help_icon - Me.ToolStripButton1.ImageTransparentColor = Color.Magenta + 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 Size(23, 22) + Me.ToolStripButton1.Size = New System.Drawing.Size(23, 22) Me.ToolStripButton1.Text = "Help" ' 'StatusStrip1 ' - Me.StatusStrip1.Items.AddRange(New ToolStripItem() {Me.LbStatus}) - Me.StatusStrip1.Location = New Point(0, 684) + Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.LbStatus}) + Me.StatusStrip1.Location = New System.Drawing.Point(0, 684) Me.StatusStrip1.Name = "StatusStrip1" - Me.StatusStrip1.Size = New Size(877, 22) + Me.StatusStrip1.Size = New System.Drawing.Size(877, 22) Me.StatusStrip1.SizingGrip = False Me.StatusStrip1.TabIndex = 37 Me.StatusStrip1.Text = "StatusStrip1" @@ -229,51 +228,51 @@ Partial Class GearboxForm 'LbStatus ' Me.LbStatus.Name = "LbStatus" - Me.LbStatus.Size = New Size(39, 17) + Me.LbStatus.Size = New System.Drawing.Size(39, 17) Me.LbStatus.Text = "Status" ' 'ButCancel ' - Me.ButCancel.Anchor = CType((AnchorStyles.Bottom Or AnchorStyles.Right), AnchorStyles) - Me.ButCancel.DialogResult = DialogResult.Cancel - Me.ButCancel.Location = New Point(790, 658) + 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(790, 658) Me.ButCancel.Name = "ButCancel" - Me.ButCancel.Size = New Size(75, 23) + Me.ButCancel.Size = New System.Drawing.Size(75, 23) Me.ButCancel.TabIndex = 7 Me.ButCancel.Text = "Cancel" Me.ButCancel.UseVisualStyleBackColor = True ' 'ButOK ' - Me.ButOK.Anchor = CType((AnchorStyles.Bottom Or AnchorStyles.Right), AnchorStyles) - Me.ButOK.Location = New Point(709, 658) + 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(709, 658) Me.ButOK.Name = "ButOK" - Me.ButOK.Size = New Size(75, 23) + Me.ButOK.Size = New System.Drawing.Size(75, 23) Me.ButOK.TabIndex = 6 Me.ButOK.Text = "Save" Me.ButOK.UseVisualStyleBackColor = True ' 'TbTracInt ' - Me.TbTracInt.Location = New Point(303, 3) + Me.TbTracInt.Location = New System.Drawing.Point(303, 3) Me.TbTracInt.Name = "TbTracInt" - Me.TbTracInt.Size = New Size(40, 20) + Me.TbTracInt.Size = New System.Drawing.Size(40, 20) Me.TbTracInt.TabIndex = 1 ' 'LvGears ' - Me.LvGears.Columns.AddRange(New ColumnHeader() {Me.ColumnHeader1, Me.ColumnHeader2, Me.ColumnHeader3, Me.ColumnHeader5, Me.ColumnHeader6}) + Me.LvGears.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1, Me.ColumnHeader2, Me.ColumnHeader3, Me.ColumnHeader5, Me.ColumnHeader6}) Me.LvGears.FullRowSelect = True Me.LvGears.GridLines = True Me.LvGears.HideSelection = False - Me.LvGears.Location = New Point(6, 18) + Me.LvGears.Location = New System.Drawing.Point(6, 18) Me.LvGears.MultiSelect = False Me.LvGears.Name = "LvGears" - Me.LvGears.Size = New Size(429, 183) + Me.LvGears.Size = New System.Drawing.Size(429, 183) Me.LvGears.TabIndex = 0 Me.LvGears.TabStop = False Me.LvGears.UseCompatibleStateImageBehavior = False - Me.LvGears.View = View.Details + Me.LvGears.View = System.Windows.Forms.View.Details ' 'ColumnHeader1 ' @@ -302,79 +301,79 @@ Partial Class GearboxForm ' 'TBI_getr ' - Me.TBI_getr.Location = New Point(53, 3) + Me.TBI_getr.Location = New System.Drawing.Point(53, 3) Me.TBI_getr.Name = "TBI_getr" - Me.TBI_getr.Size = New Size(57, 20) + Me.TBI_getr.Size = New System.Drawing.Size(57, 20) Me.TBI_getr.TabIndex = 0 ' 'Label49 ' Me.Label49.AutoSize = True - Me.Label49.Location = New Point(349, 6) + Me.Label49.Location = New System.Drawing.Point(349, 6) Me.Label49.Name = "Label49" - Me.Label49.Size = New Size(18, 13) + Me.Label49.Size = New System.Drawing.Size(18, 13) Me.Label49.TabIndex = 2 Me.Label49.Text = "[s]" ' 'Label33 ' Me.Label33.AutoSize = True - Me.Label33.Location = New Point(116, 6) + Me.Label33.Location = New System.Drawing.Point(116, 6) Me.Label33.Name = "Label33" - Me.Label33.Size = New Size(36, 13) + Me.Label33.Size = New System.Drawing.Size(36, 13) Me.Label33.TabIndex = 2 Me.Label33.Text = "[kgm²]" ' 'Label48 ' Me.Label48.AutoSize = True - Me.Label48.Location = New Point(195, 6) + Me.Label48.Location = New System.Drawing.Point(195, 6) Me.Label48.Name = "Label48" - Me.Label48.Size = New Size(102, 13) + Me.Label48.Size = New System.Drawing.Size(102, 13) Me.Label48.TabIndex = 2 Me.Label48.Text = "Traction Interruption" ' 'Label6 ' Me.Label6.AutoSize = True - Me.Label6.Location = New Point(11, 6) + Me.Label6.Location = New System.Drawing.Point(11, 6) Me.Label6.Name = "Label6" - Me.Label6.Size = New Size(36, 13) + Me.Label6.Size = New System.Drawing.Size(36, 13) Me.Label6.TabIndex = 2 Me.Label6.Text = "Inertia" ' 'Label3 ' Me.Label3.AutoSize = True - Me.Label3.Location = New Point(26, 85) + Me.Label3.Location = New System.Drawing.Point(26, 85) Me.Label3.Name = "Label3" - Me.Label3.Size = New Size(87, 13) + Me.Label3.Size = New System.Drawing.Size(87, 13) Me.Label3.TabIndex = 42 Me.Label3.Text = "Make and Model" ' 'TbName ' - Me.TbName.Location = New Point(119, 82) + Me.TbName.Location = New System.Drawing.Point(119, 82) Me.TbName.Name = "TbName" - Me.TbName.Size = New Size(334, 20) + Me.TbName.Size = New System.Drawing.Size(334, 20) Me.TbName.TabIndex = 0 ' 'PictureBox1 ' - Me.PictureBox1.BackColor = Color.White - Me.PictureBox1.Image = My.Resources.Resources.VECTO_GBX - Me.PictureBox1.Location = New Point(12, 28) + Me.PictureBox1.BackColor = System.Drawing.Color.White + Me.PictureBox1.Image = Global.TUGraz.VECTO.My.Resources.Resources.VECTO_GBX + Me.PictureBox1.Location = New System.Drawing.Point(12, 28) Me.PictureBox1.Name = "PictureBox1" - Me.PictureBox1.Size = New Size(441, 40) + Me.PictureBox1.Size = New System.Drawing.Size(441, 40) Me.PictureBox1.TabIndex = 43 Me.PictureBox1.TabStop = False ' 'BtRemGear ' - Me.BtRemGear.Image = My.Resources.Resources.minus_circle_icon - Me.BtRemGear.Location = New Point(30, 202) + Me.BtRemGear.Image = Global.TUGraz.VECTO.My.Resources.Resources.minus_circle_icon + Me.BtRemGear.Location = New System.Drawing.Point(30, 202) Me.BtRemGear.Name = "BtRemGear" - Me.BtRemGear.Size = New Size(24, 24) + Me.BtRemGear.Size = New System.Drawing.Size(24, 24) Me.BtRemGear.TabIndex = 2 Me.BtRemGear.UseVisualStyleBackColor = True ' @@ -388,9 +387,9 @@ Partial Class GearboxForm Me.GrGearShift.Controls.Add(Me.Label13) Me.GrGearShift.Controls.Add(Me.ChSkipGears) Me.GrGearShift.Controls.Add(Me.GroupBox2) - Me.GrGearShift.Location = New Point(12, 377) + Me.GrGearShift.Location = New System.Drawing.Point(12, 377) Me.GrGearShift.Name = "GrGearShift" - Me.GrGearShift.Size = New Size(441, 291) + Me.GrGearShift.Size = New System.Drawing.Size(441, 291) Me.GrGearShift.TabIndex = 3 Me.GrGearShift.TabStop = False Me.GrGearShift.Text = "Gear shift parameters" @@ -406,85 +405,85 @@ Partial Class GearboxForm Me.GroupBox1.Controls.Add(Me.Label21) Me.GroupBox1.Controls.Add(Me.Label20) Me.GroupBox1.Controls.Add(Me.Label19) - Me.GroupBox1.Location = New Point(6, 82) + Me.GroupBox1.Location = New System.Drawing.Point(6, 82) Me.GroupBox1.Name = "GroupBox1" - Me.GroupBox1.Size = New Size(429, 100) + Me.GroupBox1.Size = New System.Drawing.Size(429, 100) Me.GroupBox1.TabIndex = 10 Me.GroupBox1.TabStop = False Me.GroupBox1.Text = "Shift Strategy Parameters" ' 'tbUpshiftMinAcceleration ' - Me.tbUpshiftMinAcceleration.Location = New Point(209, 71) + Me.tbUpshiftMinAcceleration.Location = New System.Drawing.Point(209, 71) Me.tbUpshiftMinAcceleration.Name = "tbUpshiftMinAcceleration" - Me.tbUpshiftMinAcceleration.Size = New Size(57, 20) + Me.tbUpshiftMinAcceleration.Size = New System.Drawing.Size(57, 20) Me.tbUpshiftMinAcceleration.TabIndex = 8 ' 'tbUpshiftAfterDownshift ' - Me.tbUpshiftAfterDownshift.Location = New Point(209, 45) + Me.tbUpshiftAfterDownshift.Location = New System.Drawing.Point(209, 45) Me.tbUpshiftAfterDownshift.Name = "tbUpshiftAfterDownshift" - Me.tbUpshiftAfterDownshift.Size = New Size(57, 20) + Me.tbUpshiftAfterDownshift.Size = New System.Drawing.Size(57, 20) Me.tbUpshiftAfterDownshift.TabIndex = 7 ' 'tbDownshiftAfterUpshift ' - Me.tbDownshiftAfterUpshift.Location = New Point(209, 20) + Me.tbDownshiftAfterUpshift.Location = New System.Drawing.Point(209, 20) Me.tbDownshiftAfterUpshift.Name = "tbDownshiftAfterUpshift" - Me.tbDownshiftAfterUpshift.Size = New Size(57, 20) + Me.tbDownshiftAfterUpshift.Size = New System.Drawing.Size(57, 20) Me.tbDownshiftAfterUpshift.TabIndex = 6 ' 'Label24 ' Me.Label24.AutoSize = True - Me.Label24.Location = New Point(275, 74) + Me.Label24.Location = New System.Drawing.Point(275, 74) Me.Label24.Name = "Label24" - Me.Label24.Size = New Size(34, 13) + Me.Label24.Size = New System.Drawing.Size(34, 13) Me.Label24.TabIndex = 5 Me.Label24.Text = "[m/s²]" ' 'Label23 ' Me.Label23.AutoSize = True - Me.Label23.Location = New Point(275, 48) + Me.Label23.Location = New System.Drawing.Point(275, 48) Me.Label23.Name = "Label23" - Me.Label23.Size = New Size(18, 13) + Me.Label23.Size = New System.Drawing.Size(18, 13) Me.Label23.TabIndex = 4 Me.Label23.Text = "[s]" ' 'Label22 ' Me.Label22.AutoSize = True - Me.Label22.Location = New Point(275, 25) + Me.Label22.Location = New System.Drawing.Point(275, 25) Me.Label22.Name = "Label22" - Me.Label22.Size = New Size(18, 13) + Me.Label22.Size = New System.Drawing.Size(18, 13) Me.Label22.TabIndex = 3 Me.Label22.Text = "[s]" ' 'Label21 ' Me.Label21.AutoSize = True - Me.Label21.Location = New Point(20, 74) + Me.Label21.Location = New System.Drawing.Point(20, 74) Me.Label21.Name = "Label21" - Me.Label21.Size = New Size(146, 13) + Me.Label21.Size = New System.Drawing.Size(146, 13) Me.Label21.TabIndex = 2 Me.Label21.Text = "Min. acceleration after upshift" ' 'Label20 ' Me.Label20.AutoSize = True - Me.Label20.Location = New Point(20, 48) + Me.Label20.Location = New System.Drawing.Point(20, 48) Me.Label20.Name = "Label20" - Me.Label20.Size = New Size(137, 13) + Me.Label20.Size = New System.Drawing.Size(137, 13) Me.Label20.TabIndex = 1 Me.Label20.Text = "Upshift afer downshift delay" ' 'Label19 ' Me.Label19.AutoSize = True - Me.Label19.Location = New Point(20, 25) + Me.Label19.Location = New System.Drawing.Point(20, 25) Me.Label19.Name = "Label19" - Me.Label19.Size = New Size(137, 13) + Me.Label19.Size = New System.Drawing.Size(137, 13) Me.Label19.TabIndex = 0 Me.Label19.Text = "Downshift afer upshift delay" ' @@ -493,82 +492,82 @@ Partial Class GearboxForm Me.PnTorqRes.Controls.Add(Me.Label2) Me.PnTorqRes.Controls.Add(Me.Label4) Me.PnTorqRes.Controls.Add(Me.TbTqResv) - Me.PnTorqRes.Location = New Point(230, 19) + Me.PnTorqRes.Location = New System.Drawing.Point(230, 19) Me.PnTorqRes.Name = "PnTorqRes" - Me.PnTorqRes.Size = New Size(190, 32) + Me.PnTorqRes.Size = New System.Drawing.Size(190, 32) Me.PnTorqRes.TabIndex = 2 ' 'Label2 ' - Me.Label2.Anchor = CType((AnchorStyles.Top Or AnchorStyles.Right), AnchorStyles) + Me.Label2.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Label2.AutoSize = True - Me.Label2.Location = New Point(10, 9) + Me.Label2.Location = New System.Drawing.Point(10, 9) Me.Label2.Name = "Label2" - Me.Label2.Size = New Size(79, 13) + Me.Label2.Size = New System.Drawing.Size(79, 13) Me.Label2.TabIndex = 0 Me.Label2.Text = "Torque reserve" ' 'Label4 ' - Me.Label4.Anchor = CType((AnchorStyles.Top Or AnchorStyles.Right), AnchorStyles) + Me.Label4.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Label4.AutoSize = True - Me.Label4.Location = New Point(158, 9) + Me.Label4.Location = New System.Drawing.Point(158, 9) Me.Label4.Name = "Label4" - Me.Label4.Size = New Size(21, 13) + Me.Label4.Size = New System.Drawing.Size(21, 13) Me.Label4.TabIndex = 0 Me.Label4.Text = "[%]" ' 'TbTqResv ' - Me.TbTqResv.Anchor = CType((AnchorStyles.Top Or AnchorStyles.Right), AnchorStyles) - Me.TbTqResv.Location = New Point(95, 6) + Me.TbTqResv.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.TbTqResv.Location = New System.Drawing.Point(95, 6) Me.TbTqResv.Name = "TbTqResv" - Me.TbTqResv.Size = New Size(57, 20) + Me.TbTqResv.Size = New System.Drawing.Size(57, 20) Me.TbTqResv.TabIndex = 0 ' 'ChShiftInside ' Me.ChShiftInside.AutoSize = True Me.ChShiftInside.Checked = True - Me.ChShiftInside.CheckState = CheckState.Checked - Me.ChShiftInside.Location = New Point(9, 27) + Me.ChShiftInside.CheckState = System.Windows.Forms.CheckState.Checked + Me.ChShiftInside.Location = New System.Drawing.Point(9, 27) Me.ChShiftInside.Name = "ChShiftInside" - Me.ChShiftInside.Size = New Size(195, 17) + Me.ChShiftInside.Size = New System.Drawing.Size(195, 17) Me.ChShiftInside.TabIndex = 0 Me.ChShiftInside.Text = "Allow shift-up inside polygons (AMT)" Me.ChShiftInside.UseVisualStyleBackColor = True ' 'TbShiftTime ' - Me.TbShiftTime.Location = New Point(325, 51) + Me.TbShiftTime.Location = New System.Drawing.Point(325, 51) Me.TbShiftTime.Name = "TbShiftTime" - Me.TbShiftTime.Size = New Size(57, 20) + Me.TbShiftTime.Size = New System.Drawing.Size(57, 20) Me.TbShiftTime.TabIndex = 3 ' 'Label12 ' Me.Label12.AutoSize = True - Me.Label12.Location = New Point(388, 54) + Me.Label12.Location = New System.Drawing.Point(388, 54) Me.Label12.Name = "Label12" - Me.Label12.Size = New Size(18, 13) + Me.Label12.Size = New System.Drawing.Size(18, 13) Me.Label12.TabIndex = 9 Me.Label12.Text = "[s]" ' 'Label13 ' Me.Label13.AutoSize = True - Me.Label13.Location = New Point(227, 54) + Me.Label13.Location = New System.Drawing.Point(227, 54) Me.Label13.Name = "Label13" - Me.Label13.Size = New Size(92, 13) + Me.Label13.Size = New System.Drawing.Size(92, 13) Me.Label13.TabIndex = 8 Me.Label13.Text = "Minimum shift time" ' 'ChSkipGears ' Me.ChSkipGears.AutoSize = True - Me.ChSkipGears.Location = New Point(9, 53) + Me.ChSkipGears.Location = New System.Drawing.Point(9, 53) Me.ChSkipGears.Name = "ChSkipGears" - Me.ChSkipGears.Size = New Size(132, 17) + Me.ChSkipGears.Size = New System.Drawing.Size(132, 17) Me.ChSkipGears.TabIndex = 1 Me.ChSkipGears.Text = "Skip Gears (MT, AMT)" Me.ChSkipGears.UseVisualStyleBackColor = True @@ -584,123 +583,151 @@ Partial Class GearboxForm Me.GroupBox2.Controls.Add(Me.Label8) Me.GroupBox2.Controls.Add(Me.Label5) Me.GroupBox2.Controls.Add(Me.Label7) - Me.GroupBox2.Location = New Point(6, 186) + Me.GroupBox2.Location = New System.Drawing.Point(6, 186) Me.GroupBox2.Name = "GroupBox2" - Me.GroupBox2.Size = New Size(429, 99) + Me.GroupBox2.Size = New System.Drawing.Size(429, 99) Me.GroupBox2.TabIndex = 4 Me.GroupBox2.TabStop = False Me.GroupBox2.Text = "Start Gear" ' 'TbStartAcc ' - Me.TbStartAcc.Location = New Point(209, 71) + Me.TbStartAcc.Location = New System.Drawing.Point(209, 71) Me.TbStartAcc.Name = "TbStartAcc" - Me.TbStartAcc.Size = New Size(57, 20) + Me.TbStartAcc.Size = New System.Drawing.Size(57, 20) Me.TbStartAcc.TabIndex = 2 ' 'Label11 ' Me.Label11.AutoSize = True - Me.Label11.Location = New Point(20, 74) + Me.Label11.Location = New System.Drawing.Point(20, 74) Me.Label11.Name = "Label11" - Me.Label11.Size = New Size(173, 13) + Me.Label11.Size = New System.Drawing.Size(173, 13) Me.Label11.TabIndex = 0 Me.Label11.Text = "Reference acceleration at clutch-in" ' 'TbStartSpeed ' - Me.TbStartSpeed.Location = New Point(209, 45) + Me.TbStartSpeed.Location = New System.Drawing.Point(209, 45) Me.TbStartSpeed.Name = "TbStartSpeed" - Me.TbStartSpeed.Size = New Size(57, 20) + Me.TbStartSpeed.Size = New System.Drawing.Size(57, 20) Me.TbStartSpeed.TabIndex = 1 ' 'Label9 ' Me.Label9.AutoSize = True - Me.Label9.Location = New Point(20, 48) + Me.Label9.Location = New System.Drawing.Point(20, 48) Me.Label9.Name = "Label9" - Me.Label9.Size = New Size(181, 13) + Me.Label9.Size = New System.Drawing.Size(181, 13) Me.Label9.TabIndex = 0 Me.Label9.Text = "Reference vehicle speed at clutch-in" ' 'Label10 ' Me.Label10.AutoSize = True - Me.Label10.Location = New Point(272, 74) + Me.Label10.Location = New System.Drawing.Point(272, 74) Me.Label10.Name = "Label10" - Me.Label10.Size = New Size(34, 13) + Me.Label10.Size = New System.Drawing.Size(34, 13) Me.Label10.TabIndex = 0 Me.Label10.Text = "[m/s²]" ' 'TbTqResvStart ' - Me.TbTqResvStart.Location = New Point(209, 19) + Me.TbTqResvStart.Location = New System.Drawing.Point(209, 19) Me.TbTqResvStart.Name = "TbTqResvStart" - Me.TbTqResvStart.Size = New Size(57, 20) + Me.TbTqResvStart.Size = New System.Drawing.Size(57, 20) Me.TbTqResvStart.TabIndex = 0 ' 'Label8 ' Me.Label8.AutoSize = True - Me.Label8.Location = New Point(272, 48) + Me.Label8.Location = New System.Drawing.Point(272, 48) Me.Label8.Name = "Label8" - Me.Label8.Size = New Size(31, 13) + Me.Label8.Size = New System.Drawing.Size(31, 13) Me.Label8.TabIndex = 0 Me.Label8.Text = "[m/s]" ' 'Label5 ' Me.Label5.AutoSize = True - Me.Label5.Location = New Point(20, 22) + Me.Label5.Location = New System.Drawing.Point(20, 22) Me.Label5.Name = "Label5" - Me.Label5.Size = New Size(79, 13) + Me.Label5.Size = New System.Drawing.Size(79, 13) Me.Label5.TabIndex = 0 Me.Label5.Text = "Torque reserve" ' 'Label7 ' Me.Label7.AutoSize = True - Me.Label7.Location = New Point(272, 22) + Me.Label7.Location = New System.Drawing.Point(272, 22) Me.Label7.Name = "Label7" - Me.Label7.Size = New Size(21, 13) + Me.Label7.Size = New System.Drawing.Size(21, 13) Me.Label7.TabIndex = 0 Me.Label7.Text = "[%]" ' 'CmOpenFile ' - Me.CmOpenFile.Items.AddRange(New ToolStripItem() {Me.OpenWithToolStripMenuItem, Me.ShowInFolderToolStripMenuItem}) + Me.CmOpenFile.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.OpenWithToolStripMenuItem, Me.ShowInFolderToolStripMenuItem}) Me.CmOpenFile.Name = "CmOpenFile" - Me.CmOpenFile.Size = New Size(153, 48) + Me.CmOpenFile.Size = New System.Drawing.Size(153, 48) ' 'OpenWithToolStripMenuItem ' Me.OpenWithToolStripMenuItem.Name = "OpenWithToolStripMenuItem" - Me.OpenWithToolStripMenuItem.Size = New Size(152, 22) + Me.OpenWithToolStripMenuItem.Size = New System.Drawing.Size(152, 22) Me.OpenWithToolStripMenuItem.Text = "Open with ..." ' 'ShowInFolderToolStripMenuItem ' Me.ShowInFolderToolStripMenuItem.Name = "ShowInFolderToolStripMenuItem" - Me.ShowInFolderToolStripMenuItem.Size = New Size(152, 22) + Me.ShowInFolderToolStripMenuItem.Size = New System.Drawing.Size(152, 22) Me.ShowInFolderToolStripMenuItem.Text = "Show in Folder" ' 'GroupBox3 ' - Me.GroupBox3.Controls.Add(Me.BtTCShiftFileBrowse) - Me.GroupBox3.Controls.Add(Me.LblTCShiftFile) - Me.GroupBox3.Controls.Add(Me.TBTCShiftPolygon) Me.GroupBox3.Controls.Add(Me.PnTC) - Me.GroupBox3.Controls.Add(Me.ChTCon) - Me.GroupBox3.Location = New Point(459, 440) + Me.GroupBox3.Location = New System.Drawing.Point(459, 440) Me.GroupBox3.Name = "GroupBox3" - Me.GroupBox3.Size = New Size(414, 162) + Me.GroupBox3.Size = New System.Drawing.Size(414, 162) Me.GroupBox3.TabIndex = 5 Me.GroupBox3.TabStop = False Me.GroupBox3.Text = "Torque Converter" ' + 'BtTCShiftFileBrowse + ' + Me.BtTCShiftFileBrowse.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.BtTCShiftFileBrowse.Image = Global.TUGraz.VECTO.My.Resources.Resources.Open_icon + Me.BtTCShiftFileBrowse.Location = New System.Drawing.Point(353, 104) + Me.BtTCShiftFileBrowse.Name = "BtTCShiftFileBrowse" + Me.BtTCShiftFileBrowse.Size = New System.Drawing.Size(24, 24) + Me.BtTCShiftFileBrowse.TabIndex = 5 + Me.BtTCShiftFileBrowse.TabStop = False + Me.BtTCShiftFileBrowse.UseVisualStyleBackColor = True + ' + 'LblTCShiftFile + ' + Me.LblTCShiftFile.AutoSize = True + Me.LblTCShiftFile.Location = New System.Drawing.Point(5, 78) + Me.LblTCShiftFile.Name = "LblTCShiftFile" + Me.LblTCShiftFile.Size = New System.Drawing.Size(172, 13) + Me.LblTCShiftFile.TabIndex = 5 + Me.LblTCShiftFile.Text = "Torque converter shift polygons file" + ' + 'TBTCShiftPolygon + ' + Me.TBTCShiftPolygon.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.TBTCShiftPolygon.Location = New System.Drawing.Point(4, 104) + Me.TBTCShiftPolygon.Name = "TBTCShiftPolygon" + Me.TBTCShiftPolygon.Size = New System.Drawing.Size(343, 20) + Me.TBTCShiftPolygon.TabIndex = 37 + ' 'PnTC ' + Me.PnTC.Controls.Add(Me.BtTCShiftFileBrowse) Me.PnTC.Controls.Add(Me.Label17) + Me.PnTC.Controls.Add(Me.TBTCShiftPolygon) + Me.PnTC.Controls.Add(Me.LblTCShiftFile) Me.PnTC.Controls.Add(Me.Label18) Me.PnTC.Controls.Add(Me.Label15) Me.PnTC.Controls.Add(Me.TbTCinertia) @@ -710,140 +737,128 @@ Partial Class GearboxForm Me.PnTC.Controls.Add(Me.TbTCfile) Me.PnTC.Controls.Add(Me.BtTCfileOpen) Me.PnTC.Controls.Add(Me.TbTCrefrpm) - Me.PnTC.Location = New Point(6, 39) + Me.PnTC.Location = New System.Drawing.Point(6, 19) Me.PnTC.Name = "PnTC" - Me.PnTC.Size = New Size(402, 72) + Me.PnTC.Size = New System.Drawing.Size(402, 137) Me.PnTC.TabIndex = 36 ' 'Label17 ' Me.Label17.AutoSize = True - Me.Label17.Location = New Point(0, 5) + Me.Label17.Location = New System.Drawing.Point(0, 5) Me.Label17.Name = "Label17" - Me.Label17.Size = New Size(176, 13) + Me.Label17.Size = New System.Drawing.Size(176, 13) Me.Label17.TabIndex = 0 Me.Label17.Text = "Torque converter characteristics file" ' 'Label18 ' Me.Label18.AutoSize = True - Me.Label18.Location = New Point(5, 50) + Me.Label18.Location = New System.Drawing.Point(5, 50) Me.Label18.Name = "Label18" - Me.Label18.Size = New Size(36, 13) + Me.Label18.Size = New System.Drawing.Size(36, 13) Me.Label18.TabIndex = 2 Me.Label18.Text = "Inertia" ' 'Label15 ' - Me.Label15.Anchor = CType((AnchorStyles.Top Or AnchorStyles.Right), AnchorStyles) + Me.Label15.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Label15.AutoSize = True - Me.Label15.Location = New Point(185, 50) + Me.Label15.Location = New System.Drawing.Point(185, 50) Me.Label15.Name = "Label15" - Me.Label15.Size = New Size(77, 13) + Me.Label15.Size = New System.Drawing.Size(77, 13) Me.Label15.TabIndex = 0 Me.Label15.Text = "Reference rpm" ' 'TbTCinertia ' - Me.TbTCinertia.Location = New Point(47, 47) + Me.TbTCinertia.Location = New System.Drawing.Point(47, 47) Me.TbTCinertia.Name = "TbTCinertia" - Me.TbTCinertia.Size = New Size(67, 20) + Me.TbTCinertia.Size = New System.Drawing.Size(67, 20) Me.TbTCinertia.TabIndex = 3 ' 'Label1 ' Me.Label1.AutoSize = True - Me.Label1.Location = New Point(120, 50) + Me.Label1.Location = New System.Drawing.Point(120, 50) Me.Label1.Name = "Label1" - Me.Label1.Size = New Size(36, 13) + Me.Label1.Size = New System.Drawing.Size(36, 13) Me.Label1.TabIndex = 2 Me.Label1.Text = "[kgm²]" ' 'Label14 ' - Me.Label14.Anchor = CType((AnchorStyles.Top Or AnchorStyles.Right), AnchorStyles) + Me.Label14.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Label14.AutoSize = True - Me.Label14.Location = New Point(341, 50) + Me.Label14.Location = New System.Drawing.Point(341, 50) Me.Label14.Name = "Label14" - Me.Label14.Size = New Size(40, 13) + Me.Label14.Size = New System.Drawing.Size(40, 13) Me.Label14.TabIndex = 0 Me.Label14.Text = "[1/min]" ' 'BtTCfileBrowse ' - Me.BtTCfileBrowse.Anchor = CType((AnchorStyles.Top Or AnchorStyles.Right), AnchorStyles) - Me.BtTCfileBrowse.Image = My.Resources.Resources.Open_icon - Me.BtTCfileBrowse.Location = New Point(348, 19) + Me.BtTCfileBrowse.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.BtTCfileBrowse.Image = Global.TUGraz.VECTO.My.Resources.Resources.Open_icon + Me.BtTCfileBrowse.Location = New System.Drawing.Point(348, 19) Me.BtTCfileBrowse.Name = "BtTCfileBrowse" - Me.BtTCfileBrowse.Size = New Size(24, 24) + Me.BtTCfileBrowse.Size = New System.Drawing.Size(24, 24) Me.BtTCfileBrowse.TabIndex = 1 Me.BtTCfileBrowse.TabStop = False Me.BtTCfileBrowse.UseVisualStyleBackColor = True ' 'TbTCfile ' - Me.TbTCfile.Anchor = CType(((AnchorStyles.Top Or AnchorStyles.Left) _ - Or AnchorStyles.Right), AnchorStyles) - Me.TbTCfile.Location = New Point(4, 21) + Me.TbTCfile.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.TbTCfile.Location = New System.Drawing.Point(4, 21) Me.TbTCfile.Name = "TbTCfile" - Me.TbTCfile.Size = New Size(343, 20) + Me.TbTCfile.Size = New System.Drawing.Size(343, 20) Me.TbTCfile.TabIndex = 0 ' 'BtTCfileOpen ' - Me.BtTCfileOpen.Anchor = CType((AnchorStyles.Top Or AnchorStyles.Right), AnchorStyles) - Me.BtTCfileOpen.Image = My.Resources.Resources.application_export_icon_small - Me.BtTCfileOpen.Location = New Point(372, 19) + Me.BtTCfileOpen.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.BtTCfileOpen.Image = Global.TUGraz.VECTO.My.Resources.Resources.application_export_icon_small + Me.BtTCfileOpen.Location = New System.Drawing.Point(372, 19) Me.BtTCfileOpen.Name = "BtTCfileOpen" - Me.BtTCfileOpen.Size = New Size(24, 24) + Me.BtTCfileOpen.Size = New System.Drawing.Size(24, 24) Me.BtTCfileOpen.TabIndex = 2 Me.BtTCfileOpen.TabStop = False Me.BtTCfileOpen.UseVisualStyleBackColor = True ' 'TbTCrefrpm ' - Me.TbTCrefrpm.Anchor = CType((AnchorStyles.Top Or AnchorStyles.Right), AnchorStyles) - Me.TbTCrefrpm.Location = New Point(268, 47) + Me.TbTCrefrpm.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.TbTCrefrpm.Location = New System.Drawing.Point(268, 47) Me.TbTCrefrpm.Name = "TbTCrefrpm" - Me.TbTCrefrpm.Size = New Size(67, 20) + Me.TbTCrefrpm.Size = New System.Drawing.Size(67, 20) Me.TbTCrefrpm.TabIndex = 4 ' - 'ChTCon - ' - Me.ChTCon.AutoSize = True - Me.ChTCon.Checked = True - Me.ChTCon.CheckState = CheckState.Checked - Me.ChTCon.Location = New Point(9, 19) - Me.ChTCon.Name = "ChTCon" - Me.ChTCon.Size = New Size(88, 17) - Me.ChTCon.TabIndex = 0 - Me.ChTCon.Text = "Installed (AT)" - Me.ChTCon.UseVisualStyleBackColor = True - ' 'Label16 ' Me.Label16.AutoSize = True - Me.Label16.Location = New Point(18, 111) + Me.Label16.Location = New System.Drawing.Point(18, 111) Me.Label16.Name = "Label16" - Me.Label16.Size = New Size(95, 13) + Me.Label16.Size = New System.Drawing.Size(95, 13) Me.Label16.TabIndex = 45 Me.Label16.Text = "Transmission Type" ' 'CbGStype ' - Me.CbGStype.DropDownStyle = ComboBoxStyle.DropDownList + Me.CbGStype.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.CbGStype.FormattingEnabled = True - Me.CbGStype.Location = New Point(119, 108) + Me.CbGStype.Location = New System.Drawing.Point(119, 108) Me.CbGStype.Name = "CbGStype" - Me.CbGStype.Size = New Size(227, 21) + Me.CbGStype.Size = New System.Drawing.Size(227, 21) Me.CbGStype.TabIndex = 1 ' 'BtAddGear ' - Me.BtAddGear.Image = My.Resources.Resources.plus_circle_icon - Me.BtAddGear.Location = New Point(6, 202) + Me.BtAddGear.Image = Global.TUGraz.VECTO.My.Resources.Resources.plus_circle_icon + Me.BtAddGear.Location = New System.Drawing.Point(6, 202) Me.BtAddGear.Name = "BtAddGear" - Me.BtAddGear.Size = New Size(24, 24) + Me.BtAddGear.Size = New System.Drawing.Size(24, 24) Me.BtAddGear.TabIndex = 1 Me.BtAddGear.UseVisualStyleBackColor = True ' @@ -853,9 +868,9 @@ Partial Class GearboxForm Me.GroupBox4.Controls.Add(Me.LvGears) Me.GroupBox4.Controls.Add(Me.BtRemGear) Me.GroupBox4.Controls.Add(Me.BtAddGear) - Me.GroupBox4.Location = New Point(12, 135) + Me.GroupBox4.Location = New System.Drawing.Point(12, 135) Me.GroupBox4.Name = "GroupBox4" - Me.GroupBox4.Size = New Size(441, 232) + Me.GroupBox4.Size = New System.Drawing.Size(441, 232) Me.GroupBox4.TabIndex = 2 Me.GroupBox4.TabStop = False Me.GroupBox4.Text = "Gears" @@ -863,9 +878,9 @@ Partial Class GearboxForm 'Label32 ' Me.Label32.AutoSize = True - Me.Label32.Location = New Point(331, 202) + Me.Label32.Location = New System.Drawing.Point(331, 202) Me.Label32.Name = "Label32" - Me.Label32.Size = New Size(106, 13) + Me.Label32.Size = New System.Drawing.Size(106, 13) Me.Label32.TabIndex = 3 Me.Label32.Text = "(Double-Click to Edit)" ' @@ -877,56 +892,25 @@ Partial Class GearboxForm Me.PnInertiaTI.Controls.Add(Me.Label48) Me.PnInertiaTI.Controls.Add(Me.Label49) Me.PnInertiaTI.Controls.Add(Me.TbTracInt) - Me.PnInertiaTI.Location = New Point(469, 406) + Me.PnInertiaTI.Location = New System.Drawing.Point(469, 406) Me.PnInertiaTI.Name = "PnInertiaTI" - Me.PnInertiaTI.Size = New Size(398, 30) + Me.PnInertiaTI.Size = New System.Drawing.Size(398, 30) Me.PnInertiaTI.TabIndex = 4 ' 'PicBox ' - Me.PicBox.BackColor = Color.LightGray - Me.PicBox.Location = New Point(459, 28) + Me.PicBox.BackColor = System.Drawing.Color.LightGray + Me.PicBox.Location = New System.Drawing.Point(459, 28) Me.PicBox.Name = "PicBox" - Me.PicBox.Size = New Size(406, 372) + Me.PicBox.Size = New System.Drawing.Size(406, 372) Me.PicBox.TabIndex = 48 Me.PicBox.TabStop = False ' - 'TBTCShiftPolygon - ' - Me.TBTCShiftPolygon.Anchor = CType(((AnchorStyles.Top Or AnchorStyles.Left) _ - Or AnchorStyles.Right), AnchorStyles) - Me.TBTCShiftPolygon.Location = New Point(10, 136) - Me.TBTCShiftPolygon.Name = "TBTCShiftPolygon" - Me.TBTCShiftPolygon.Size = New Size(343, 20) - Me.TBTCShiftPolygon.TabIndex = 37 - ' - 'LblTCShiftFile - ' - Me.LblTCShiftFile.AutoSize = True - Me.LblTCShiftFile.Location = New Point(7, 120) - Me.LblTCShiftFile.Name = "LblTCShiftFile" - Me.LblTCShiftFile.Size = New Size(172, 13) - Me.LblTCShiftFile.TabIndex = 5 - Me.LblTCShiftFile.Text = "Torque converter shift polygons file" - ' - 'BtTCShiftFileBrowse - ' - Me.BtTCShiftFileBrowse.Anchor = CType((AnchorStyles.Top Or AnchorStyles.Right), AnchorStyles) - Me.BtTCShiftFileBrowse.Image = My.Resources.Resources.Open_icon - Me.BtTCShiftFileBrowse.Location = New Point(354, 134) - Me.BtTCShiftFileBrowse.Name = "BtTCShiftFileBrowse" - Me.BtTCShiftFileBrowse.Size = New Size(24, 24) - Me.BtTCShiftFileBrowse.TabIndex = 5 - Me.BtTCShiftFileBrowse.TabStop = False - Me.BtTCShiftFileBrowse.UseVisualStyleBackColor = True - ' - 'F_GBX + 'GearboxForm ' Me.AcceptButton = Me.ButOK - Me.AutoScaleDimensions = New SizeF(6.0!, 13.0!) - Me.AutoScaleMode = AutoScaleMode.Font Me.CancelButton = Me.ButCancel - Me.ClientSize = New Size(877, 706) + Me.ClientSize = New System.Drawing.Size(877, 706) Me.Controls.Add(Me.PicBox) Me.Controls.Add(Me.PnInertiaTI) Me.Controls.Add(Me.GroupBox4) @@ -941,17 +925,16 @@ Partial Class GearboxForm Me.Controls.Add(Me.ButOK) Me.Controls.Add(Me.StatusStrip1) Me.Controls.Add(Me.ToolStrip1) - Me.FormBorderStyle = FormBorderStyle.FixedSingle - Me.Icon = CType(resources.GetObject("$this.Icon"), Icon) + Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.MaximizeBox = False Me.Name = "GearboxForm" - Me.StartPosition = FormStartPosition.CenterParent + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent Me.Text = "F_GBX" Me.ToolStrip1.ResumeLayout(False) Me.ToolStrip1.PerformLayout() Me.StatusStrip1.ResumeLayout(False) Me.StatusStrip1.PerformLayout() - CType(Me.PictureBox1, ISupportInitialize).EndInit() + CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() Me.GrGearShift.ResumeLayout(False) Me.GrGearShift.PerformLayout() Me.GroupBox1.ResumeLayout(False) @@ -962,14 +945,13 @@ Partial Class GearboxForm Me.GroupBox2.PerformLayout() Me.CmOpenFile.ResumeLayout(False) Me.GroupBox3.ResumeLayout(False) - Me.GroupBox3.PerformLayout() Me.PnTC.ResumeLayout(False) Me.PnTC.PerformLayout() Me.GroupBox4.ResumeLayout(False) Me.GroupBox4.PerformLayout() Me.PnInertiaTI.ResumeLayout(False) Me.PnInertiaTI.PerformLayout() - CType(Me.PicBox, ISupportInitialize).EndInit() + CType(Me.PicBox, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() @@ -1025,7 +1007,6 @@ Partial Class GearboxForm Friend WithEvents ShowInFolderToolStripMenuItem As ToolStripMenuItem Friend WithEvents GroupBox3 As GroupBox Friend WithEvents TbTCfile As TextBox - Friend WithEvents ChTCon As CheckBox Friend WithEvents BtTCfileBrowse As Button Friend WithEvents BtTCfileOpen As Button Friend WithEvents TbTCrefrpm As TextBox diff --git a/VECTO/GUI/GearboxForm.vb b/VECTO/GUI/GearboxForm.vb index d246fe834aaf3d8ea101cdfbbcc1e4d800e78b5d..d2cfded1da87282eb9a8b18f99da2d2c5d2f1609 100644 --- a/VECTO/GUI/GearboxForm.vb +++ b/VECTO/GUI/GearboxForm.vb @@ -63,7 +63,7 @@ Public Class GearboxForm PnInertiaTI.Enabled = Not Cfg.DeclMode GrGearShift.Enabled = Not Cfg.DeclMode - ChTCon.Enabled = Not Cfg.DeclMode + 'ChTCon.Enabled = Not Cfg.DeclMode CbGStype.Items.Clear() CbGStype.ValueMember = "Value" @@ -112,6 +112,7 @@ Public Class GearboxForm tbDownshiftAfterUpshift.Text = DeclarationData.Gearbox.DownshiftAfterUpshiftDelay.Value() tbUpshiftAfterDownshift.Text = DeclarationData.Gearbox.UpshiftAfterDownshiftDelay.Value() + 'ChTCon.Checked = GStype.AutomaticTransmission() For Each lv0 In LvGears.Items lv0.SubItems(GearboxTbl.ShiftPolygons).Text = "-" Next @@ -155,7 +156,7 @@ Public Class GearboxForm VectoJobForm.WindowState = FormWindowState.Normal End If - VectoJobForm.TbGBX.Text = fFileWoDir(GbxFile, JobDir) + VectoJobForm.TbGBX.Text = GetFilenameWithoutDirectory(GbxFile, JobDir) End Sub 'Help @@ -180,7 +181,7 @@ Public Class GearboxForm If ChangeCheckCancel() Then Exit Sub - CbGStype.SelectedIndex = 0 + 'CbGStype.SelectedIndex = 0 TbName.Text = "" TbTracInt.Text = "" @@ -198,7 +199,7 @@ Public Class GearboxForm TbStartSpeed.Text = "" TbStartAcc.Text = "" - 'Me.ChTCon.Checked = False 'set by CbGStype.SelectedIndexChanged + 'ChTCon.Checked = False 'set by CbGStype.SelectedIndexChanged TbTCfile.Text = "" TbTCrefrpm.Text = "" TbTCinertia.Text = "" @@ -247,7 +248,7 @@ Public Class GearboxForm TbTracInt.Text = GBX0.TracIntrSi.ToString TBI_getr.Text = GBX0.GbxInertia.ToString - ChTCon.Checked = GBX0.TorqueConverterEnabled + 'ChTCon.Checked = GBX0.TorqueConverterEnabled LvGears.Items.Clear() @@ -255,7 +256,8 @@ Public Class GearboxForm If i = 0 Then 'lv0 = New ListViewItem("Axle") - LvGears.Items.Add(CreateListviewItem("Axle", "-", GBX0.GearRatios(i), GBX0.GearLossMap(i, True), GBX0.ShiftPolygonFile(i, True), + LvGears.Items.Add(CreateListviewItem("Axle", "-", GBX0.GearRatios(i), GBX0.GearLossMap(i, True), + GBX0.ShiftPolygonFile(i, True), GBX0.MaxTorque(i))) Else 'lv0 = New ListViewItem(i.ToString("00")) @@ -274,7 +276,7 @@ Public Class GearboxForm ChShiftInside.Checked = GBX0.ShiftInside TbTCfile.Text = GBX0.TorqueConverterFile(True) - TbTCrefrpm.Text = GBX0.TorqueConverterReferenceRPM + TbTCrefrpm.Text = GBX0.TorqueConverterReferenceRpm TbTCinertia.Text = GBX0.TorqueConverterInertia TBTCShiftPolygon.Text = GBX0.TorqueConverterShiftPolygonFile @@ -293,7 +295,7 @@ Public Class GearboxForm GearboxFileBrowser.UpdateHistory(file) - Text = fFILE(file, True) + Text = GetFilenameWithoutPath(file, True) LbStatus.Text = "" GbxFile = file Activate() @@ -361,9 +363,9 @@ Public Class GearboxForm GBX0.Type = CbGStype.SelectedValue - GBX0.TorqueConverterEnabled = ChTCon.Checked + GBX0.TorqueConverterEnabled = GBX0.Type.AutomaticTransmission() GBX0.TorqueConverterFile = TbTCfile.Text - GBX0.TorqueConverterReferenceRPM = fTextboxToNumString(TbTCrefrpm.Text) + GBX0.TorqueConverterReferenceRpm = fTextboxToNumString(TbTCrefrpm.Text) GBX0.TorqueConverterInertia = fTextboxToNumString(TbTCinertia.Text) GBX0.TorqueConverterShiftPolygonFile = TBTCShiftPolygon.Text @@ -378,13 +380,14 @@ Public Class GearboxForm If AutoSendTo Then If VectoJobForm.Visible Then - If UCase(fFileRepl(VectoJobForm.TbGBX.Text, JobDir)) <> UCase(file) Then VectoJobForm.TbGBX.Text = fFileWoDir(file, JobDir) + If UCase(fFileRepl(VectoJobForm.TbGBX.Text, JobDir)) <> UCase(file) Then _ + VectoJobForm.TbGBX.Text = GetFilenameWithoutDirectory(file, JobDir) VectoJobForm.UpdatePic() End If End If GearboxFileBrowser.UpdateHistory(file) - Text = fFILE(file, True) + Text = GetFilenameWithoutPath(file, True) LbStatus.Text = "" Changed = False @@ -510,7 +513,8 @@ Public Class GearboxForm ChShiftInside.Enabled = (GStype.EarlyShiftGears()) ChSkipGears.Enabled = (GStype.SkipGears()) - ChTCon.Enabled = (GStype.AutomaticTransmission()) + 'ChTCon.Enabled = (GStype.AutomaticTransmission()) + PnTC.Enabled = GStype.AutomaticTransmission() End Sub @@ -557,7 +561,7 @@ Public Class GearboxForm 'GearDia.ChIsTCgear.Enabled = (Me.ChTCon.Checked And Me.LvGears.SelectedIndices(0) > 0) GearDia.PnShiftPoly.Enabled = (Not Cfg.DeclMode And LvGears.SelectedIndices(0) > 0) GearDia.PnFld.Enabled = (LvGears.SelectedIndices(0) > 0) - GearDia.GbxPath = fPATH(GbxFile) + GearDia.GbxPath = GetPath(GbxFile) GearDia.TbGear.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.GearNr).Text GearDia.TbRatio.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.Ratio).Text GearDia.TbMapPath.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.LossMapEfficiency).Text @@ -723,11 +727,11 @@ Public Class GearboxForm If LvGears.Items.Count > 1 Then If LvGears.SelectedItems.Count > 0 AndAlso LvGears.SelectedIndices(0) > 0 Then - path = fFileRepl(LvGears.SelectedItems(0).SubItems(GearboxTbl.ShiftPolygons).Text, fPATH(GbxFile)) + path = fFileRepl(LvGears.SelectedItems(0).SubItems(GearboxTbl.ShiftPolygons).Text, GetPath(GbxFile)) 'fldpath = fFileRepl(LvGears.SelectedItems(0).SubItems(GearboxTbl.MaxTorque).Text, fPATH(GbxFile)) Gear = LvGears.SelectedIndices(0) Else - path = fFileRepl(LvGears.Items(1).SubItems(GearboxTbl.ShiftPolygons).Text, fPATH(GbxFile)) + path = fFileRepl(LvGears.Items(1).SubItems(GearboxTbl.ShiftPolygons).Text, GetPath(GbxFile)) 'fldpath = fFileRepl(Me.LvGears.Items(1).SubItems(GearboxTbl.MaxTorque).Text, fPATH(GbxFile)) Gear = 1 End If @@ -835,12 +839,9 @@ Public Class GearboxForm 'Dim fullLoadCurve As FullLoadCurve = ConvertToFullLoadCurve(FLD0.LnU, FLD0.LTq) Dim gears As IList(Of ITransmissionInputData) = ConvertToGears(LvGears.Items) - If (CType(CbGStype.SelectedValue, GearboxType).ManualTransmission() AndAlso gears.Count > 1) Then - Dim engine As CombustionEngineData = ConvertToEngineData(FLD0, VectoJobForm.n_idle) - Dim shiftLines As ShiftPolygon = DeclarationData.Gearbox.ComputeShiftPolygon(Gear - 1, engine.FullLoadCurve, gears, - engine, - Double.Parse(LvGears.Items(0).SubItems(GearboxTbl.Ratio).Text, CultureInfo.InvariantCulture), - (vehicle.DynamicTyreRadius / 1000.0).SI(Of Meter)) + Dim shiftLines As ShiftPolygon = GetShiftLines(FLD0, vehicle, gears, Gear) + If (CType(CbGStype.SelectedValue, GearboxType).ManualTransmission() AndAlso Not IsNothing(shiftLines)) Then + s = New Series @@ -907,6 +908,29 @@ Public Class GearboxForm End Sub + Private Function GetShiftLines(engineFullLoadCurve As EngineFullLoadCurve, vehicle As Vehicle, + gears As IList(Of ITransmissionInputData), gear As UInteger) As ShiftPolygon + Dim engine As CombustionEngineData = ConvertToEngineData(engineFullLoadCurve, VectoJobForm.n_idle) + If gears.Count <= 1 Then + Return Nothing + End If + Dim rDyn As Meter = (vehicle.DynamicTyreRadius / 1000.0).SI(Of Meter)() + If rDyn.IsEqual(0) Then + If (vehicle.Axles.Count < 2) Then + Return Nothing + End If + rDyn = DeclarationData.Wheels.Lookup(vehicle.Axles(1).Wheels).DynamicTyreRadius + End If + If (rDyn.IsEqual(0)) Then + Return Nothing + End If + Dim shiftLines As ShiftPolygon = DeclarationData.Gearbox.ComputeShiftPolygon(gear - 1, engine.FullLoadCurve, 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 @@ -927,38 +951,17 @@ Public Class GearboxForm #Region "Torque Converter" - 'TC on/off - Private Sub ChTCon_CheckedChanged(sender As Object, e As EventArgs) Handles ChTCon.CheckedChanged - Change() - CheckGearTC() - PnTC.Enabled = ChTCon.Checked - LblTCShiftFile.Enabled = ChTCon.Checked - TBTCShiftPolygon.Enabled = ChTCon.Checked - End Sub 'Browse TC file Private Sub BtTCfileBrowse_Click(sender As Object, e As EventArgs) Handles BtTCfileBrowse.Click - If TorqueConverterFileBrowser.OpenDialog(fFileRepl(TbTCfile.Text, fPATH(GbxFile))) Then - TbTCfile.Text = fFileWoDir(TorqueConverterFileBrowser.Files(0), fPATH(GbxFile)) + If TorqueConverterFileBrowser.OpenDialog(fFileRepl(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(fFileRepl(TbTCfile.Text, fPATH(GbxFile))) - End Sub - - Private Sub CheckGearTC() - Dim lv0 As ListViewItem - - If Not Init Then Exit Sub - - For Each lv0 In LvGears.Items - - If lv0.SubItems(GearboxTbl.GearNr).Text = "Axle" Then Continue For - - 'lv0.SubItems(GearboxTbl.TorqueConverter).Text = "-" - Next + OpenFiles(fFileRepl(TbTCfile.Text, GetPath(GbxFile))) End Sub @@ -976,8 +979,8 @@ Public Class GearboxForm End Sub Private Sub BtTCShiftFileBrowse_Click(sender As Object, e As EventArgs) Handles BtTCShiftFileBrowse.Click - If fbTCCShift.OpenDialog(fFileRepl(TBTCShiftPolygon.Text, fPATH(GbxFile))) Then - TBTCShiftPolygon.Text = fFileWoDir(fbTCCShift.Files(0), fPATH(GbxFile)) + If fbTCCShift.OpenDialog(fFileRepl(TBTCShiftPolygon.Text, GetPath(GbxFile))) Then + TBTCShiftPolygon.Text = GetFilenameWithoutDirectory(fbTCCShift.Files(0), GetPath(GbxFile)) End If End Sub End Class diff --git a/VECTO/GUI/GraphForm.vb b/VECTO/GUI/GraphForm.vb index 879f987971b6a76069754f50a17284f0ebaa28d6..e577284338b0fc5353b218bf09b640a311931d5a 100644 --- a/VECTO/GUI/GraphForm.vb +++ b/VECTO/GUI/GraphForm.vb @@ -135,7 +135,7 @@ Public Class GraphForm TbXmin.Text = 0 TbXmax.Text = _xMax0 - Text = fFILE(_filepath, True) + Text = GetFilenameWithoutPath(_filepath, True) Catch ex As Exception file.Close() diff --git a/VECTO/GUI/MainForm.vb b/VECTO/GUI/MainForm.vb index 98d4b9d7217ca7f05a189a191924e3be3378fe5d..91644d64b493bb6d80c908134ca1cfbabb388340 100644 --- a/VECTO/GUI/MainForm.vb +++ b/VECTO/GUI/MainForm.vb @@ -344,7 +344,7 @@ Public Class MainForm Else - Select Case UCase(fEXT(File)) + Select Case UCase(GetExtension(File)) Case ".VGBX" If Not GearboxForm.Visible Then GearboxForm.Show() @@ -377,7 +377,7 @@ Public Class MainForm Case ".VSIG" OpenSigFile(File) Case Else - MsgBox("Type '" & fEXT(File) & "' unknown!", MsgBoxStyle.Critical) + MsgBox("Type '" & GetExtension(File) & "' unknown!", MsgBoxStyle.Critical) End Select End If @@ -1472,7 +1472,7 @@ lbFound: CmFiles = files - OpenInGraphWindowToolStripMenuItem.Enabled = (UCase(fEXT(CmFiles(0))) = ".VMOD") + OpenInGraphWindowToolStripMenuItem.Enabled = (UCase(GetExtension(CmFiles(0))) = ".VMOD") OpenWithToolStripMenuItem.Text = "Open with " & Cfg.OpenCmdName diff --git a/VECTO/GUI/VectoJobForm.vb b/VECTO/GUI/VectoJobForm.vb index 047ab9b1e46223469224c5a25788cdbe6d302532..7469061cbc384b20fcddbca9c04e0fc077082a23 100644 --- a/VECTO/GUI/VectoJobForm.vb +++ b/VECTO/GUI/VectoJobForm.vb @@ -42,7 +42,7 @@ Public Class VectoJobForm 'Populate Advanced Auxiliaries Private Sub PopulateAdvancedAuxiliaries() 'Scan the program directory for DLL's which are AdvancedAuxiliaries and display - Dim aList As List(Of cAdvancedAuxiliary) = DiscoverAdvancedAuxiliaries() + Dim aList As List(Of AdvancedAuxiliary) = DiscoverAdvancedAuxiliaries() cboAdvancedAuxiliaries.DataSource = aList cboAdvancedAuxiliaries.DisplayMember = "AuxiliaryName" @@ -136,12 +136,13 @@ Public Class VectoJobForm LvAux.Items.Add(GetTechListForAux(sKey.AUX.ElecSys, "Electric System", DeclarationData.ElectricSystem)) - LvAux.Items.Add(GetTechListForAux(sKey.AUX.PneumSys, "Pneymatic System", DeclarationData.PneumaticSystem)) + LvAux.Items.Add(GetTechListForAux(sKey.AUX.PneumSys, "Pneumatic System", DeclarationData.PneumaticSystem)) End If End Sub - Protected Function GetTechListForAux(key As String, nameStr As String, aux As IDeclarationAuxiliaryTable) As ListViewItem + Protected Function GetTechListForAux(key As String, nameStr As String, aux As IDeclarationAuxiliaryTable) _ + As ListViewItem Dim LV0 As ListViewItem LV0 = New ListViewItem(key) @@ -175,31 +176,31 @@ Public Class VectoJobForm #Region "Browse Buttons" Private Sub ButtonVEH_Click(sender As Object, e As EventArgs) Handles ButtonVEH.Click - If VehicleFileBrowser.OpenDialog(fFileRepl(TbVEH.Text, fPATH(VECTOfile))) Then - TbVEH.Text = fFileWoDir(VehicleFileBrowser.Files(0), fPATH(VECTOfile)) + If VehicleFileBrowser.OpenDialog(fFileRepl(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(fFileRepl(TbENG.Text, fPATH(VECTOfile))) Then - TbENG.Text = fFileWoDir(EngineFileBrowser.Files(0), fPATH(VECTOfile)) + If EngineFileBrowser.OpenDialog(fFileRepl(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(fFileRepl(TbGBX.Text, fPATH(VECTOfile))) Then - TbGBX.Text = fFileWoDir(GearboxFileBrowser.Files(0), fPATH(VECTOfile)) + If GearboxFileBrowser.OpenDialog(fFileRepl(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(fFileRepl(TbDesMaxFile.Text, fPATH(VECTOfile))) Then - TbDesMaxFile.Text = fFileWoDir(DriverAccelerationFileBrowser.Files(0), fPATH(VECTOfile)) + If DriverAccelerationFileBrowser.OpenDialog(fFileRepl(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(fFileRepl(TbDesMaxFile.Text, fPATH(VECTOfile))) + OpenFiles(fFileRepl(TbDesMaxFile.Text, GetPath(VECTOfile))) End Sub #End Region @@ -209,10 +210,10 @@ Public Class VectoJobForm 'Open Vehicle Editor Private Sub ButOpenVEH_Click(sender As Object, e As EventArgs) Handles ButOpenVEH.Click Dim f As String - f = fFileRepl(TbVEH.Text, fPATH(VECTOfile)) + f = fFileRepl(TbVEH.Text, GetPath(VECTOfile)) 'Thus Veh-file is returned - VehicleForm.JobDir = fPATH(VECTOfile) + VehicleForm.JobDir = GetPath(VECTOfile) VehicleForm.AutoSendTo = True If Not Trim(f) = "" Then @@ -235,10 +236,10 @@ Public Class VectoJobForm 'Open Engine Editor Private Sub ButOpenENG_Click(sender As Object, e As EventArgs) Handles ButOpenENG.Click Dim f As String - f = fFileRepl(TbENG.Text, fPATH(VECTOfile)) + f = fFileRepl(TbENG.Text, GetPath(VECTOfile)) 'Thus Veh-file is returned - EngineForm.JobDir = fPATH(VECTOfile) + EngineForm.JobDir = GetPath(VECTOfile) EngineForm.AutoSendTo = True If Not Trim(f) = "" Then @@ -261,10 +262,10 @@ Public Class VectoJobForm 'Open Gearbox Editor Private Sub ButOpenGBX_Click(sender As Object, e As EventArgs) Handles ButOpenGBX.Click Dim f As String - f = fFileRepl(TbGBX.Text, fPATH(VECTOfile)) + f = fFileRepl(TbGBX.Text, GetPath(VECTOfile)) 'Thus Veh-file is returned - GearboxForm.JobDir = fPATH(VECTOfile) + GearboxForm.JobDir = GetPath(VECTOfile) GearboxForm.AutoSendTo = True If Not Trim(f) = "" Then @@ -358,11 +359,11 @@ Public Class VectoJobForm VEC0.FilePath = file Try If Not VEC0.ReadFile() Then - MsgBox("Failed to load " & fFILE(file, True) & "!") + MsgBox("Failed to load " & GetFilenameWithoutPath(file, True) & "!") Exit Sub End If Catch ex As Exception - MsgBox("Failed to load " & fFILE(file, True) & "!") + MsgBox("Failed to load " & GetFilenameWithoutPath(file, True) & "!") Exit Sub End Try @@ -399,7 +400,7 @@ Public Class VectoJobForm 'AA-TB 'Try and Select any previously selected Auxiliary Type - For Each item As cAdvancedAuxiliary In cboAdvancedAuxiliaries.Items + For Each item As AdvancedAuxiliary In cboAdvancedAuxiliaries.Items If item.AssemblyName = VEC0.AuxiliaryAssembly AndAlso VEC0.AuxiliaryVersion = item.AuxiliaryVersion Then cboAdvancedAuxiliaries.SelectedItem = item Exit For @@ -486,10 +487,10 @@ Public Class VectoJobForm If cboAdvancedAuxiliaries.SelectedIndex > 0 Then 'resolve absolute path for auxiliary file. - Dim absoluteAAUxFile = ResolveAAUXFilePath(fPATH(VECTOfile), txtAdvancedAuxiliaryFile.Text) + Dim absoluteAAUxFile = ResolveAAUXFilePath(GetPath(VECTOfile), txtAdvancedAuxiliaryFile.Text) - Dim aaAssemblyName = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary).AssemblyName - Dim aaAssemblyVersion = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary).AuxiliaryVersion + Dim aaAssemblyName = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary).AssemblyName + Dim aaAssemblyVersion = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary).AuxiliaryVersion If Not ValidateAAUXFile(absoluteAAUxFile, aaAssemblyName, aaAssemblyVersion, message) Then @@ -512,7 +513,7 @@ Public Class VectoJobForm For Each lv0 As ListViewItem In LvCycles.Items Dim sb = New SubPath - sb.Init(fPATH(file), lv0.Text) + sb.Init(GetPath(file), lv0.Text) vec0.CycleFiles.Add(sb) Next @@ -529,8 +530,8 @@ Public Class VectoJobForm vec0.DesMaxFile = TbDesMaxFile.Text 'AA-TB - vec0.AuxiliaryAssembly = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary).AssemblyName - vec0.AuxiliaryVersion = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary).AuxiliaryVersion + vec0.AuxiliaryAssembly = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary).AssemblyName + vec0.AuxiliaryVersion = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary).AuxiliaryVersion vec0.AdvancedAuxiliaryFilePath = txtAdvancedAuxiliaryFile.Text For Each lv0 As ListViewItem In LvAux.Items @@ -539,7 +540,7 @@ Public Class VectoJobForm If Cfg.DeclMode Then auxEntry.TechStr = lv0.SubItems(2).Text Else - auxEntry.Path.Init(fPATH(file), lv0.SubItems(2).Text) + auxEntry.Path.Init(GetPath(file), lv0.SubItems(2).Text) End If auxEntry.Type = lv0.SubItems(1).Text @@ -572,7 +573,7 @@ Public Class VectoJobForm VECTOfile = file - file = fFILE(VECTOfile, True) + file = GetFilenameWithoutPath(VECTOfile, True) Text = file ToolStripStatusLabelGEN.Text = "" @@ -728,7 +729,7 @@ Public Class VectoJobForm Private Sub ButAuxAdd_Click(sender As Object, e As EventArgs) Handles ButAuxAdd.Click Dim ID As String - AuxDlog.VehPath = fPATH(VECTOfile) + AuxDlog.VehPath = GetPath(VECTOfile) AuxDlog.TbPath.Text = "" AuxDlog.CbType.SelectedIndex = -1 AuxDlog.CbType.Text = "" @@ -782,7 +783,7 @@ lbDlog: Dim selItem = LvAux.SelectedItems(0) - AuxDlog.VehPath = fPATH(VECTOfile) + AuxDlog.VehPath = GetPath(VECTOfile) AuxDlog.CbType.SelectedIndex = -1 AuxDlog.CbType.Text = selItem.SubItems(1).Text AuxDlog.TbID.Text = selItem.SubItems(0).Text 'After Type-set! @@ -853,7 +854,7 @@ lbDlog: Private Sub LvCycles_DoubleClick(sender As Object, e As EventArgs) Handles LvCycles.DoubleClick If LvCycles.SelectedItems.Count > 0 Then _ - OpenFiles(fFileRepl(LvCycles.SelectedItems(0).SubItems(0).Text, fPATH(VECTOfile))) + OpenFiles(fFileRepl(LvCycles.SelectedItems(0).SubItems(0).Text, GetPath(VECTOfile))) End Sub Private Sub LvCycles_KeyDown(sender As Object, e As KeyEventArgs) Handles LvCycles.KeyDown @@ -866,11 +867,11 @@ lbDlog: End Sub Private Sub BtDRIadd_Click(sender As Object, e As EventArgs) Handles BtDRIadd.Click - Dim genDir As String = fPATH(VECTOfile) + Dim genDir As String = GetPath(VECTOfile) If DrivingCycleFileBrowser.OpenDialog("", True) Then For Each s In DrivingCycleFileBrowser.Files - LvCycles.Items.Add(fFileWoDir(s, genDir)) + LvCycles.Items.Add(GetFilenameWithoutDirectory(s, genDir)) Next Change() End If @@ -1004,9 +1005,9 @@ lbDlog: PicBox.Image = Nothing - VEH0.FilePath = fFileRepl(TbVEH.Text, fPATH(VECTOfile)) + VEH0.FilePath = fFileRepl(TbVEH.Text, GetPath(VECTOfile)) If VEH0.ReadFile(False) Then - Dim maxMass = (VEH0.MassMax * 1000).SI(Of Kilogram)() 'CSng(fTextboxToNumString(TbMassMass.Text)) + Dim maxMass = (VEH0.MassMax * 1000).SI(Of Kilogram)() 'CSng(fTextboxToNumString(TbMassMass.Text)) Dim s0 As Segment = Nothing Try @@ -1040,7 +1041,7 @@ lbDlog: Dim OkCount = 0 Dim ENG0 = New Engine - ENG0.FilePath = fFileRepl(TbENG.Text, fPATH(VECTOfile)) + ENG0.FilePath = fFileRepl(TbENG.Text, GetPath(VECTOfile)) 'Create plot Dim MyChart = New Chart @@ -1053,7 +1054,7 @@ lbDlog: If ENG0.ReadFile(False) Then - n_idle = ENG0.Nidle + n_idle = ENG0.IdleSpeed FLDfile = ENG0.PathFLD EngOK = True @@ -1083,7 +1084,7 @@ lbDlog: End If - TbEngTxt.Text = (ENG0.Displ / 1000).ToString("0.0") & " l " & pmax.ToString("#") & " kW " & ENG0.ModelName + TbEngTxt.Text = (ENG0.Displacement / 1000).ToString("0.0") & " l " & pmax.ToString("#") & " kW " & ENG0.ModelName Dim MAP0 = New FuelconsumptionMap @@ -1106,7 +1107,7 @@ lbDlog: End If Dim GBX0 = New Gearbox - GBX0.FilePath = fFileRepl(TbGBX.Text, fPATH(VECTOfile)) + GBX0.FilePath = fFileRepl(TbGBX.Text, GetPath(VECTOfile)) If GBX0.ReadFile(False) Then @@ -1293,9 +1294,9 @@ lbDlog: If cboAdvancedAuxiliaries.SelectedIndex = -1 Then Exit Sub 'Get tooltip - Dim item As cAdvancedAuxiliary + Dim item As AdvancedAuxiliary - item = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary) + item = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary) If item.AuxiliaryVersion = "CLASSIC" Then @@ -1323,20 +1324,20 @@ lbDlog: Dim fbAux As New FileBrowser(True, False) Dim message As String = String.Empty Dim absoluteAuxPath As String - Dim assembly As cAdvancedAuxiliary + Dim assembly As AdvancedAuxiliary 'If Classic is selected, then bail If cboAdvancedAuxiliaries.SelectedIndex = 0 Then Return 'Get Absolute Path for AAUX FILE. - absoluteAuxPath = ResolveAAUXFilePath(fPATH(VECTOfile), txtAdvancedAuxiliaryFile.Text) + absoluteAuxPath = ResolveAAUXFilePath(GetPath(VECTOfile), txtAdvancedAuxiliaryFile.Text) 'Set Extensions fbAux.Extensions = New String() {"AAUX"} Try - assembly = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary) + assembly = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary) Dim validAAUXFile As Boolean = ValidateAAUXFile(absoluteAuxPath, assembly.AssemblyName, assembly.AuxiliaryVersion, message) @@ -1353,11 +1354,11 @@ lbDlog: 'Find / Create file and configure. If fbAux.CustomDialog(absoluteAuxPath, False, False, tFbExtMode.ForceExt, False, String.Empty) Then - txtAdvancedAuxiliaryFile.Text = fFileWoDir(fbAux.Files(0), fPATH(VECTOfile)) - assembly = DirectCast(cboAdvancedAuxiliaries.SelectedItem, cAdvancedAuxiliary) + txtAdvancedAuxiliaryFile.Text = GetFilenameWithoutDirectory(fbAux.Files(0), GetPath(VECTOfile)) + assembly = DirectCast(cboAdvancedAuxiliaries.SelectedItem, AdvancedAuxiliary) If _ - File.Exists(ResolveAAUXFilePath(fPATH(VECTOfile), txtAdvancedAuxiliaryFile.Text)) OrElse + 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, @@ -1398,12 +1399,14 @@ lbDlog: 'AA-TB Private Sub btnAAUXOpen_Click(sender As Object, e As EventArgs) Handles btnAAUXOpen.Click - OpenFiles(fFileRepl(txtAdvancedAuxiliaryFile.Text, fPATH(VECTOfile))) + OpenFiles(fFileRepl(txtAdvancedAuxiliaryFile.Text, GetPath(VECTOfile))) End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btnDfTargetSpeed.Click - If DriverDecisionFactorTargetSpeedFileBrowser.OpenDialog(fFileRepl(tbLacDfTargetSpeedFile.Text, fPATH(VECTOfile))) Then _ - tbLacDfTargetSpeedFile.Text = fFileWoDir(DriverDecisionFactorTargetSpeedFileBrowser.Files(0), fPATH(VECTOfile)) + If DriverDecisionFactorTargetSpeedFileBrowser.OpenDialog(fFileRepl(tbLacDfTargetSpeedFile.Text, GetPath(VECTOfile))) _ + Then _ + tbLacDfTargetSpeedFile.Text = GetFilenameWithoutDirectory(DriverDecisionFactorTargetSpeedFileBrowser.Files(0), + GetPath(VECTOfile)) End Sub End Class diff --git a/VECTO/GUI/VehicleAuxiliariesDialog.vb b/VECTO/GUI/VehicleAuxiliariesDialog.vb index 9377923544dd3d20d00e203cfef71ff118a55438..831bc43416450ca7b9dd03daed98936eb9a6e6fc 100644 --- a/VECTO/GUI/VehicleAuxiliariesDialog.vb +++ b/VECTO/GUI/VehicleAuxiliariesDialog.vb @@ -94,7 +94,7 @@ Public Class VehicleAuxiliariesDialog 'Browse for .vaux files Private Sub BtBrowse_Click(sender As Object, e As EventArgs) Handles BtBrowse.Click - If AuxFileBrowser.OpenDialog(fFileRepl(TbPath.Text, VehPath)) Then TbPath.Text = fFileWoDir(AuxFileBrowser.Files(0), VehPath) + If AuxFileBrowser.OpenDialog(fFileRepl(TbPath.Text, VehPath)) Then TbPath.Text = GetFilenameWithoutDirectory(AuxFileBrowser.Files(0), VehPath) End Sub 'Update ID when Aux Type was changed diff --git a/VECTO/GUI/VehicleForm.vb b/VECTO/GUI/VehicleForm.vb index cbf0e9c50df149ee3aa9dfa66705498f39066a86..aee935f9d9fe035c51c969502ef78aa9076056f6 100644 --- a/VECTO/GUI/VehicleForm.vb +++ b/VECTO/GUI/VehicleForm.vb @@ -218,7 +218,7 @@ Public Class VehicleForm VectoJobForm.WindowState = FormWindowState.Normal End If - VectoJobForm.TbVEH.Text = fFileWoDir(_vehFile, JobDir) + VectoJobForm.TbVEH.Text = GetFilenameWithoutDirectory(_vehFile, JobDir) End Sub 'Help @@ -383,7 +383,7 @@ Public Class VehicleForm DeclInit() VehicleFileBrowser.UpdateHistory(file) - Text = fFILE(file, True) + Text = GetFilenameWithoutPath(file, True) LbStatus.Text = "" _vehFile = file Activate() @@ -405,14 +405,14 @@ Public Class VehicleForm veh.DynamicTyreRadius = CSng(fTextboxToNumString(TBrdyn.Text)) veh.CrossWindCorrectionMode = CbCdMode.SelectedValue - veh.CrossWindCorrectionFile.Init(fPATH(file), TbCdFile.Text) + veh.CrossWindCorrectionFile.Init(GetPath(file), TbCdFile.Text) veh.RetarderType = CbRtType.SelectedValue veh.RetarderRatio = CSng(fTextboxToNumString(TbRtRatio.Text)) - veh.RetarderLossMapFile.Init(fPATH(file), TbRtPath.Text) + veh.RetarderLossMapFile.Init(GetPath(file), TbRtPath.Text) veh.AngularGearType = cbAngularGearType.SelectedValue veh.AngularGearRatio = CSng(fTextboxToNumString(tbAngularGearRatio.Text)) - veh.AngularGearLossMapFile.Init(fPATH(file), tbAngularGearLossMapPath.Text) + veh.AngularGearLossMapFile.Init(GetPath(file), tbAngularGearLossMapPath.Text) veh.VehicleCategory = CbCat.SelectedValue 'CType(CbCat.SelectedIndex, tVehCat) @@ -447,13 +447,13 @@ Public Class VehicleForm If AutoSendTo Then If VectoJobForm.Visible Then - If UCase(fFileRepl(VectoJobForm.TbVEH.Text, JobDir)) <> UCase(file) Then VectoJobForm.TbVEH.Text = fFileWoDir(file, JobDir) + If UCase(fFileRepl(VectoJobForm.TbVEH.Text, JobDir)) <> UCase(file) Then VectoJobForm.TbVEH.Text = GetFilenameWithoutDirectory(file, JobDir) VectoJobForm.UpdatePic() End If End If VehicleFileBrowser.UpdateHistory(file) - Text = fFILE(file, True) + Text = GetFilenameWithoutPath(file, True) LbStatus.Text = "" _changed = False @@ -504,13 +504,13 @@ Public Class VehicleForm ex = "vcdb" End If - If fbCDx.OpenDialog(fFileRepl(TbCdFile.Text, fPATH(_vehFile)), False, ex) Then _ - TbCdFile.Text = fFileWoDir(fbCDx.Files(0), fPATH(_vehFile)) + If fbCDx.OpenDialog(fFileRepl(TbCdFile.Text, GetPath(_vehFile)), False, ex) Then _ + TbCdFile.Text = GetFilenameWithoutDirectory(fbCDx.Files(0), GetPath(_vehFile)) End Sub 'Open Cd File Private Sub BtCdFileOpen_Click(sender As Object, e As EventArgs) Handles BtCdFileOpen.Click - OpenFiles(fFileRepl(TbCdFile.Text, fPATH(_vehFile))) + OpenFiles(fFileRepl(TbCdFile.Text, GetPath(_vehFile))) End Sub #End Region @@ -539,8 +539,8 @@ Public Class VehicleForm 'Rt File Browse Private Sub BtRtBrowse_Click(sender As Object, e As EventArgs) Handles BtRtBrowse.Click - If RetarderLossMapFileBrowser.OpenDialog(fFileRepl(TbRtPath.Text, fPATH(_vehFile))) Then _ - TbRtPath.Text = fFileWoDir(RetarderLossMapFileBrowser.Files(0), fPATH(_vehFile)) + If RetarderLossMapFileBrowser.OpenDialog(fFileRepl(TbRtPath.Text, GetPath(_vehFile))) Then _ + TbRtPath.Text = GetFilenameWithoutDirectory(RetarderLossMapFileBrowser.Files(0), GetPath(_vehFile)) End Sub #End Region @@ -781,8 +781,8 @@ Public Class VehicleForm End Sub Private Sub btAngularGearLossMapBrowse_Click(sender As Object, e As EventArgs) Handles btAngularGearLossMapBrowse.Click - If TransmissionLossMapFileBrowser.OpenDialog(fFileRepl(TbRtPath.Text, fPATH(_vehFile))) Then _ - tbAngularGearLossMapPath.Text = fFileWoDir(TransmissionLossMapFileBrowser.Files(0), fPATH(_vehFile)) + If TransmissionLossMapFileBrowser.OpenDialog(fFileRepl(TbRtPath.Text, GetPath(_vehFile))) Then _ + tbAngularGearLossMapPath.Text = GetFilenameWithoutDirectory(TransmissionLossMapFileBrowser.Files(0), GetPath(_vehFile)) End Sub #End Region diff --git a/VECTO/VECTO.vbproj b/VECTO/VECTO.vbproj index c9790df3f53d871c97db9cb35c247ce3ea9615c8..db7fea4f09c165e2c734ca51ac73364d39df7116 100644 --- a/VECTO/VECTO.vbproj +++ b/VECTO/VECTO.vbproj @@ -155,6 +155,7 @@ </ItemGroup> <ItemGroup> <Compile Include="ApplicationEvents.vb" /> + <Compile Include="Input Files\AdvancedAuxiliary.vb" /> <Compile Include="JSONparser.vb" /> <Compile Include="GUI\FileSignDialog.Designer.vb"> <DependentUpon>FileSignDialog.vb</DependentUpon> @@ -210,7 +211,6 @@ <Compile Include="GUI\VehicleAxleDialog.vb"> <SubType>Form</SubType> </Compile> - <Compile Include="Input Files\cAdvancedAuxiliary.vb" /> <Compile Include="Input Files\Engine.vb" /> <Compile Include="Input Files\Gearbox.vb" /> <Compile Include="Configuration.vb" /> diff --git a/VECTO/VECTO_Global.vb b/VECTO/VECTO_Global.vb index eb1e42703d140c150d19cd6df0fc467a24dde0fd..3ea0fa951ac9b425d1cdf549907433793c469016 100644 --- a/VECTO/VECTO_Global.vb +++ b/VECTO/VECTO_Global.vb @@ -198,7 +198,8 @@ Public Module VECTO_Global End Function 'File name without the path "C:\temp\TEST.txt" >> "TEST.txt" oder "TEST" - Public Function GetFilenameWithoutPath(file As String, includeFileExtension As Boolean) As String + Public Function GetFilenameWithoutPath(file As String, includeFileExtension As Boolean) As String _ +'GetFilenameWithoutPath Dim x As Int16 x = file.LastIndexOf("\", StringComparison.Ordinal) + 1 file = Right(file, Len(file) - x) @@ -212,7 +213,8 @@ Public Module VECTO_Global 'Filename without extension "C:\temp\TEST.txt" >> "C:\temp\TEST" 'Filename without path if Path = WorkDir or MainDir - Public Function fFileWoDir(file As String, Optional ByVal mainDir As String = "") As String + Public Function GetFilenameWithoutDirectory(file As String, Optional ByVal mainDir As String = "") As String _ +'GetFilenameWithoutDirectory Dim path As String If mainDir = "" Then @@ -228,7 +230,7 @@ Public Module VECTO_Global 'Path alone "C:\temp\TEST.txt" >> "C:\temp\" ' "TEST.txt" >> "" - Public Function GetPath(file As String) As String + Public Function GetPath(file As String) As String 'GetPath Dim x As Integer If file Is Nothing OrElse file.Length < 3 OrElse file.Substring(1, 2) <> ":\" Then Return "" x = file.LastIndexOf("\", StringComparison.Ordinal) @@ -236,7 +238,7 @@ Public Module VECTO_Global End Function 'Extension alone "C:\temp\TEST.txt" >> ".txt" - Public Function GetExtension(file As String) As String + Public Function GetExtension(file As String) As String 'GetExtension Dim x As Int16 x = file.LastIndexOf(".", StringComparison.Ordinal) If x = -1 Then