diff --git a/VECTO/GUI/IEPCForm.Designer.vb b/VECTO/GUI/IEPCForm.Designer.vb index 0e44f196b410606f9a70e93fbc1278ad4b75b858..e9a57fb3138221e2f96d2f9c6666a155a7b387f1 100644 --- a/VECTO/GUI/IEPCForm.Designer.vb +++ b/VECTO/GUI/IEPCForm.Designer.vb @@ -182,7 +182,7 @@ Partial Class IEPCForm Me.btFLCurveFile1.Margin = New System.Windows.Forms.Padding(0) Me.btFLCurveFile1.Name = "btFLCurveFile1" Me.btFLCurveFile1.Size = New System.Drawing.Size(24, 24) - Me.btFLCurveFile1.TabIndex = 29 + Me.btFLCurveFile1.TabIndex = 15 Me.btFLCurveFile1.UseVisualStyleBackColor = true ' 'tbThermalOverload @@ -192,7 +192,7 @@ Partial Class IEPCForm Me.tbThermalOverload.Margin = New System.Windows.Forms.Padding(30, 3, 3, 3) Me.tbThermalOverload.Name = "tbThermalOverload" Me.tbThermalOverload.Size = New System.Drawing.Size(56, 20) - Me.tbThermalOverload.TabIndex = 51 + Me.tbThermalOverload.TabIndex = 3 ' 'Label52 ' @@ -222,7 +222,7 @@ Partial Class IEPCForm Me.tbNumberOfDesignTypeWheelMotor.Location = New System.Drawing.Point(216, 3) Me.tbNumberOfDesignTypeWheelMotor.Name = "tbNumberOfDesignTypeWheelMotor" Me.tbNumberOfDesignTypeWheelMotor.Size = New System.Drawing.Size(30, 20) - Me.tbNumberOfDesignTypeWheelMotor.TabIndex = 49 + Me.tbNumberOfDesignTypeWheelMotor.TabIndex = 5 ' 'Label51 ' @@ -240,7 +240,7 @@ Partial Class IEPCForm Me.tbInertia.Location = New System.Drawing.Point(45, 3) Me.tbInertia.Name = "tbInertia" Me.tbInertia.Size = New System.Drawing.Size(57, 20) - Me.tbInertia.TabIndex = 46 + Me.tbInertia.TabIndex = 2 ' 'Label49 ' @@ -259,7 +259,7 @@ Partial Class IEPCForm Me.tbModel.Margin = New System.Windows.Forms.Padding(3, 3, 0, 3) Me.tbModel.Name = "tbModel" Me.tbModel.Size = New System.Drawing.Size(194, 20) - Me.tbModel.TabIndex = 44 + Me.tbModel.TabIndex = 1 ' 'tcVoltageLevels ' @@ -270,7 +270,7 @@ Partial Class IEPCForm Me.tcVoltageLevels.Name = "tcVoltageLevels" Me.tcVoltageLevels.SelectedIndex = 0 Me.tcVoltageLevels.Size = New System.Drawing.Size(517, 322) - Me.tcVoltageLevels.TabIndex = 41 + Me.tcVoltageLevels.TabIndex = 107 ' 'tpFirstVoltageLevel ' @@ -295,7 +295,7 @@ Partial Class IEPCForm Me.FlowLayoutPanel9.Location = New System.Drawing.Point(6, 94) Me.FlowLayoutPanel9.Name = "FlowLayoutPanel9" Me.FlowLayoutPanel9.Size = New System.Drawing.Size(496, 26) - Me.FlowLayoutPanel9.TabIndex = 74 + Me.FlowLayoutPanel9.TabIndex = 108 ' 'Label44 ' @@ -315,7 +315,7 @@ Partial Class IEPCForm Me.tbFLCurve1.Margin = New System.Windows.Forms.Padding(3, 3, 6, 3) Me.tbFLCurve1.Name = "tbFLCurve1" Me.tbFLCurve1.Size = New System.Drawing.Size(277, 20) - Me.tbFLCurve1.TabIndex = 60 + Me.tbFLCurve1.TabIndex = 14 ' 'btShowFLCurve1 ' @@ -363,7 +363,7 @@ Partial Class IEPCForm Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27!)) Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27!)) Me.TableLayoutPanel1.Size = New System.Drawing.Size(496, 82) - Me.TableLayoutPanel1.TabIndex = 61 + Me.TableLayoutPanel1.TabIndex = 107 ' 'Label11 ' @@ -425,7 +425,7 @@ Partial Class IEPCForm Me.tbOverloadTime1.Margin = New System.Windows.Forms.Padding(0) Me.tbOverloadTime1.Name = "tbOverloadTime1" Me.tbOverloadTime1.Size = New System.Drawing.Size(56, 20) - Me.tbOverloadTime1.TabIndex = 12 + Me.tbOverloadTime1.TabIndex = 11 ' 'tbVoltage1 ' @@ -434,7 +434,7 @@ Partial Class IEPCForm Me.tbVoltage1.Margin = New System.Windows.Forms.Padding(0) Me.tbVoltage1.Name = "tbVoltage1" Me.tbVoltage1.Size = New System.Drawing.Size(56, 20) - Me.tbVoltage1.TabIndex = 2 + Me.tbVoltage1.TabIndex = 8 ' 'Label39 ' @@ -463,7 +463,7 @@ Partial Class IEPCForm Me.tbContinousTorque1.Margin = New System.Windows.Forms.Padding(0) Me.tbContinousTorque1.Name = "tbContinousTorque1" Me.tbContinousTorque1.Size = New System.Drawing.Size(56, 20) - Me.tbContinousTorque1.TabIndex = 4 + Me.tbContinousTorque1.TabIndex = 9 ' 'tbContinousTorqueSpeed1 ' @@ -472,7 +472,7 @@ Partial Class IEPCForm Me.tbContinousTorqueSpeed1.Margin = New System.Windows.Forms.Padding(0) Me.tbContinousTorqueSpeed1.Name = "tbContinousTorqueSpeed1" Me.tbContinousTorqueSpeed1.Size = New System.Drawing.Size(56, 20) - Me.tbContinousTorqueSpeed1.TabIndex = 6 + Me.tbContinousTorqueSpeed1.TabIndex = 10 ' 'Label15 ' @@ -512,7 +512,7 @@ Partial Class IEPCForm Me.tboverloadTorqueSpeed1.Location = New System.Drawing.Point(363, 58) Me.tboverloadTorqueSpeed1.Name = "tboverloadTorqueSpeed1" Me.tboverloadTorqueSpeed1.Size = New System.Drawing.Size(56, 20) - Me.tboverloadTorqueSpeed1.TabIndex = 10 + Me.tboverloadTorqueSpeed1.TabIndex = 13 ' 'Label41 ' @@ -530,7 +530,7 @@ Partial Class IEPCForm Me.tbOverloadTorque1.Location = New System.Drawing.Point(363, 30) Me.tbOverloadTorque1.Name = "tbOverloadTorque1" Me.tbOverloadTorque1.Size = New System.Drawing.Size(56, 20) - Me.tbOverloadTorque1.TabIndex = 8 + Me.tbOverloadTorque1.TabIndex = 12 ' 'Label12 ' @@ -595,7 +595,7 @@ Partial Class IEPCForm Me.lvPowerMap1.MultiSelect = false Me.lvPowerMap1.Name = "lvPowerMap1" Me.lvPowerMap1.Size = New System.Drawing.Size(292, 121) - Me.lvPowerMap1.TabIndex = 7 + Me.lvPowerMap1.TabIndex = 108 Me.lvPowerMap1.TabStop = false Me.lvPowerMap1.UseCompatibleStateImageBehavior = false Me.lvPowerMap1.View = System.Windows.Forms.View.Details @@ -675,7 +675,7 @@ Partial Class IEPCForm Me.lvPowerMap2.MultiSelect = false Me.lvPowerMap2.Name = "lvPowerMap2" Me.lvPowerMap2.Size = New System.Drawing.Size(292, 121) - Me.lvPowerMap2.TabIndex = 7 + Me.lvPowerMap2.TabIndex = 109 Me.lvPowerMap2.TabStop = false Me.lvPowerMap2.UseCompatibleStateImageBehavior = false Me.lvPowerMap2.View = System.Windows.Forms.View.Details @@ -699,7 +699,7 @@ Partial Class IEPCForm Me.FlowLayoutPanel10.Location = New System.Drawing.Point(6, 94) Me.FlowLayoutPanel10.Name = "FlowLayoutPanel10" Me.FlowLayoutPanel10.Size = New System.Drawing.Size(496, 26) - Me.FlowLayoutPanel10.TabIndex = 74 + Me.FlowLayoutPanel10.TabIndex = 110 ' 'Label28 ' @@ -719,7 +719,7 @@ Partial Class IEPCForm Me.tbFLCurve2.Margin = New System.Windows.Forms.Padding(3, 3, 6, 3) Me.tbFLCurve2.Name = "tbFLCurve2" Me.tbFLCurve2.Size = New System.Drawing.Size(277, 20) - Me.tbFLCurve2.TabIndex = 57 + Me.tbFLCurve2.TabIndex = 23 ' 'btFLCurveFile2 ' @@ -729,7 +729,7 @@ Partial Class IEPCForm Me.btFLCurveFile2.Margin = New System.Windows.Forms.Padding(0) Me.btFLCurveFile2.Name = "btFLCurveFile2" Me.btFLCurveFile2.Size = New System.Drawing.Size(24, 24) - Me.btFLCurveFile2.TabIndex = 29 + Me.btFLCurveFile2.TabIndex = 24 Me.btFLCurveFile2.UseVisualStyleBackColor = true ' 'btShowFLCurve2 @@ -779,7 +779,7 @@ Partial Class IEPCForm Me.TableLayoutPanel4.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27!)) Me.TableLayoutPanel4.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27!)) Me.TableLayoutPanel4.Size = New System.Drawing.Size(496, 82) - Me.TableLayoutPanel4.TabIndex = 62 + Me.TableLayoutPanel4.TabIndex = 109 ' 'Label17 ' @@ -830,7 +830,7 @@ Partial Class IEPCForm Me.tbOverloadTime2.Location = New System.Drawing.Point(363, 3) Me.tbOverloadTime2.Name = "tbOverloadTime2" Me.tbOverloadTime2.Size = New System.Drawing.Size(56, 20) - Me.tbOverloadTime2.TabIndex = 12 + Me.tbOverloadTime2.TabIndex = 20 ' 'Label24 ' @@ -848,7 +848,7 @@ Partial Class IEPCForm Me.tbVoltage2.Location = New System.Drawing.Point(143, 3) Me.tbVoltage2.Name = "tbVoltage2" Me.tbVoltage2.Size = New System.Drawing.Size(56, 20) - Me.tbVoltage2.TabIndex = 2 + Me.tbVoltage2.TabIndex = 17 ' 'Label20 ' @@ -876,7 +876,7 @@ Partial Class IEPCForm Me.tbContinousTorque2.Location = New System.Drawing.Point(143, 30) Me.tbContinousTorque2.Name = "tbContinousTorque2" Me.tbContinousTorque2.Size = New System.Drawing.Size(56, 20) - Me.tbContinousTorque2.TabIndex = 4 + Me.tbContinousTorque2.TabIndex = 18 ' 'tbContinousTorqueSpeed2 ' @@ -884,7 +884,7 @@ Partial Class IEPCForm Me.tbContinousTorqueSpeed2.Location = New System.Drawing.Point(143, 58) Me.tbContinousTorqueSpeed2.Name = "tbContinousTorqueSpeed2" Me.tbContinousTorqueSpeed2.Size = New System.Drawing.Size(56, 20) - Me.tbContinousTorqueSpeed2.TabIndex = 6 + Me.tbContinousTorqueSpeed2.TabIndex = 19 ' 'Label27 ' @@ -913,7 +913,7 @@ Partial Class IEPCForm Me.tbOverloadTorqueSpeed2.Location = New System.Drawing.Point(363, 58) Me.tbOverloadTorqueSpeed2.Name = "tbOverloadTorqueSpeed2" Me.tbOverloadTorqueSpeed2.Size = New System.Drawing.Size(56, 20) - Me.tbOverloadTorqueSpeed2.TabIndex = 10 + Me.tbOverloadTorqueSpeed2.TabIndex = 22 ' 'Label25 ' @@ -942,7 +942,7 @@ Partial Class IEPCForm Me.tbOverloadTorque2.Location = New System.Drawing.Point(363, 30) Me.tbOverloadTorque2.Name = "tbOverloadTorque2" Me.tbOverloadTorque2.Size = New System.Drawing.Size(56, 20) - Me.tbOverloadTorque2.TabIndex = 8 + Me.tbOverloadTorque2.TabIndex = 21 ' 'Label16 ' @@ -974,7 +974,7 @@ Partial Class IEPCForm Me.cbDesignTypeWheelMotor.Margin = New System.Windows.Forms.Padding(0, 6, 3, 6) Me.cbDesignTypeWheelMotor.Name = "cbDesignTypeWheelMotor" Me.cbDesignTypeWheelMotor.Size = New System.Drawing.Size(15, 14) - Me.cbDesignTypeWheelMotor.TabIndex = 53 + Me.cbDesignTypeWheelMotor.TabIndex = 4 Me.cbDesignTypeWheelMotor.UseVisualStyleBackColor = true ' 'Label2 @@ -996,7 +996,7 @@ Partial Class IEPCForm Me.cbDifferentialIncluded.Margin = New System.Windows.Forms.Padding(80, 6, 3, 6) Me.cbDifferentialIncluded.Name = "cbDifferentialIncluded" Me.cbDifferentialIncluded.Size = New System.Drawing.Size(15, 14) - Me.cbDifferentialIncluded.TabIndex = 47 + Me.cbDifferentialIncluded.TabIndex = 6 Me.cbDifferentialIncluded.UseVisualStyleBackColor = true ' 'GroupBox1 @@ -1025,7 +1025,7 @@ Partial Class IEPCForm Me.TableLayoutPanel5.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 78.61636!)) Me.TableLayoutPanel5.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 21.38365!)) Me.TableLayoutPanel5.Size = New System.Drawing.Size(300, 159) - Me.TableLayoutPanel5.TabIndex = 75 + Me.TableLayoutPanel5.TabIndex = 111 ' 'FlowLayoutPanel2 ' @@ -1034,7 +1034,7 @@ Partial Class IEPCForm Me.FlowLayoutPanel2.Location = New System.Drawing.Point(3, 128) Me.FlowLayoutPanel2.Name = "FlowLayoutPanel2" Me.FlowLayoutPanel2.Size = New System.Drawing.Size(61, 28) - Me.FlowLayoutPanel2.TabIndex = 54 + Me.FlowLayoutPanel2.TabIndex = 112 ' 'btAddGear ' @@ -1042,7 +1042,7 @@ Partial Class IEPCForm Me.btAddGear.Location = New System.Drawing.Point(3, 3) Me.btAddGear.Name = "btAddGear" Me.btAddGear.Size = New System.Drawing.Size(24, 24) - Me.btAddGear.TabIndex = 4 + Me.btAddGear.TabIndex = 25 Me.btAddGear.UseVisualStyleBackColor = true ' 'btRemoveGear @@ -1051,7 +1051,7 @@ Partial Class IEPCForm Me.btRemoveGear.Location = New System.Drawing.Point(33, 3) Me.btRemoveGear.Name = "btRemoveGear" Me.btRemoveGear.Size = New System.Drawing.Size(24, 24) - Me.btRemoveGear.TabIndex = 5 + Me.btRemoveGear.TabIndex = 26 Me.btRemoveGear.UseVisualStyleBackColor = true ' 'Label6 @@ -1078,7 +1078,7 @@ Partial Class IEPCForm Me.lvGear.MultiSelect = false Me.lvGear.Name = "lvGear" Me.lvGear.Size = New System.Drawing.Size(294, 119) - Me.lvGear.TabIndex = 7 + Me.lvGear.TabIndex = 78 Me.lvGear.TabStop = false Me.lvGear.UseCompatibleStateImageBehavior = false Me.lvGear.View = System.Windows.Forms.View.Details @@ -1124,7 +1124,7 @@ Partial Class IEPCForm Me.TableLayoutPanel3.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 78.61636!)) Me.TableLayoutPanel3.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 21.38365!)) Me.TableLayoutPanel3.Size = New System.Drawing.Size(300, 159) - Me.TableLayoutPanel3.TabIndex = 76 + Me.TableLayoutPanel3.TabIndex = 113 ' 'lvDragCurve ' @@ -1140,7 +1140,7 @@ Partial Class IEPCForm Me.lvDragCurve.MultiSelect = false Me.lvDragCurve.Name = "lvDragCurve" Me.lvDragCurve.Size = New System.Drawing.Size(294, 119) - Me.lvDragCurve.TabIndex = 77 + Me.lvDragCurve.TabIndex = 78 Me.lvDragCurve.TabStop = false Me.lvDragCurve.UseCompatibleStateImageBehavior = false Me.lvDragCurve.View = System.Windows.Forms.View.Details @@ -1162,7 +1162,7 @@ Partial Class IEPCForm Me.FlowLayoutPanel11.Location = New System.Drawing.Point(3, 128) Me.FlowLayoutPanel11.Name = "FlowLayoutPanel11" Me.FlowLayoutPanel11.Size = New System.Drawing.Size(61, 28) - Me.FlowLayoutPanel11.TabIndex = 54 + Me.FlowLayoutPanel11.TabIndex = 114 ' 'btAddDragCurve ' @@ -1170,7 +1170,7 @@ Partial Class IEPCForm Me.btAddDragCurve.Location = New System.Drawing.Point(3, 3) Me.btAddDragCurve.Name = "btAddDragCurve" Me.btAddDragCurve.Size = New System.Drawing.Size(24, 24) - Me.btAddDragCurve.TabIndex = 4 + Me.btAddDragCurve.TabIndex = 27 Me.btAddDragCurve.UseVisualStyleBackColor = true ' 'btRemoveDragCurve @@ -1179,7 +1179,7 @@ Partial Class IEPCForm Me.btRemoveDragCurve.Location = New System.Drawing.Point(33, 3) Me.btRemoveDragCurve.Name = "btRemoveDragCurve" Me.btRemoveDragCurve.Size = New System.Drawing.Size(24, 24) - Me.btRemoveDragCurve.TabIndex = 5 + Me.btRemoveDragCurve.TabIndex = 28 Me.btRemoveDragCurve.UseVisualStyleBackColor = true ' 'Label7 @@ -1323,7 +1323,7 @@ Partial Class IEPCForm Me.FlowLayoutPanel1.Location = New System.Drawing.Point(12, 77) Me.FlowLayoutPanel1.Name = "FlowLayoutPanel1" Me.FlowLayoutPanel1.Size = New System.Drawing.Size(242, 26) - Me.FlowLayoutPanel1.TabIndex = 68 + Me.FlowLayoutPanel1.TabIndex = 101 ' 'FlowLayoutPanel4 ' @@ -1333,7 +1333,7 @@ Partial Class IEPCForm Me.FlowLayoutPanel4.Location = New System.Drawing.Point(12, 131) Me.FlowLayoutPanel4.Name = "FlowLayoutPanel4" Me.FlowLayoutPanel4.Size = New System.Drawing.Size(210, 26) - Me.FlowLayoutPanel4.TabIndex = 69 + Me.FlowLayoutPanel4.TabIndex = 104 ' 'FlowLayoutPanel5 ' @@ -1343,7 +1343,7 @@ Partial Class IEPCForm Me.FlowLayoutPanel5.Location = New System.Drawing.Point(227, 131) Me.FlowLayoutPanel5.Name = "FlowLayoutPanel5" Me.FlowLayoutPanel5.Size = New System.Drawing.Size(298, 26) - Me.FlowLayoutPanel5.TabIndex = 70 + Me.FlowLayoutPanel5.TabIndex = 105 ' 'Label9 ' @@ -1363,7 +1363,7 @@ Partial Class IEPCForm Me.FlowLayoutPanel6.Location = New System.Drawing.Point(12, 104) Me.FlowLayoutPanel6.Name = "FlowLayoutPanel6" Me.FlowLayoutPanel6.Size = New System.Drawing.Size(210, 26) - Me.FlowLayoutPanel6.TabIndex = 71 + Me.FlowLayoutPanel6.TabIndex = 102 ' 'lblinertiaUnit ' @@ -1382,7 +1382,7 @@ Partial Class IEPCForm Me.FlowLayoutPanel7.Location = New System.Drawing.Point(12, 158) Me.FlowLayoutPanel7.Name = "FlowLayoutPanel7" Me.FlowLayoutPanel7.Size = New System.Drawing.Size(210, 26) - Me.FlowLayoutPanel7.TabIndex = 72 + Me.FlowLayoutPanel7.TabIndex = 106 ' 'FlowLayoutPanel8 ' @@ -1392,7 +1392,7 @@ Partial Class IEPCForm Me.FlowLayoutPanel8.Location = New System.Drawing.Point(227, 104) Me.FlowLayoutPanel8.Name = "FlowLayoutPanel8" Me.FlowLayoutPanel8.Size = New System.Drawing.Size(298, 26) - Me.FlowLayoutPanel8.TabIndex = 73 + Me.FlowLayoutPanel8.TabIndex = 103 ' 'Label10 ' diff --git a/VECTO/GUI/IEPCForm.vb b/VECTO/GUI/IEPCForm.vb index b96251d7bd1aba6644b4081d2dbdbab717c064f2..3cd291fedb5bb28f1d0cac67a60feff35498b10e 100644 --- a/VECTO/GUI/IEPCForm.vb +++ b/VECTO/GUI/IEPCForm.vb @@ -23,6 +23,8 @@ Public Class IEPCForm _gearDlg = New IEPCGearInputDialog() End Sub +#Region "Set IEPC Data" + Public Sub ReadIEPCFile(file As String) Dim inputData = JSONInputDataFactory.ReadIEPCEngineeringInputData(file, True) @@ -132,6 +134,8 @@ Public Class IEPCForm End Function +#End Region + Private Sub btAddDragCurve_Click(sender As Object, e As EventArgs) Handles btAddDragCurve.Click AddListViewItem(_dragCurveDlg, _lvDragCurve) End Sub @@ -168,7 +172,7 @@ Public Class IEPCForm Private Sub btAddGear_Click(sender As Object, e As EventArgs) Handles btAddGear.Click _gearDlg.Clear() - If (_gearDlg.ShowDialog() = DialogResult.OK) Then + If _gearDlg.ShowDialog() = DialogResult.OK Then Dim ratio = Convert.ToDouble(_gearDlg.tbRatio.Text) Dim outputShaftTorque As Double? Dim outputShaftSpeed As Double? @@ -191,6 +195,7 @@ Public Class IEPCForm Private Sub AddPowerMapEntry(powerMapListView As ListView, gearIndex As Integer) Dim retVal As New ListViewItem retVal.SubItems(0).Text = gearIndex.ToString() + retVal.SubItems.Add(String.Empty) powerMapListView.Items.Add(retVal) End Sub @@ -201,7 +206,6 @@ Public Class IEPCForm Dim entry As ListViewItem = lvGear.SelectedItems(0) _gearDlg.tbRatio.Text = entry.SubItems(0).Text - _gearDlg.tbMaxOutShaftTorque.Text = entry.SubItems(1).Text _gearDlg.tbMaxOutShaftSpeed.Text = entry.SubItems(2).Text _gearDlg.tbRatio.Focus() @@ -236,17 +240,12 @@ Public Class IEPCForm Dim entry As ListViewItem = listView.SelectedItems(0) dialog.tbGear.Text = entry.SubItems(0).Text - - If entry.SubItems.Count = 2 Then dialog.tbInputFile.Text = entry.SubItems(1).Text + dialog.tbInputFile.Text = entry.SubItems(1).Text dialog.tbGear.Focus() If dialog.ShowDialog() = DialogResult.OK Then entry.SubItems(0).Text = dialog.tbGear.Text - If entry.SubItems.Count = 1 Then - entry.SubItems.Add(dialog.tbInputFile.Text) - Else - entry.SubItems(1).Text = dialog.tbInputFile.Text - End If + entry.SubItems(1).Text = dialog.tbInputFile.Text End If End Sub @@ -283,7 +282,7 @@ Public Class IEPCForm tbModel.Text = "" tbInertia.Text = "" cbDifferentialIncluded.Checked = False - cbDifferentialIncluded.Checked = False + cbDesignTypeWheelMotor.Checked = False tbNumberOfDesignTypeWheelMotor.Text = "" tbThermalOverload.Text = "" @@ -442,7 +441,7 @@ Public Class IEPCForm End Sub - #Region "Validate Input" +#Region "Validate Input" Private Function ValidateData() As Boolean @@ -623,10 +622,15 @@ Public Class IEPCForm End If If entry.SubItems.Count = 2 Then - Dim fileExtension = new FileInfo(entry.SubItems(1).Text).Extension + If String.IsNullOrEmpty(entry.SubItems(1).Text) + ShowErrorMessageBox($"Missing Power Map file entry at Gear {entry.SubItems(0).Text}") + Return False + End If + + Dim fileExtension = new FileInfo(entry.SubItems(1).Text).Extension If Not $".{IEPCPowerMapFileBrowser.Extensions.First()}" = fileExtension - ShowErrorMessageBox($"The selected Full Load Curve file(.{IEPCPowerMapFileBrowser.Extensions.First()}) has the wrong file extension") - Return false + ShowErrorMessageBox($"The selected Power Map file(.{IEPCPowerMapFileBrowser.Extensions.First()}) has the wrong file extension") + Return False End If End If Next diff --git a/VECTO/GUI/IEPCGearInputDialog.Designer.vb b/VECTO/GUI/IEPCGearInputDialog.Designer.vb index 1739d87795ed6bef9b0f4b5f480f086b9db95f11..53ad8c37ea0649a6ab4bdea20ef6e68f930652e6 100644 --- a/VECTO/GUI/IEPCGearInputDialog.Designer.vb +++ b/VECTO/GUI/IEPCGearInputDialog.Designer.vb @@ -106,7 +106,7 @@ Partial Class IEPCGearInputDialog Me.tbRatio.Location = New System.Drawing.Point(149, 5) Me.tbRatio.Name = "tbRatio" Me.tbRatio.Size = New System.Drawing.Size(77, 20) - Me.tbRatio.TabIndex = 8 + Me.tbRatio.TabIndex = 1 ' 'tbMaxOutShaftTorque ' @@ -114,7 +114,7 @@ Partial Class IEPCGearInputDialog Me.tbMaxOutShaftTorque.Location = New System.Drawing.Point(149, 35) Me.tbMaxOutShaftTorque.Name = "tbMaxOutShaftTorque" Me.tbMaxOutShaftTorque.Size = New System.Drawing.Size(77, 20) - Me.tbMaxOutShaftTorque.TabIndex = 8 + Me.tbMaxOutShaftTorque.TabIndex = 2 ' 'tbMaxOutShaftSpeed ' @@ -122,7 +122,7 @@ Partial Class IEPCGearInputDialog Me.tbMaxOutShaftSpeed.Location = New System.Drawing.Point(149, 65) Me.tbMaxOutShaftSpeed.Name = "tbMaxOutShaftSpeed" Me.tbMaxOutShaftSpeed.Size = New System.Drawing.Size(77, 20) - Me.tbMaxOutShaftSpeed.TabIndex = 8 + Me.tbMaxOutShaftSpeed.TabIndex = 3 ' 'Label3 ' @@ -177,7 +177,7 @@ Partial Class IEPCGearInputDialog Me.btnOk.Location = New System.Drawing.Point(3, 3) Me.btnOk.Name = "btnOk" Me.btnOk.Size = New System.Drawing.Size(67, 23) - Me.btnOk.TabIndex = 0 + Me.btnOk.TabIndex = 4 Me.btnOk.Text = "OK" ' 'btnCancel @@ -187,7 +187,7 @@ Partial Class IEPCGearInputDialog Me.btnCancel.Location = New System.Drawing.Point(77, 3) Me.btnCancel.Name = "btnCancel" Me.btnCancel.Size = New System.Drawing.Size(67, 23) - Me.btnCancel.TabIndex = 1 + Me.btnCancel.TabIndex = 5 Me.btnCancel.Text = "Cancel" ' 'IEPCGearInputDialog diff --git a/VECTO/GUI/IEPCInputDialog.Designer.vb b/VECTO/GUI/IEPCInputDialog.Designer.vb index b691477596bf89a1c5a23ec0ee610851ee34e4ed..c1055049930ca4010fcb59fa4ec0714715d27a1b 100644 --- a/VECTO/GUI/IEPCInputDialog.Designer.vb +++ b/VECTO/GUI/IEPCInputDialog.Designer.vb @@ -30,9 +30,9 @@ Partial Class IEPCInputDialog Me.btAddFilePath = New System.Windows.Forms.Button() Me.tbInputFile = New System.Windows.Forms.TextBox() Me.TableLayoutPanel4 = New System.Windows.Forms.TableLayoutPanel() + Me.tbGear = New System.Windows.Forms.TextBox() Me.Label3 = New System.Windows.Forms.Label() Me.FlowLayoutPanel1 = New System.Windows.Forms.FlowLayoutPanel() - Me.tbGear = New System.Windows.Forms.TextBox() Me.TableLayoutPanel1.SuspendLayout Me.TableLayoutPanel5.SuspendLayout Me.TableLayoutPanel4.SuspendLayout @@ -51,7 +51,7 @@ Partial Class IEPCInputDialog Me.TableLayoutPanel1.RowCount = 1 Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50!)) Me.TableLayoutPanel1.Size = New System.Drawing.Size(148, 29) - Me.TableLayoutPanel1.TabIndex = 4 + Me.TableLayoutPanel1.TabIndex = 105 ' 'btnOk ' @@ -59,7 +59,7 @@ Partial Class IEPCInputDialog Me.btnOk.Location = New System.Drawing.Point(3, 3) Me.btnOk.Name = "btnOk" Me.btnOk.Size = New System.Drawing.Size(67, 23) - Me.btnOk.TabIndex = 0 + Me.btnOk.TabIndex = 16 Me.btnOk.Text = "OK" ' 'btnCancel @@ -69,7 +69,7 @@ Partial Class IEPCInputDialog Me.btnCancel.Location = New System.Drawing.Point(77, 3) Me.btnCancel.Name = "btnCancel" Me.btnCancel.Size = New System.Drawing.Size(67, 23) - Me.btnCancel.TabIndex = 1 + Me.btnCancel.TabIndex = 17 Me.btnCancel.Text = "Cancel" ' 'TableLayoutPanel5 @@ -85,7 +85,7 @@ Partial Class IEPCInputDialog Me.TableLayoutPanel5.RowCount = 1 Me.TableLayoutPanel5.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100!)) Me.TableLayoutPanel5.Size = New System.Drawing.Size(356, 39) - Me.TableLayoutPanel5.TabIndex = 8 + Me.TableLayoutPanel5.TabIndex = 103 ' 'btAddFilePath ' @@ -94,7 +94,7 @@ Partial Class IEPCInputDialog Me.btAddFilePath.Location = New System.Drawing.Point(324, 6) Me.btAddFilePath.Name = "btAddFilePath" Me.btAddFilePath.Size = New System.Drawing.Size(24, 26) - Me.btAddFilePath.TabIndex = 30 + Me.btAddFilePath.TabIndex = 12 Me.btAddFilePath.UseVisualStyleBackColor = true ' 'tbInputFile @@ -103,7 +103,7 @@ Partial Class IEPCInputDialog Me.tbInputFile.Location = New System.Drawing.Point(3, 9) Me.tbInputFile.Name = "tbInputFile" Me.tbInputFile.Size = New System.Drawing.Size(310, 20) - Me.tbInputFile.TabIndex = 0 + Me.tbInputFile.TabIndex = 11 ' 'TableLayoutPanel4 ' @@ -119,7 +119,15 @@ Partial Class IEPCInputDialog Me.TableLayoutPanel4.RowCount = 1 Me.TableLayoutPanel4.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50!)) Me.TableLayoutPanel4.Size = New System.Drawing.Size(128, 28) - Me.TableLayoutPanel4.TabIndex = 10 + Me.TableLayoutPanel4.TabIndex = 100 + ' + 'tbGear + ' + Me.tbGear.Anchor = System.Windows.Forms.AnchorStyles.None + Me.tbGear.Location = New System.Drawing.Point(46, 4) + Me.tbGear.Name = "tbGear" + Me.tbGear.Size = New System.Drawing.Size(77, 20) + Me.tbGear.TabIndex = 10 ' 'Label3 ' @@ -138,15 +146,7 @@ Partial Class IEPCInputDialog Me.FlowLayoutPanel1.Location = New System.Drawing.Point(0, 0) Me.FlowLayoutPanel1.Name = "FlowLayoutPanel1" Me.FlowLayoutPanel1.Size = New System.Drawing.Size(501, 45) - Me.FlowLayoutPanel1.TabIndex = 8 - ' - 'tbGear - ' - Me.tbGear.Anchor = System.Windows.Forms.AnchorStyles.None - Me.tbGear.Location = New System.Drawing.Point(46, 4) - Me.tbGear.Name = "tbGear" - Me.tbGear.Size = New System.Drawing.Size(77, 20) - Me.tbGear.TabIndex = 9 + Me.FlowLayoutPanel1.TabIndex = 102 ' 'IEPCInputDialog ' diff --git a/VECTO/GUI/IHPCForm.Designer.vb b/VECTO/GUI/IHPCForm.Designer.vb index ec33cfbc87a272029e834cf90a3edd596800c749..dae432d61737b4d5b2c35ab8cf61c6173b2ab474 100644 --- a/VECTO/GUI/IHPCForm.Designer.vb +++ b/VECTO/GUI/IHPCForm.Designer.vb @@ -157,7 +157,7 @@ Partial Class IHPCForm Me.FlowLayoutPanel1.Location = New System.Drawing.Point(12, 77) Me.FlowLayoutPanel1.Name = "FlowLayoutPanel1" Me.FlowLayoutPanel1.Size = New System.Drawing.Size(242, 26) - Me.FlowLayoutPanel1.TabIndex = 69 + Me.FlowLayoutPanel1.TabIndex = 100 ' 'Label49 ' @@ -176,7 +176,7 @@ Partial Class IHPCForm Me.tbModel.Margin = New System.Windows.Forms.Padding(3, 3, 0, 3) Me.tbModel.Name = "tbModel" Me.tbModel.Size = New System.Drawing.Size(194, 20) - Me.tbModel.TabIndex = 44 + Me.tbModel.TabIndex = 0 ' 'FlowLayoutPanel6 ' @@ -186,7 +186,7 @@ Partial Class IHPCForm Me.FlowLayoutPanel6.Location = New System.Drawing.Point(12, 106) Me.FlowLayoutPanel6.Name = "FlowLayoutPanel6" Me.FlowLayoutPanel6.Size = New System.Drawing.Size(147, 26) - Me.FlowLayoutPanel6.TabIndex = 72 + Me.FlowLayoutPanel6.TabIndex = 101 ' 'Label51 ' @@ -204,7 +204,7 @@ Partial Class IHPCForm Me.tbInertia.Location = New System.Drawing.Point(45, 3) Me.tbInertia.Name = "tbInertia" Me.tbInertia.Size = New System.Drawing.Size(57, 20) - Me.tbInertia.TabIndex = 46 + Me.tbInertia.TabIndex = 1 ' 'lblinertiaUnit ' @@ -224,7 +224,7 @@ Partial Class IHPCForm Me.FlowLayoutPanel8.Location = New System.Drawing.Point(162, 106) Me.FlowLayoutPanel8.Name = "FlowLayoutPanel8" Me.FlowLayoutPanel8.Size = New System.Drawing.Size(305, 26) - Me.FlowLayoutPanel8.TabIndex = 74 + Me.FlowLayoutPanel8.TabIndex = 102 ' 'Label52 ' @@ -244,7 +244,7 @@ Partial Class IHPCForm Me.tbThermalOverload.Margin = New System.Windows.Forms.Padding(5, 3, 3, 3) Me.tbThermalOverload.Name = "tbThermalOverload" Me.tbThermalOverload.Size = New System.Drawing.Size(56, 20) - Me.tbThermalOverload.TabIndex = 51 + Me.tbThermalOverload.TabIndex = 2 ' 'Label10 ' @@ -267,7 +267,7 @@ Partial Class IHPCForm Me.FlowLayoutPanel2.Margin = New System.Windows.Forms.Padding(0) Me.FlowLayoutPanel2.Name = "FlowLayoutPanel2" Me.FlowLayoutPanel2.Size = New System.Drawing.Size(469, 26) - Me.FlowLayoutPanel2.TabIndex = 76 + Me.FlowLayoutPanel2.TabIndex = 103 ' 'Label1 ' @@ -287,7 +287,7 @@ Partial Class IHPCForm Me.tbDragCurve.Margin = New System.Windows.Forms.Padding(3, 3, 6, 3) Me.tbDragCurve.Name = "tbDragCurve" Me.tbDragCurve.Size = New System.Drawing.Size(277, 20) - Me.tbDragCurve.TabIndex = 60 + Me.tbDragCurve.TabIndex = 3 ' 'btDragCurve ' @@ -297,7 +297,7 @@ Partial Class IHPCForm Me.btDragCurve.Margin = New System.Windows.Forms.Padding(0) Me.btDragCurve.Name = "btDragCurve" Me.btDragCurve.Size = New System.Drawing.Size(24, 24) - Me.btDragCurve.TabIndex = 29 + Me.btDragCurve.TabIndex = 4 Me.btDragCurve.UseVisualStyleBackColor = true ' 'btDragCurveOpen @@ -320,7 +320,7 @@ Partial Class IHPCForm Me.tcVoltageLevels.Name = "tcVoltageLevels" Me.tcVoltageLevels.SelectedIndex = 0 Me.tcVoltageLevels.Size = New System.Drawing.Size(517, 339) - Me.tcVoltageLevels.TabIndex = 77 + Me.tcVoltageLevels.TabIndex = 104 ' 'tpFirstVoltageLevel ' @@ -342,7 +342,7 @@ Partial Class IHPCForm Me.lvPowerMap.Location = New System.Drawing.Point(6, 126) Me.lvPowerMap.Name = "lvPowerMap" Me.lvPowerMap.Size = New System.Drawing.Size(500, 180) - Me.lvPowerMap.TabIndex = 81 + Me.lvPowerMap.TabIndex = 107 Me.lvPowerMap.TabStop = false Me.lvPowerMap.Text = "Power Map Per Gear" ' @@ -361,7 +361,7 @@ Partial Class IHPCForm Me.TableLayoutPanel3.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 78.61636!)) Me.TableLayoutPanel3.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 21.38365!)) Me.TableLayoutPanel3.Size = New System.Drawing.Size(488, 159) - Me.TableLayoutPanel3.TabIndex = 76 + Me.TableLayoutPanel3.TabIndex = 108 ' 'lvPowerMap1 ' @@ -399,7 +399,7 @@ Partial Class IHPCForm Me.FlowLayoutPanel11.Location = New System.Drawing.Point(3, 128) Me.FlowLayoutPanel11.Name = "FlowLayoutPanel11" Me.FlowLayoutPanel11.Size = New System.Drawing.Size(61, 28) - Me.FlowLayoutPanel11.TabIndex = 54 + Me.FlowLayoutPanel11.TabIndex = 109 ' 'btAddPowerMap1 ' @@ -407,7 +407,7 @@ Partial Class IHPCForm Me.btAddPowerMap1.Location = New System.Drawing.Point(3, 3) Me.btAddPowerMap1.Name = "btAddPowerMap1" Me.btAddPowerMap1.Size = New System.Drawing.Size(24, 24) - Me.btAddPowerMap1.TabIndex = 4 + Me.btAddPowerMap1.TabIndex = 38 Me.btAddPowerMap1.UseVisualStyleBackColor = true ' 'btRemovePowerMap1 @@ -416,7 +416,7 @@ Partial Class IHPCForm Me.btRemovePowerMap1.Location = New System.Drawing.Point(33, 3) Me.btRemovePowerMap1.Name = "btRemovePowerMap1" Me.btRemovePowerMap1.Size = New System.Drawing.Size(24, 24) - Me.btRemovePowerMap1.TabIndex = 5 + Me.btRemovePowerMap1.TabIndex = 39 Me.btRemovePowerMap1.UseVisualStyleBackColor = true ' 'Label7 @@ -439,7 +439,7 @@ Partial Class IHPCForm Me.FlowLayoutPanel3.Location = New System.Drawing.Point(6, 94) Me.FlowLayoutPanel3.Name = "FlowLayoutPanel3" Me.FlowLayoutPanel3.Size = New System.Drawing.Size(496, 26) - Me.FlowLayoutPanel3.TabIndex = 74 + Me.FlowLayoutPanel3.TabIndex = 106 ' 'Label2 ' @@ -459,7 +459,7 @@ Partial Class IHPCForm Me.tbFLCurve1.Margin = New System.Windows.Forms.Padding(3, 3, 6, 3) Me.tbFLCurve1.Name = "tbFLCurve1" Me.tbFLCurve1.Size = New System.Drawing.Size(277, 20) - Me.tbFLCurve1.TabIndex = 60 + Me.tbFLCurve1.TabIndex = 36 ' 'btFLCurveFile1 ' @@ -469,7 +469,7 @@ Partial Class IHPCForm Me.btFLCurveFile1.Margin = New System.Windows.Forms.Padding(0) Me.btFLCurveFile1.Name = "btFLCurveFile1" Me.btFLCurveFile1.Size = New System.Drawing.Size(24, 24) - Me.btFLCurveFile1.TabIndex = 29 + Me.btFLCurveFile1.TabIndex = 37 Me.btFLCurveFile1.UseVisualStyleBackColor = true ' 'btFLCurve1 @@ -518,7 +518,7 @@ Partial Class IHPCForm Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27!)) Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27!)) Me.TableLayoutPanel1.Size = New System.Drawing.Size(496, 82) - Me.TableLayoutPanel1.TabIndex = 61 + Me.TableLayoutPanel1.TabIndex = 105 ' 'Label11 ' @@ -580,7 +580,7 @@ Partial Class IHPCForm Me.tbOverloadTime1.Margin = New System.Windows.Forms.Padding(0) Me.tbOverloadTime1.Name = "tbOverloadTime1" Me.tbOverloadTime1.Size = New System.Drawing.Size(56, 20) - Me.tbOverloadTime1.TabIndex = 12 + Me.tbOverloadTime1.TabIndex = 33 ' 'tbVoltage1 ' @@ -589,7 +589,7 @@ Partial Class IHPCForm Me.tbVoltage1.Margin = New System.Windows.Forms.Padding(0) Me.tbVoltage1.Name = "tbVoltage1" Me.tbVoltage1.Size = New System.Drawing.Size(56, 20) - Me.tbVoltage1.TabIndex = 2 + Me.tbVoltage1.TabIndex = 30 ' 'Label39 ' @@ -618,7 +618,7 @@ Partial Class IHPCForm Me.tbContinuousTorque1.Margin = New System.Windows.Forms.Padding(0) Me.tbContinuousTorque1.Name = "tbContinuousTorque1" Me.tbContinuousTorque1.Size = New System.Drawing.Size(56, 20) - Me.tbContinuousTorque1.TabIndex = 4 + Me.tbContinuousTorque1.TabIndex = 31 ' 'tbContinuousTorqueSpeed1 ' @@ -627,7 +627,7 @@ Partial Class IHPCForm Me.tbContinuousTorqueSpeed1.Margin = New System.Windows.Forms.Padding(0) Me.tbContinuousTorqueSpeed1.Name = "tbContinuousTorqueSpeed1" Me.tbContinuousTorqueSpeed1.Size = New System.Drawing.Size(56, 20) - Me.tbContinuousTorqueSpeed1.TabIndex = 6 + Me.tbContinuousTorqueSpeed1.TabIndex = 32 ' 'Label15 ' @@ -667,7 +667,7 @@ Partial Class IHPCForm Me.tbOverloadTorqueSpeed1.Location = New System.Drawing.Point(363, 58) Me.tbOverloadTorqueSpeed1.Name = "tbOverloadTorqueSpeed1" Me.tbOverloadTorqueSpeed1.Size = New System.Drawing.Size(56, 20) - Me.tbOverloadTorqueSpeed1.TabIndex = 10 + Me.tbOverloadTorqueSpeed1.TabIndex = 35 ' 'Label41 ' @@ -685,7 +685,7 @@ Partial Class IHPCForm Me.tbOverloadTorque1.Location = New System.Drawing.Point(363, 30) Me.tbOverloadTorque1.Name = "tbOverloadTorque1" Me.tbOverloadTorque1.Size = New System.Drawing.Size(56, 20) - Me.tbOverloadTorque1.TabIndex = 8 + Me.tbOverloadTorque1.TabIndex = 34 ' 'Label12 ' @@ -718,7 +718,7 @@ Partial Class IHPCForm Me.GroupBox1.Location = New System.Drawing.Point(6, 126) Me.GroupBox1.Name = "GroupBox1" Me.GroupBox1.Size = New System.Drawing.Size(496, 180) - Me.GroupBox1.TabIndex = 82 + Me.GroupBox1.TabIndex = 122 Me.GroupBox1.TabStop = false Me.GroupBox1.Text = "Power Map Per Gear" ' @@ -737,7 +737,7 @@ Partial Class IHPCForm Me.TableLayoutPanel2.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 78.61636!)) Me.TableLayoutPanel2.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 21.38365!)) Me.TableLayoutPanel2.Size = New System.Drawing.Size(488, 159) - Me.TableLayoutPanel2.TabIndex = 76 + Me.TableLayoutPanel2.TabIndex = 123 ' 'lvPowerMap2 ' @@ -775,7 +775,7 @@ Partial Class IHPCForm Me.FlowLayoutPanel4.Location = New System.Drawing.Point(3, 128) Me.FlowLayoutPanel4.Name = "FlowLayoutPanel4" Me.FlowLayoutPanel4.Size = New System.Drawing.Size(61, 28) - Me.FlowLayoutPanel4.TabIndex = 54 + Me.FlowLayoutPanel4.TabIndex = 124 ' 'btAddPowerMap2 ' @@ -783,7 +783,7 @@ Partial Class IHPCForm Me.btAddPowerMap2.Location = New System.Drawing.Point(3, 3) Me.btAddPowerMap2.Name = "btAddPowerMap2" Me.btAddPowerMap2.Size = New System.Drawing.Size(24, 24) - Me.btAddPowerMap2.TabIndex = 4 + Me.btAddPowerMap2.TabIndex = 48 Me.btAddPowerMap2.UseVisualStyleBackColor = true ' 'btRemovePowerMap2 @@ -792,7 +792,7 @@ Partial Class IHPCForm Me.btRemovePowerMap2.Location = New System.Drawing.Point(33, 3) Me.btRemovePowerMap2.Name = "btRemovePowerMap2" Me.btRemovePowerMap2.Size = New System.Drawing.Size(24, 24) - Me.btRemovePowerMap2.TabIndex = 5 + Me.btRemovePowerMap2.TabIndex = 49 Me.btRemovePowerMap2.UseVisualStyleBackColor = true ' 'Label5 @@ -814,7 +814,7 @@ Partial Class IHPCForm Me.FlowLayoutPanel10.Location = New System.Drawing.Point(6, 94) Me.FlowLayoutPanel10.Name = "FlowLayoutPanel10" Me.FlowLayoutPanel10.Size = New System.Drawing.Size(496, 26) - Me.FlowLayoutPanel10.TabIndex = 74 + Me.FlowLayoutPanel10.TabIndex = 121 ' 'Label28 ' @@ -834,7 +834,7 @@ Partial Class IHPCForm Me.tbFLCurve2.Margin = New System.Windows.Forms.Padding(3, 3, 6, 3) Me.tbFLCurve2.Name = "tbFLCurve2" Me.tbFLCurve2.Size = New System.Drawing.Size(277, 20) - Me.tbFLCurve2.TabIndex = 57 + Me.tbFLCurve2.TabIndex = 46 ' 'btFLCurveFile2 ' @@ -844,7 +844,7 @@ Partial Class IHPCForm Me.btFLCurveFile2.Margin = New System.Windows.Forms.Padding(0) Me.btFLCurveFile2.Name = "btFLCurveFile2" Me.btFLCurveFile2.Size = New System.Drawing.Size(24, 24) - Me.btFLCurveFile2.TabIndex = 29 + Me.btFLCurveFile2.TabIndex = 47 Me.btFLCurveFile2.UseVisualStyleBackColor = true ' 'btFLCurve2 @@ -894,7 +894,7 @@ Partial Class IHPCForm Me.TableLayoutPanel4.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27!)) Me.TableLayoutPanel4.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27!)) Me.TableLayoutPanel4.Size = New System.Drawing.Size(496, 82) - Me.TableLayoutPanel4.TabIndex = 62 + Me.TableLayoutPanel4.TabIndex = 120 ' 'Label17 ' @@ -945,7 +945,7 @@ Partial Class IHPCForm Me.tbOverloadTime2.Location = New System.Drawing.Point(363, 3) Me.tbOverloadTime2.Name = "tbOverloadTime2" Me.tbOverloadTime2.Size = New System.Drawing.Size(56, 20) - Me.tbOverloadTime2.TabIndex = 12 + Me.tbOverloadTime2.TabIndex = 43 ' 'Label24 ' @@ -963,7 +963,7 @@ Partial Class IHPCForm Me.tbVoltage2.Location = New System.Drawing.Point(143, 3) Me.tbVoltage2.Name = "tbVoltage2" Me.tbVoltage2.Size = New System.Drawing.Size(56, 20) - Me.tbVoltage2.TabIndex = 2 + Me.tbVoltage2.TabIndex = 40 ' 'Label20 ' @@ -991,7 +991,7 @@ Partial Class IHPCForm Me.tbContinuousTorque2.Location = New System.Drawing.Point(143, 30) Me.tbContinuousTorque2.Name = "tbContinuousTorque2" Me.tbContinuousTorque2.Size = New System.Drawing.Size(56, 20) - Me.tbContinuousTorque2.TabIndex = 4 + Me.tbContinuousTorque2.TabIndex = 41 ' 'tbContinuousTorqueSpeed2 ' @@ -999,7 +999,7 @@ Partial Class IHPCForm Me.tbContinuousTorqueSpeed2.Location = New System.Drawing.Point(143, 58) Me.tbContinuousTorqueSpeed2.Name = "tbContinuousTorqueSpeed2" Me.tbContinuousTorqueSpeed2.Size = New System.Drawing.Size(56, 20) - Me.tbContinuousTorqueSpeed2.TabIndex = 6 + Me.tbContinuousTorqueSpeed2.TabIndex = 42 ' 'Label27 ' @@ -1028,7 +1028,7 @@ Partial Class IHPCForm Me.tbOverloadTorqueSpeed2.Location = New System.Drawing.Point(363, 58) Me.tbOverloadTorqueSpeed2.Name = "tbOverloadTorqueSpeed2" Me.tbOverloadTorqueSpeed2.Size = New System.Drawing.Size(56, 20) - Me.tbOverloadTorqueSpeed2.TabIndex = 10 + Me.tbOverloadTorqueSpeed2.TabIndex = 45 ' 'Label25 ' @@ -1057,7 +1057,7 @@ Partial Class IHPCForm Me.tbOverloadTorque2.Location = New System.Drawing.Point(363, 30) Me.tbOverloadTorque2.Name = "tbOverloadTorque2" Me.tbOverloadTorque2.Size = New System.Drawing.Size(56, 20) - Me.tbOverloadTorque2.TabIndex = 8 + Me.tbOverloadTorque2.TabIndex = 44 ' 'Label16 ' @@ -1178,7 +1178,7 @@ Partial Class IHPCForm Me.btCancel.Location = New System.Drawing.Point(454, 520) Me.btCancel.Name = "btCancel" Me.btCancel.Size = New System.Drawing.Size(75, 23) - Me.btCancel.TabIndex = 82 + Me.btCancel.TabIndex = 51 Me.btCancel.Text = "Cancel" Me.btCancel.UseVisualStyleBackColor = true ' @@ -1187,7 +1187,7 @@ Partial Class IHPCForm Me.btSave.Location = New System.Drawing.Point(373, 520) Me.btSave.Name = "btSave" Me.btSave.Size = New System.Drawing.Size(75, 23) - Me.btSave.TabIndex = 81 + Me.btSave.TabIndex = 50 Me.btSave.Text = "Save" Me.btSave.UseVisualStyleBackColor = true ' diff --git a/VECTO/GUI/IHPCForm.vb b/VECTO/GUI/IHPCForm.vb index 1fc39549b69d146a9aae735473f6945052b9c493..95f831e3a5fa67a42172e7e6f094c773961ed194 100644 --- a/VECTO/GUI/IHPCForm.vb +++ b/VECTO/GUI/IHPCForm.vb @@ -91,7 +91,7 @@ Public Class IHPCForm tbContinuousTorqueSpeed2.Text = "" tbOverloadTime2.Text = "" tbOverloadTorque2.Text = "" - tbOverloadTorqueSpeed1.Text = "" + tbOverloadTorqueSpeed2.Text = "" tbFLCurve2.Text = "" RemoveAllListViewItems(_lvPowerMap2) @@ -179,9 +179,7 @@ Public Class IHPCForm Dim entry As ListViewItem = listView.SelectedItems(0) IHPCPowerMapInputDialog.tbGear.Text = entry.SubItems(0).Text - If entry.SubItems.Count = 2 Then - IHPCPowerMapInputDialog.tbInputFile.Text = entry.SubItems(1).Text - End If + IHPCPowerMapInputDialog.tbInputFile.Text = entry.SubItems(1).Text IHPCPowerMapInputDialog.tbGear.Focus() If IHPCPowerMapInputDialog.ShowDialog() = DialogResult.OK Then diff --git a/VECTO/GUI/IHPCPowerMapInputDialog.Designer.vb b/VECTO/GUI/IHPCPowerMapInputDialog.Designer.vb index 4e1422a4f28c0b11bb444faeb1739a1f693a60df..ae9b58663ddf17312ed7b15453b35d6782f256f9 100644 --- a/VECTO/GUI/IHPCPowerMapInputDialog.Designer.vb +++ b/VECTO/GUI/IHPCPowerMapInputDialog.Designer.vb @@ -71,7 +71,7 @@ Partial Class IHPCPowerMapInputDialog Me.tbGear.Location = New System.Drawing.Point(46, 4) Me.tbGear.Name = "tbGear" Me.tbGear.Size = New System.Drawing.Size(77, 20) - Me.tbGear.TabIndex = 9 + Me.tbGear.TabIndex = 1 ' 'Label3 ' @@ -96,7 +96,7 @@ Partial Class IHPCPowerMapInputDialog Me.TableLayoutPanel5.RowCount = 1 Me.TableLayoutPanel5.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100!)) Me.TableLayoutPanel5.Size = New System.Drawing.Size(356, 39) - Me.TableLayoutPanel5.TabIndex = 8 + Me.TableLayoutPanel5.TabIndex = 11 ' 'btAddFilePath ' @@ -105,7 +105,7 @@ Partial Class IHPCPowerMapInputDialog Me.btAddFilePath.Location = New System.Drawing.Point(324, 6) Me.btAddFilePath.Name = "btAddFilePath" Me.btAddFilePath.Size = New System.Drawing.Size(24, 26) - Me.btAddFilePath.TabIndex = 30 + Me.btAddFilePath.TabIndex = 13 Me.btAddFilePath.UseVisualStyleBackColor = true ' 'tbInputFile @@ -114,7 +114,7 @@ Partial Class IHPCPowerMapInputDialog Me.tbInputFile.Location = New System.Drawing.Point(3, 9) Me.tbInputFile.Name = "tbInputFile" Me.tbInputFile.Size = New System.Drawing.Size(310, 20) - Me.tbInputFile.TabIndex = 0 + Me.tbInputFile.TabIndex = 12 ' 'TableLayoutPanel1 ' @@ -136,7 +136,7 @@ Partial Class IHPCPowerMapInputDialog Me.btAddInput.Location = New System.Drawing.Point(3, 3) Me.btAddInput.Name = "btAddInput" Me.btAddInput.Size = New System.Drawing.Size(67, 23) - Me.btAddInput.TabIndex = 0 + Me.btAddInput.TabIndex = 14 Me.btAddInput.Text = "OK" ' 'btCancel @@ -146,7 +146,7 @@ Partial Class IHPCPowerMapInputDialog Me.btCancel.Location = New System.Drawing.Point(77, 3) Me.btCancel.Name = "btCancel" Me.btCancel.Size = New System.Drawing.Size(67, 23) - Me.btCancel.TabIndex = 1 + Me.btCancel.TabIndex = 15 Me.btCancel.Text = "Cancel" ' 'IHPCPowerMapInputDialog diff --git a/VECTO/Input Files/IEPCInputData.vb b/VECTO/Input Files/IEPCInputData.vb index 28b703488b9e131365c85bd4bc40b214a49cd6ec..3457bf1912648f63313a3ab2478aa52e768402c9 100644 --- a/VECTO/Input Files/IEPCInputData.vb +++ b/VECTO/Input Files/IEPCInputData.vb @@ -97,16 +97,16 @@ Public Class IEPCInputData Dim gearNumber = 1 For Each entry As ListViewItem In gearsListView.Items - Dim currentEntry = new GearEntry + Dim currentEntry = new GearEntry currentEntry.GearNumber = gearNumber gearNumber += 1 currentEntry.Ratio = entry.SubItems(0).Text.ToDouble() If Not entry.SubItems(1).Text = Nothing Then _ - currentEntry.MaxOutputShaftSpeed = entry.SubItems(1).Text.ToDouble().SI(Of PerSecond) + currentEntry.MaxOutputShaftTorque = entry.SubItems(1).Text.ToDouble().SI(Of NewtonMeter) If Not entry.SubItems(2).Text = Nothing Then _ - currentEntry.MaxOutputShaftTorque = entry.SubItems(2).Text.ToDouble().SI(Of NewtonMeter) + currentEntry.MaxOutputShaftSpeed = entry.SubItems(2).Text.ToDouble().SI(Of PerSecond) _gears.Add(currentEntry) Next