diff --git a/VECTO/GUI/F_ENG.vb b/VECTO/GUI/F_ENG.vb index 46e6fab3f7a91034b6d5ea1790dd46c1a12277a1..963279e7abf4083a9ae1761dc7fe2f6bdf1d9cb3 100644 --- a/VECTO/GUI/F_ENG.vb +++ b/VECTO/GUI/F_ENG.vb @@ -278,10 +278,6 @@ Public Class F_ENG Change() End Sub - Private Sub TbPnenn_TextChanged(sender As System.Object, e As System.EventArgs) - Change() - End Sub - Private Sub TbDispl_TextChanged(sender As System.Object, e As System.EventArgs) Handles TbDispl.TextChanged Change() DeclInit() @@ -296,10 +292,6 @@ Public Class F_ENG Change() End Sub - Private Sub TbNnenn_TextChanged(sender As System.Object, e As System.EventArgs) - Change() - End Sub - Private Sub TbMAP_TextChanged(sender As System.Object, e As System.EventArgs) _ Handles TbMAP.TextChanged, TbFLD.TextChanged UpdatePic() @@ -318,10 +310,6 @@ Public Class F_ENG Change() End Sub - Private Sub LvFLDs_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) - UpdatePic() - End Sub - #End Region diff --git a/VECTO/GUI/F_JIRA.vb b/VECTO/GUI/F_JIRA.vb index 3bc92cb6223e4f2ac3ab88c3797498f79535d944..5094fe39c33b00b4fe130372bb7ef66de612fb93 100644 --- a/VECTO/GUI/F_JIRA.vb +++ b/VECTO/GUI/F_JIRA.vb @@ -5,11 +5,6 @@ Public Class F_JIRA Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click Me.DialogResult = System.Windows.Forms.DialogResult.OK Me.Close() - End Sub - - Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) - Me.DialogResult = System.Windows.Forms.DialogResult.Cancel - Me.Close() End Sub Private Sub LinkLabel1_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked diff --git a/VECTO/GUI/F_MAINForm.vb b/VECTO/GUI/F_MAINForm.vb index e2ff97de1ef2cf15258b213ea2fa2ba466324555..56b571efb55da4aa23fc8c394d6194b217cc4ede 100644 --- a/VECTO/GUI/F_MAINForm.vb +++ b/VECTO/GUI/F_MAINForm.vb @@ -61,9 +61,6 @@ Public Class F_MAINForm Private ConMenTarget As ListView Private ConMenTarJob As Boolean - Private MODpath As String - Private MODVehList As Int32() - Private CycleTabPage As TabPage Private CycleTabPageVisible As Boolean @@ -128,7 +125,6 @@ Public Class F_MAINForm fbVEH = New cFileBrowser("vveh") fbMAP = New cFileBrowser("vmap") fbDRI = New cFileBrowser("vdri") - fbFLD = New cFileBrowser("vfld") fbENG = New cFileBrowser("veng") fbGBX = New cFileBrowser("vgbx") fbACC = New cFileBrowser("vacc") @@ -1496,27 +1492,6 @@ lbFound: #End Region 'VECTO Start button - Calls VECTO_Launcher or aborts calculation - Private Sub Button1_Click(sender As Object, e As EventArgs) - - 'VECTO Start/Stop - If VECTOworker.IsBusy Then - - 'If VECTO already running: STOP - ComLineShutDown = False - JobAbort() - - Else - - '...Otherwise: START - - 'Save Lists if Crash - SaveFileLists() - - 'Start - VECTO_Launcher() - - End If - End Sub Private Sub btStartV3_Click(sender As Object, e As EventArgs) Handles btStartV3.Click If Not VECTOworkerV3.IsBusy Then diff --git a/VECTO/GUI/F_VECTO.vb b/VECTO/GUI/F_VECTO.vb index a12f91b23784dff7854e98c17626c1c650895308..773946ca649d3fcb7aa3ea6426f8a7c570fc762d 100644 --- a/VECTO/GUI/F_VECTO.vb +++ b/VECTO/GUI/F_VECTO.vb @@ -698,10 +698,6 @@ Public Class F_VECTO Change() End Sub - Private Sub TbAlookahead_TextChanged(sender As Object, e As EventArgs) - Change() - End Sub - Private Sub LvCycles_AfterLabelEdit(sender As Object, e As LabelEditEventArgs) _ Handles LvCycles.AfterLabelEdit Change() diff --git a/VECTO/GUI/F_VEH.vb b/VECTO/GUI/F_VEH.vb index 54eee8866ba17bd8fc6b9649eef44861cc203137..341a85eab07244217b1c37fa358def214a3fcd95 100644 --- a/VECTO/GUI/F_VEH.vb +++ b/VECTO/GUI/F_VEH.vb @@ -543,11 +543,6 @@ Public Class F_VEH Change() End Sub - Private Sub CbRim_SelectedIndexChanged(sender As Object, e As EventArgs) - Change() - DeclInit() - End Sub - Private Sub TBcw_TextChanged(sender As Object, e As EventArgs) _ Handles TbLoad.TextChanged, TBrdyn.TextChanged, TBcdA.TextChanged, TbCdFile.TextChanged, TbRtRatio.TextChanged, cbAngularGearType.SelectedIndexChanged, TbRtPath.TextChanged, tbAngularGearLossMapPath.TextChanged, diff --git a/VECTO/GUI/GearboxGearDialog.vb b/VECTO/GUI/GearboxGearDialog.vb index 3fc3a37ce583e246a3f24c3897d08a0691cb0a8e..df1841fa57ade9d095badc59374bdf961b495a19 100644 --- a/VECTO/GUI/GearboxGearDialog.vb +++ b/VECTO/GUI/GearboxGearDialog.vb @@ -88,12 +88,6 @@ Public Class GearboxGearDialog End If End Sub - Private Sub BtBrowseFld_Click(sender As Object, e As EventArgs) - If fbFLD.OpenDialog(fFileRepl(TbMaxTorque.Text, GbxPath)) Then - TbMaxTorque.Text = fFileWoDir(fbFLD.Files(0), GbxPath) - End If - End Sub - Private Sub Button1_Click(sender As Object, e As EventArgs) Handles BtPrevious.Click If Not IsNumeric(TbRatio.Text) Then MsgBox("Gear ratio is invalid!") diff --git a/VECTO/Input Files/cVEH.vb b/VECTO/Input Files/cVEH.vb index 4c5f57f8f206c1ecc0eb0d938631a3293f67fb4c..8308bdbdf47b97150f408b9589a502702b920710 100644 --- a/VECTO/Input Files/cVEH.vb +++ b/VECTO/Input Files/cVEH.vb @@ -42,7 +42,6 @@ Public Class cVEH Public RtType As tRtType '0=None, 1=Primary, 2=Secondary Public RtRatio As Single = 0 Public RtFile As cSubPath - Private RtDim As Integer Private RtnU As List(Of Single) Private RtM As List(Of Single) diff --git a/VECTO/cJSONparser.vb b/VECTO/cJSONparser.vb index e9c5fa55eb77a92866f259ea52939eb1955d30bd..6d4b57a11a30cefebc726cec7206bfbe4c25934f 100644 --- a/VECTO/cJSONparser.vb +++ b/VECTO/cJSONparser.vb @@ -102,89 +102,6 @@ Public Class JSON Private fullfile As String - Private Function ReadFileXXX(path As String) As Boolean - Dim file As TextFieldParser - - Content.Clear() - - 'check if file exists - If Not IO.File.Exists(path) Then Return False - - 'open file - Try - file = New TextFieldParser(path) - Catch ex As Exception - Return False - End Try - - 'Check if file is empty - If file.EndOfData Then - file.Close() - Return False - End If - - 'read file - fullfile = file.ReadToEnd - - 'close file - file.Close() - - 'trim spaces - fullfile = fullfile.Trim - - 'remove line breaks - fullfile = fullfile.Replace(vbCrLf, "") - - If Left(fullfile, 1) <> "{" Or Right(fullfile, 1) <> "}" Then Return False - - 'parse JSON to Dictionary - Try - Content = GetObject() - Catch ex As Exception - Return False - End Try - - - Return True - End Function - - - Private Function WriteFileXXX(path As String) As Boolean - Dim file As StreamWriter - Dim kv As KeyValuePair(Of String, Object) - Dim str As New StringBuilder - Dim First As Boolean = True - - If Content.Count = 0 Then Return False - - Try - str.AppendLine("{") - For Each kv In Content - If First Then - First = False - Else - str.AppendLine(",") - End If - str.Append(GetKeyValString(1, kv)) - Next - str.AppendLine() - str.AppendLine("}") - Catch ex As Exception - Return False - End Try - - Try - file = My.Computer.FileSystem.OpenTextFileWriter(path, False) - Catch ex As Exception - Return False - End Try - - file.Write(str.ToString) - - file.Close() - - Return True - End Function Private Function GetKeyValString(TabLvl As Integer, ByRef kv As KeyValuePair(Of String, Object)) As String Dim str As New StringBuilder @@ -301,123 +218,6 @@ Public Class JSON Return str End Function - Private Function GetObject() As Dictionary(Of String, Object) - Dim MyDic As Dictionary(Of String, Object) - Dim key As String - Dim obj As Object - Dim i As Integer - Dim i2 As Integer - Dim Valstr As String - Dim ValList As List(Of Object) = Nothing - Dim ArrayMode As Boolean = False - - 'remove { - fullfile = (Right(fullfile, Len(fullfile) - 1)).Trim - - 'new list of key/value pairs - MyDic = New Dictionary(Of String, Object) - - - 'loop through key/value pairs -lb10: - If Left(fullfile, 1) <> ChrW(34) Then - Throw New Exception - Return Nothing - End If - - 'get key - i = fullfile.IndexOf(ChrW(34), 1) - key = Mid(fullfile, 2, i - 1) - fullfile = (Right(fullfile, Len(fullfile) - i - 1)).Trim - fullfile = (Right(fullfile, Len(fullfile) - 1)).Trim - - If key = "" Then - Throw New Exception - Return Nothing - End If - - 'get value (object, number, boolean, array) - If Left(fullfile, 1) = "[" Then - ArrayMode = True - fullfile = (Right(fullfile, Len(fullfile) - 1)).Trim - ValList = New List(Of Object) - End If - -lb20: - If Left(fullfile, 1) = "{" Then - obj = GetObject() - Else - If Left(fullfile, 1) = ChrW(34) Then - 'string - i = fullfile.IndexOf(ChrW(34), 1) - obj = Mid(fullfile, 2, i - 1) - fullfile = (Right(fullfile, Len(fullfile) - i - 1)).Trim - Else - 'number/boolean - i = fullfile.IndexOf(",", 1) - i2 = fullfile.IndexOf("}", 1) - - If i = -1 Then - If i2 = -1 Then - Valstr = Right(fullfile, Len(fullfile) - 1) - fullfile = "" - Else - Valstr = Mid(fullfile, 1, i2) - fullfile = (Right(fullfile, Len(fullfile) - i2)).Trim - End If - Else - If i2 = -1 Or i < i2 Then - Valstr = Mid(fullfile, 1, i) - fullfile = (Right(fullfile, Len(fullfile) - i)).Trim - Else - Valstr = Mid(fullfile, 1, i2) - fullfile = (Right(fullfile, Len(fullfile) - i2)).Trim - End If - End If - - If IsNumeric(Valstr) Then - obj = CDbl(Valstr) - ElseIf (UCase(Valstr)).Trim = "FALSE" Then - obj = False - ElseIf (UCase(Valstr)).Trim = "TRUE" Then - obj = True - ElseIf (UCase(Valstr)).Trim = "NULL" Then - obj = Nothing - Else - Throw New Exception - Return Nothing - End If - - End If - End If - - If ArrayMode Then - ValList.Add(obj) - If Left(fullfile, 1) = "]" Then - ArrayMode = False - fullfile = (Right(fullfile, Len(fullfile) - 1)).Trim - MyDic.Add(key, ValList) - End If - Else - MyDic.Add(key, obj) - End If - - If Left(fullfile, 1) = "," Then - fullfile = (Right(fullfile, Len(fullfile) - 1)).Trim - If ArrayMode Then - GoTo lb20 - Else - GoTo lb10 - End If - End If - - If Left(fullfile, 1) = "}" Then - fullfile = (Right(fullfile, Len(fullfile) - 1)).Trim - End If - - Return MyDic - End Function - #End Region End Class diff --git a/VECTO/cRegression.vb b/VECTO/cRegression.vb index 61241b661f6b4bd534718c1defbcb89ea5613637..b48141723f55224ebed2a8fe020bb8a35102acc7 100644 --- a/VECTO/cRegression.vb +++ b/VECTO/cRegression.vb @@ -40,17 +40,15 @@ Public Class cRegression Public PearsonsR As Double - Public t As Double + Public t As Double - Dim Residuals As ArrayList = New ArrayList + Public Overrides Function ToString() As String - Public Overrides Function ToString() As String + Dim ret As String = "SampleSize=" & Me.SampleSize & vbCrLf & "StandardError=" & Me.StandardError & vbCrLf & "y=" & Me.a & " + " & Me.b & "x" - Dim ret As String = "SampleSize=" & Me.SampleSize & vbCrLf & "StandardError=" & Me.StandardError & vbCrLf & "y=" & Me.a & " + " & Me.b & "x" + Return ret - Return ret - - End Function + End Function End Class