diff --git a/CSE/GUI/F_Main.Designer.vb b/CSE/GUI/F_Main.Designer.vb index 9137293e3b861055b459710fac772eb7a2ec370d..5908aec2a8fa869c25e4facbd8f42ab353dede42 100644 --- a/CSE/GUI/F_Main.Designer.vb +++ b/CSE/GUI/F_Main.Designer.vb @@ -114,6 +114,9 @@ Partial Class F_Main Me.TPMain = New System.Windows.Forms.TabPage() Me.TPCriteria = New System.Windows.Forms.TabPage() Me.GroupBox9 = New System.Windows.Forms.GroupBox() + Me.ButtonCrtImport = New System.Windows.Forms.Button() + Me.ButtonCrtExport = New System.Windows.Forms.Button() + Me.ButtonCrtReset = New System.Windows.Forms.Button() Me.LDistFloat = New System.Windows.Forms.Label() Me.TBDistFloat = New System.Windows.Forms.TextBox() Me.Label81 = New System.Windows.Forms.Label() @@ -231,9 +234,6 @@ Partial Class F_Main Me.TBDeltaXMax = New System.Windows.Forms.TextBox() Me.ButtonClearLogs = New System.Windows.Forms.Button() Me.ButtonLoadJob = New System.Windows.Forms.Button() - Me.ButtonImportOpts = New System.Windows.Forms.Button() - Me.ButtonExportOpts = New System.Windows.Forms.Button() - Me.ButtonOptsToStd = New System.Windows.Forms.Button() Me.MenuStrip1.SuspendLayout() Me.GroupBoxJob.SuspendLayout() Me.GroupBox6.SuspendLayout() @@ -852,12 +852,14 @@ Partial Class F_Main Me.ButtonSaveAsNew.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.ButtonSaveAsNew.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonSaveAsNew.Location = New System.Drawing.Point(855, 557) + Me.ButtonSaveAsNew.Image = Global.CSE.My.Resources.Resources.Speichern_unter + Me.ButtonSaveAsNew.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.ButtonSaveAsNew.Location = New System.Drawing.Point(819, 557) Me.ButtonSaveAsNew.Margin = New System.Windows.Forms.Padding(2) Me.ButtonSaveAsNew.Name = "ButtonSaveAsNew" - Me.ButtonSaveAsNew.Size = New System.Drawing.Size(73, 112) + Me.ButtonSaveAsNew.Size = New System.Drawing.Size(109, 112) Me.ButtonSaveAsNew.TabIndex = 32 - Me.ButtonSaveAsNew.Text = "Save as new Job" + Me.ButtonSaveAsNew.Text = "Save Job" Me.ButtonSaveAsNew.UseVisualStyleBackColor = True ' 'ButtonCalC @@ -1074,7 +1076,7 @@ Partial Class F_Main Me.TabControlOutMsg.Margin = New System.Windows.Forms.Padding(2) Me.TabControlOutMsg.Name = "TabControlOutMsg" Me.TabControlOutMsg.SelectedIndex = 0 - Me.TabControlOutMsg.Size = New System.Drawing.Size(842, 186) + Me.TabControlOutMsg.Size = New System.Drawing.Size(807, 186) Me.TabControlOutMsg.TabIndex = 34 ' 'TabPageMSG @@ -1085,7 +1087,7 @@ Partial Class F_Main Me.TabPageMSG.Margin = New System.Windows.Forms.Padding(2) Me.TabPageMSG.Name = "TabPageMSG" Me.TabPageMSG.Padding = New System.Windows.Forms.Padding(2) - Me.TabPageMSG.Size = New System.Drawing.Size(834, 160) + Me.TabPageMSG.Size = New System.Drawing.Size(799, 160) Me.TabPageMSG.TabIndex = 0 Me.TabPageMSG.Text = "Messages(0)" Me.TabPageMSG.UseVisualStyleBackColor = True @@ -1101,7 +1103,7 @@ Partial Class F_Main Me.ListBoxMSG.Location = New System.Drawing.Point(2, 4) Me.ListBoxMSG.Margin = New System.Windows.Forms.Padding(2) Me.ListBoxMSG.Name = "ListBoxMSG" - Me.ListBoxMSG.Size = New System.Drawing.Size(828, 147) + Me.ListBoxMSG.Size = New System.Drawing.Size(793, 147) Me.ListBoxMSG.TabIndex = 23 ' 'TabPageWar @@ -1111,7 +1113,7 @@ Partial Class F_Main Me.TabPageWar.Margin = New System.Windows.Forms.Padding(2) Me.TabPageWar.Name = "TabPageWar" Me.TabPageWar.Padding = New System.Windows.Forms.Padding(2) - Me.TabPageWar.Size = New System.Drawing.Size(834, 160) + Me.TabPageWar.Size = New System.Drawing.Size(799, 160) Me.TabPageWar.TabIndex = 1 Me.TabPageWar.Text = "Warnings (0)" Me.TabPageWar.UseVisualStyleBackColor = True @@ -1136,7 +1138,7 @@ Partial Class F_Main Me.TabPageErr.Location = New System.Drawing.Point(4, 4) Me.TabPageErr.Margin = New System.Windows.Forms.Padding(2) Me.TabPageErr.Name = "TabPageErr" - Me.TabPageErr.Size = New System.Drawing.Size(834, 160) + Me.TabPageErr.Size = New System.Drawing.Size(799, 160) Me.TabPageErr.TabIndex = 2 Me.TabPageErr.Text = "Errors (0)" Me.TabPageErr.UseVisualStyleBackColor = True @@ -1209,9 +1211,9 @@ Partial Class F_Main ' 'GroupBox9 ' - Me.GroupBox9.Controls.Add(Me.ButtonImportOpts) - Me.GroupBox9.Controls.Add(Me.ButtonExportOpts) - Me.GroupBox9.Controls.Add(Me.ButtonOptsToStd) + Me.GroupBox9.Controls.Add(Me.ButtonCrtImport) + Me.GroupBox9.Controls.Add(Me.ButtonCrtExport) + Me.GroupBox9.Controls.Add(Me.ButtonCrtReset) Me.GroupBox9.Controls.Add(Me.LDistFloat) Me.GroupBox9.Controls.Add(Me.TBDistFloat) Me.GroupBox9.Controls.Add(Me.Label81) @@ -1224,6 +1226,38 @@ Partial Class F_Main Me.GroupBox9.TabStop = False Me.GroupBox9.Text = "Dataset validity criteria" ' + 'ButtonCrtImport + ' + Me.ButtonCrtImport.Image = Global.CSE.My.Resources.Resources.Öffnen + Me.ButtonCrtImport.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.ButtonCrtImport.Location = New System.Drawing.Point(305, 62) + Me.ButtonCrtImport.Name = "ButtonCrtImport" + Me.ButtonCrtImport.Size = New System.Drawing.Size(143, 43) + Me.ButtonCrtImport.TabIndex = 87 + Me.ButtonCrtImport.Text = "Import Criteria" + Me.ButtonCrtImport.UseVisualStyleBackColor = True + ' + 'ButtonCrtExport + ' + Me.ButtonCrtExport.Image = Global.CSE.My.Resources.Resources.Speichern_unter + Me.ButtonCrtExport.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.ButtonCrtExport.Location = New System.Drawing.Point(306, 111) + Me.ButtonCrtExport.Name = "ButtonCrtExport" + Me.ButtonCrtExport.Size = New System.Drawing.Size(142, 43) + Me.ButtonCrtExport.TabIndex = 86 + Me.ButtonCrtExport.Text = "Export Criteria" + Me.ButtonCrtExport.UseVisualStyleBackColor = True + ' + 'ButtonCrtReset + ' + Me.ButtonCrtReset.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.ButtonCrtReset.Location = New System.Drawing.Point(306, 13) + Me.ButtonCrtReset.Name = "ButtonCrtReset" + Me.ButtonCrtReset.Size = New System.Drawing.Size(142, 43) + Me.ButtonCrtReset.TabIndex = 85 + Me.ButtonCrtReset.Text = "Reset Criteria" + Me.ButtonCrtReset.UseVisualStyleBackColor = True + ' 'LDistFloat ' Me.LDistFloat.AutoSize = True @@ -2334,10 +2368,11 @@ Partial Class F_Main ' Me.ButtonClearLogs.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.ButtonClearLogs.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonClearLogs.Location = New System.Drawing.Point(855, 674) + Me.ButtonClearLogs.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.ButtonClearLogs.Location = New System.Drawing.Point(819, 674) Me.ButtonClearLogs.Margin = New System.Windows.Forms.Padding(2) Me.ButtonClearLogs.Name = "ButtonClearLogs" - Me.ButtonClearLogs.Size = New System.Drawing.Size(73, 32) + Me.ButtonClearLogs.Size = New System.Drawing.Size(109, 32) Me.ButtonClearLogs.TabIndex = 36 Me.ButtonClearLogs.Text = "Clear log" Me.ButtonClearLogs.UseVisualStyleBackColor = True @@ -2346,41 +2381,16 @@ Partial Class F_Main ' Me.ButtonLoadJob.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.ButtonLoadJob.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonLoadJob.Location = New System.Drawing.Point(855, 520) + Me.ButtonLoadJob.Image = Global.CSE.My.Resources.Resources.Öffnen + Me.ButtonLoadJob.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.ButtonLoadJob.Location = New System.Drawing.Point(819, 520) Me.ButtonLoadJob.Margin = New System.Windows.Forms.Padding(2) Me.ButtonLoadJob.Name = "ButtonLoadJob" - Me.ButtonLoadJob.Size = New System.Drawing.Size(73, 33) + Me.ButtonLoadJob.Size = New System.Drawing.Size(109, 33) Me.ButtonLoadJob.TabIndex = 37 Me.ButtonLoadJob.Text = "Load Job" Me.ButtonLoadJob.UseVisualStyleBackColor = True ' - 'ButtonImportOpts - ' - Me.ButtonImportOpts.Location = New System.Drawing.Point(312, 110) - Me.ButtonImportOpts.Name = "ButtonImportOpts" - Me.ButtonImportOpts.Size = New System.Drawing.Size(136, 43) - Me.ButtonImportOpts.TabIndex = 87 - Me.ButtonImportOpts.Text = "Import Criteria" - Me.ButtonImportOpts.UseVisualStyleBackColor = True - ' - 'ButtonExportOpts - ' - Me.ButtonExportOpts.Location = New System.Drawing.Point(313, 61) - Me.ButtonExportOpts.Name = "ButtonExportOpts" - Me.ButtonExportOpts.Size = New System.Drawing.Size(135, 43) - Me.ButtonExportOpts.TabIndex = 86 - Me.ButtonExportOpts.Text = "Export Criteria" - Me.ButtonExportOpts.UseVisualStyleBackColor = True - ' - 'ButtonOptsToStd - ' - Me.ButtonOptsToStd.Location = New System.Drawing.Point(313, 13) - Me.ButtonOptsToStd.Name = "ButtonOptsToStd" - Me.ButtonOptsToStd.Size = New System.Drawing.Size(135, 43) - Me.ButtonOptsToStd.TabIndex = 85 - Me.ButtonOptsToStd.Text = "Reset Criteria" - Me.ButtonOptsToStd.UseVisualStyleBackColor = True - ' 'F_Main ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -2657,8 +2667,8 @@ Partial Class F_Main Friend WithEvents ButtonDataHS As System.Windows.Forms.Button Friend WithEvents ButtonClearLogs As System.Windows.Forms.Button Friend WithEvents ButtonLoadJob As System.Windows.Forms.Button - Friend WithEvents ButtonImportOpts As System.Windows.Forms.Button - Friend WithEvents ButtonExportOpts As System.Windows.Forms.Button - Friend WithEvents ButtonOptsToStd As System.Windows.Forms.Button + Friend WithEvents ButtonCrtImport As System.Windows.Forms.Button + Friend WithEvents ButtonCrtExport As System.Windows.Forms.Button + Friend WithEvents ButtonCrtReset As System.Windows.Forms.Button End Class diff --git a/CSE/GUI/F_Main.vb b/CSE/GUI/F_Main.vb index 556b7bfe0683d4702ffbbc1941ba03acf2de679a..96464124e950fb0c9fa3b6cf5d795ac4c31d9d99 100644 --- a/CSE/GUI/F_Main.vb +++ b/CSE/GUI/F_Main.vb @@ -248,7 +248,7 @@ Public Class F_Main End Sub ' Open the filebrowser for the selection of the first low speed data file from the test run - Private Sub ButtonSelectDataLS1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) + Private Sub ButtonSelectDataLS1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSelectDataLS1.Click ' Open the filebrowser with the *.csdat parameter If fbVEL.OpenDialog(Prefs.workingDir, False) Then If (fbVEL.Files(0) <> Nothing) Then @@ -258,7 +258,7 @@ Public Class F_Main End Sub ' Open the first low speed data file in Excel - Private Sub ButtonDataLS1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) + Private Sub ButtonDataLS1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonDataLS1.Click ' Declarations Dim PSI As New ProcessStartInfo @@ -272,7 +272,7 @@ Public Class F_Main End Sub ' Open the filebrowser for the selection of the high speed data file from the test run - Private Sub ButtonSelectDataHS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) + Private Sub ButtonSelectDataHS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSelectDataHS.Click ' Open the filebrowser with the *.csdat parameter If fbVEL.OpenDialog(Prefs.workingDir, False) Then If (fbVEL.Files(0) <> Nothing) Then @@ -282,7 +282,7 @@ Public Class F_Main End Sub ' Open the high speed data file in Excel - Private Sub ButtonDataHS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) + Private Sub ButtonDataHS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonDataHS.Click ' Declarations Dim PSI As New ProcessStartInfo @@ -296,7 +296,7 @@ Public Class F_Main End Sub ' Open the filebrowser for the selection of the second low speed data file from the test run - Private Sub ButtonSelectDataLS2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) + Private Sub ButtonSelectDataLS2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSelectDataLS2.Click ' Open the filebrowser with the *.csdat parameter If fbVEL.OpenDialog(Prefs.workingDir, False) Then If (fbVEL.Files(0) <> Nothing) Then @@ -306,7 +306,7 @@ Public Class F_Main End Sub ' Open the second low speed data file in Excel - Private Sub ButtonDataLS2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) + Private Sub ButtonDataLS2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonDataLS2.Click ' Declarations Dim PSI As New ProcessStartInfo @@ -503,7 +503,9 @@ Public Class F_Main ' Check if the input is a number Private Sub TextBox_TextChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TBDeltaTTireMax.KeyPress, TBDeltaRRCMax.KeyPress, TBTambVar.KeyPress, _ TBTambTamac.KeyPress, TBTambMax.KeyPress, TBTambMin.KeyPress, TBDeltaHzMax.KeyPress, TBRhoAirRef.KeyPress, TBAccCorrAve.KeyPress, TBDeltaParaMax.KeyPress, TBDeltaXMax.KeyPress, TBDeltaYMax.KeyPress, _ - TBDeltaHeadMax.KeyPress, TBDsMinCAL.KeyPress, TBDsMinLS.KeyPress, TBDsMinHS.KeyPress, TBDsMinHeadHS.KeyPress, TBvWindAveLSMax.KeyPress, TBvWindAveHSMax.KeyPress, TBvWindAveCALMax.KeyPress, TBvWind1sLSMax.KeyPress, TBvWind1sHSMax.KeyPress, TBvWind1sCALMax.KeyPress, TBvVehFloatD.KeyPress, TBvVehAveLSMin.KeyPress, TBvVehAveLSMax.KeyPress, TBvVehAveHSMin.KeyPress, TBvVeh1sD.KeyPress, TBTqSumFloatD.KeyPress, TBTq1sD.KeyPress, TBLengCrit.KeyPress, TBDistFloat.KeyPress, TBBetaAveHSMax.KeyPress, TBBetaAveCALMax.KeyPress + TBDeltaHeadMax.KeyPress, TBDsMinCAL.KeyPress, TBDsMinLS.KeyPress, TBDsMinHS.KeyPress, TBDsMinHeadHS.KeyPress, TBTq1sD.KeyPress, TBvVeh1sD.KeyPress, TBBetaAveHSMax.KeyPress, TBvVehAveHSMin.KeyPress, _ + TBvWind1sHSMax.KeyPress, TBvWindAveHSMax.KeyPress, TBTqSumFloatD.KeyPress, TBvVehFloatD.KeyPress, TBvVehAveLSMin.KeyPress, TBvVehAveLSMax.KeyPress, TBvWind1sLSMax.KeyPress, TBvWindAveLSMax.KeyPress, _ + TBLengCrit.KeyPress, TBBetaAveCALMax.KeyPress, TBvWind1sCALMax.KeyPress, TBvWindAveCALMax.KeyPress, TBDistFloat.KeyPress Select Case Asc(e.KeyChar) Case 48 To 57, 46 ' Zahlen zulassen (ASCII) Case Else ' Alles andere Unterdrücken @@ -512,7 +514,7 @@ Public Class F_Main End Sub ' Set all textboxes to standard - Private Sub doResetCriteria(ByVal sender As System.Object, ByVal e As System.EventArgs) + Private Sub doResetCriteria(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonCrtReset.Click ' Set the parameter to standard installJob(New cJob()) @@ -521,7 +523,7 @@ Public Class F_Main End Sub ' Set all textboxes to standard - Private Sub doExportCriteria(ByVal sender As System.Object, ByVal e As System.EventArgs) + Private Sub doExportCriteria(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonCrtExport.Click UI_PopulateToJob(False) UI_PopulateToCriteria() If fbCRT.SaveDialog(Prefs.workingDir) Then @@ -532,7 +534,7 @@ Public Class F_Main End Sub ' Set all textboxes to standard - Private Sub doImportCriteria(ByVal sender As System.Object, ByVal e As System.EventArgs) + Private Sub doImportCriteria(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonCrtImport.Click If fbCRT.OpenDialog(Prefs.workingDir) Then Dim fname = fbCRT.Files(0) If fname Is Nothing Then @@ -853,16 +855,16 @@ Public Class F_Main #Region "Infobox" ' Deactivate the message - Private Sub DeacMsg(ByVal sender As Object, ByVal e As System.EventArgs) Handles _ - _ - _ - _ - _ - LDeltaTTireMax.MouseLeave, TBDeltaTTireMax.MouseLeave, LDeltaRRCMax.MouseLeave, TBDeltaRRCMax.MouseLeave, LTambVar.MouseLeave, TBTambVar.MouseLeave, _ + Private Sub DeacMsg(ByVal sender As Object, ByVal e As System.EventArgs) Handles LDistFloat.MouseLeave, TBDistFloat.MouseLeave, LvWindAveCALMax.MouseLeave, TBvWindAveCALMax.MouseLeave, _ + LvWind1sCALMax.MouseLeave, TBvWind1sCALMax.MouseLeave, LBetaAveCALMax.MouseLeave, TBBetaAveCALMax.MouseLeave, LLengCrit.MouseLeave, TBLengCrit.MouseLeave, LvWindAveLSMax.MouseLeave, _ + TBvWindAveLSMax.MouseLeave, LvWind1sLSMax.MouseLeave, TBvWind1sLSMax.MouseLeave, LvVehAveLSMax.MouseLeave, TBvVehAveLSMax.MouseLeave, LvVehAveLSMin.MouseLeave, TBvVehAveLSMin.MouseLeave, _ + LvVehFloatD.MouseLeave, TBvVehFloatD.MouseLeave, LTqSumFloatD.MouseLeave, TBTqSumFloatD.MouseLeave, LvWindAveHSMax.MouseLeave, TBvWindAveHSMax.MouseLeave, LvWind1sHSMax.MouseLeave, _ + TBvWind1sHSMax.MouseLeave, LvVehAveHSMin.MouseLeave, TBvVehAveHSMin.MouseLeave, LBetaAveHSMax.MouseLeave, TBBetaAveHSMax.MouseLeave, LvVeh1sD.MouseLeave, TBvVeh1sD.MouseLeave, _ + LTq1sD.MouseLeave, TBTq1sD.MouseLeave, LDeltaTTireMax.MouseLeave, TBDeltaTTireMax.MouseLeave, LDeltaRRCMax.MouseLeave, TBDeltaRRCMax.MouseLeave, LTambVar.MouseLeave, TBTambVar.MouseLeave, _ LTambTamac.MouseLeave, TBTambTamac.MouseLeave, LTambMax.MouseLeave, TBTambMax.MouseLeave, LTambMin.MouseLeave, TBTambMin.MouseLeave, LDeltaHzMax.MouseLeave, TBDeltaHzMax.MouseLeave, _ LRhoAirRef.MouseLeave, TBRhoAirRef.MouseLeave, LAccCorrAve.MouseLeave, TBAccCorrAve.MouseLeave, LDeltaParaMax.MouseLeave, TBDeltaParaMax.MouseLeave, LDeltaXMax.MouseLeave, TBDeltaXMax.MouseLeave, _ LDeltaYMax.MouseLeave, TBDeltaYMax.MouseLeave, LContAng.MouseLeave, TBDeltaHeadMax.MouseLeave, LDsMinCAL.MouseLeave, TBDsMinCAL.MouseLeave, LDsMinLS.MouseLeave, TBDsMinLS.MouseLeave, LDsMinHS.MouseLeave, _ - TBDsMinHS.MouseLeave, LDsMinHeadMS.MouseLeave, TBDsMinHeadHS.MouseLeave, TBvWindAveLSMax.MouseLeave, TBvWindAveHSMax.MouseLeave, TBvWindAveCALMax.MouseLeave, TBvWind1sLSMax.MouseLeave, TBvWind1sHSMax.MouseLeave, TBvWind1sCALMax.MouseLeave, TBvVehFloatD.MouseLeave, TBvVehAveLSMin.MouseLeave, TBvVehAveLSMax.MouseLeave, TBvVehAveHSMin.MouseLeave, TBvVeh1sD.MouseLeave, TBTqSumFloatD.MouseLeave, TBTq1sD.MouseLeave, TBLengCrit.MouseLeave, TBDistFloat.MouseLeave, TBBetaAveHSMax.MouseLeave, TBBetaAveCALMax.MouseLeave, LvWindAveLSMax.MouseLeave, LvWindAveHSMax.MouseLeave, LvWindAveCALMax.MouseLeave, LvWind1sLSMax.MouseLeave, LvWind1sHSMax.MouseLeave, LvWind1sCALMax.MouseLeave, LvVehFloatD.MouseLeave, LvVehAveLSMin.MouseLeave, LvVehAveLSMax.MouseLeave, LvVehAveHSMin.MouseLeave, LvVeh1sD.MouseLeave, LTqSumFloatD.MouseLeave, LTq1sD.MouseLeave, LLengCrit.MouseLeave, LDistFloat.MouseLeave, LBetaAveHSMax.MouseLeave, LBetaAveCALMax.MouseLeave + TBDsMinHS.MouseLeave, LDsMinHeadMS.MouseLeave, TBDsMinHeadHS.MouseLeave TBInfo.Visible = False PBInfoIcon.Visible = False End Sub diff --git a/CSE/GUI/F_Preferences.vb b/CSE/GUI/F_Preferences.vb index 6abbb8384d39e7a48138ff0c11d5c614054b89ea..c2a6f717d2b69bdbacdae0e1230055e3ea138edf 100644 --- a/CSE/GUI/F_Preferences.vb +++ b/CSE/GUI/F_Preferences.vb @@ -64,7 +64,7 @@ Public Class F_Preferences UI_PopulateTo(newPrefs) ' Write the config file - newPrefs.Store(PrefsPath) + newPrefs.Store(PrefsPath, newPrefs) Prefs = newPrefs ' Replace active prefs if successful. ' Message for the restart of VECTO diff --git a/CSE/IO/cCriteria.vb b/CSE/IO/cCriteria.vb index ecc55787d1cfdc6ed7daa88954dc879e18da2fe8..f63aeeb2d932194a1b5e24104556dd75e860a935 100644 --- a/CSE/IO/cCriteria.vb +++ b/CSE/IO/cCriteria.vb @@ -233,7 +233,7 @@ Public Class cCriteria Public t_amb_tarmac As Single ' [°C]; Maximum temperature below which no documentation of tarmac conditions is necessary - Overrides Sub Store(ByVal fpath As String) + Overrides Sub Store(ByVal fpath As String, Optional ByVal prefs As cPreferences = Nothing) Dim g, b As Object b = Me.Body @@ -284,7 +284,7 @@ Public Class cCriteria g.t_amb_max = Me.t_amb_max g.t_amb_min = Me.t_amb_min - MyBase.Store(fpath) + MyBase.Store(fpath, prefs) End Sub Sub PopulateApp() diff --git a/CSE/IO/cJsonFile.vb b/CSE/IO/cJsonFile.vb index 61c046297a5d52dc6058ce8e58418b67886e30c6..b298599f321e036d3d8386314d312198f03a0cb9 100644 --- a/CSE/IO/cJsonFile.vb +++ b/CSE/IO/cJsonFile.vb @@ -153,17 +153,19 @@ Public MustInherit Class cJsonFile End Sub ''' <summary>Validates and Writing to the config file</summary> - Overridable Sub Store(ByVal fpath As String) + Overridable Sub Store(ByVal fpath As String, Optional ByVal prefs As cPreferences = Nothing) logme(4, False, format("Writting JSON-file({0})...", fpath)) - Me.UpdateHeader() + Me.UpdateHeader(prefs) Me.Validate(Me.StrictBody) WriteJsonFile(fpath, Content) End Sub ''' <summary>Maintains header's standard props and overlays any props from subclass.</summary> + ''' <param name="prefs">It is there to be used when storing cPreferences themselfs.</param> ''' <remarks>Note that it is invoked early enough, before the new file has acquired a Body and before AppPreferences exist(!).</remarks> - Sub UpdateHeader() + Sub UpdateHeader(Optional ByVal prefs As cPreferences = Nothing) + If prefs Is Nothing Then prefs = CSE.Prefs Dim h As JObject = Me.Header h("ModifiedDate") = DateTime.Now.ToString(dateFrmt) @@ -171,7 +173,7 @@ Public MustInherit Class cJsonFile '' Decide whether to add username in "CreatedBy". '' Dim username = "" - If Prefs Is Nothing OrElse Not Prefs.hideUsername Then + If prefs Is Nothing OrElse Not prefs.hideUsername Then username = System.Security.Principal.WindowsIdentity.GetCurrent().Name & "@" End If h("CreatedBy") = format("{0}{1}(lic: {2})", username, Lic.LicString, Lic.GUID) @@ -191,8 +193,8 @@ Public MustInherit Class cJsonFile Dim bodySchema = h("BodySchema") If bodySchema IsNot Nothing AndAlso bodySchema.Type = JTokenType.Boolean Then isIncludeSchema = bodySchema - ElseIf Prefs IsNot Nothing Then - isIncludeSchema = Prefs.includeSchemas + ElseIf prefs IsNot Nothing Then + isIncludeSchema = prefs.includeSchemas Else isIncludeSchema = False End If @@ -210,8 +212,10 @@ Public MustInherit Class cJsonFile End Sub ''' <exception cref="FormatException">includes all validation errors</exception> + ''' <param name="prefs">It is there to be used when storing cPreferences themselfs.</param> ''' <param name="strictHeader">when false, relaxes Header's schema (used on Loading to be more accepting)</param> - Friend Sub Validate(Optional ByVal strictHeader As Boolean = False) + Friend Sub Validate(Optional ByVal strictHeader As Boolean = False, Optional ByVal prefs As cPreferences = Nothing) + If prefs Is Nothing Then prefs = CSE.Prefs Dim validateMsgs As IList(Of String) = New List(Of String) Dim fileSchema = JsonSchema.Parse(JSchemaStr_Header(strictHeader)) diff --git a/DemoData/EvaluationDemo.csjob.json b/DemoData/EvaluationDemo.csjob.json new file mode 100644 index 0000000000000000000000000000000000000000..4e7b9fe2ac3ef88ca250ce26d246d7f94cf0dc2e --- /dev/null +++ b/DemoData/EvaluationDemo.csjob.json @@ -0,0 +1,70 @@ +{ + "Header": { + "Title": "vecto-cse JOB", + "FileVersion": "1.0.0", + "AppVersion": "2.0.1-pre1", + "ModifiedDate": "2014/06/04 02:48:10 +02:00", + "CreatedBy": "ISIS\\ankostis@JRC(lic: 04c137c0-24df-4d90-a3e2-b02fe3dba8ea)", + "StrictBody": false, + "BodySchema": null + }, + "Body": { + "vehicle_fpath": "VehicleDemo.csveh.json", + "ambient_fpath": "AmbientConditionsDemo.csamb", + "Anemometer": [ + 1.0, + 0.0, + 1.0, + 0.0 + ], + "track_fpath": "TrackDemo.csms", + "calibration_fpath": "DataDemo_CAL.csdat", + "low1_fpath": "DataDemo_CAL.csdat", + "high_fpath": "DataDemo_CAL.csdat", + "low2_fpath": "DataDemo_CAL.csdat", + "Criteria": { + "Processing": { + "roh_air_ref": 1.1884, + "accel_correction": false, + "gradient_correction": false, + "hz_out": 1, + "rr_corr_factor": 1, + "acc_corr_avg": 1, + "dist_float": 25 + }, + "Validation": { + "trigger_delta_x_max": 10, + "trigger_delta_y_max": 100, + "delta_head_max": 10, + "segruns_min_CAL": 5, + "segruns_min_LS": 1, + "segruns_min_HS": 2, + "segruns_min_head_MS": 10, + "delta_Hz_max": 1, + "delta_parallel_max": 20, + "v_wind_avg_max_CAL": 5, + "v_wind_1s_max_CAL": 8, + "beta_avg_max_CAL": 5, + "leng_crit": 3, + "v_wind_avg_max_LS": 5, + "v_wind_1s_max_LS": 8, + "v_veh_avg_min_LS": 9, + "v_veh_avg_max_LS": 16, + "v_veh_float_delta_LS": 0.15, + "tq_sum_float_delta_LS": 0.1, + "v_wind_avg_max_HS": 5, + "v_wind_1s_max_HS": 8, + "beta_avg_max_HS": 3, + "v_veh_avg_min_HS": 80, + "v_veh_1s_delta_HS": 0.3, + "tq_sum_1s_delta_HS": 0.1, + "delta_t_tyre_max": 5, + "delta_rr_corr_max": 0.3, + "t_amb_min": 0, + "t_amb_max": 35, + "t_amb_var": 3, + "t_amb_tarmac": 25 + } + } + } +} \ No newline at end of file diff --git a/DemoData/StandardCriteria.cscrt.json b/DemoData/StandardCriteria.cscrt.json new file mode 100644 index 0000000000000000000000000000000000000000..bf6e9c976305a3491909f101d268cd12c9c5a31c --- /dev/null +++ b/DemoData/StandardCriteria.cscrt.json @@ -0,0 +1,55 @@ +{ + "Header": { + "Title": "vecto-cse CRITERIA", + "FileVersion": "1.0.0", + "AppVersion": "2.0.1-pre1", + "ModifiedDate": "2014/06/04 02:52:21 +02:00", + "CreatedBy": "ISIS\\anastkn@JRC(lic: 04c137c0-24df-4d90-a3e2-b02fe3dba8ea)", + "StrictBody": false, + "BodySchema": null + }, + "Body": { + "Processing": { + "roh_air_ref": 1.1884, + "accel_correction": false, + "gradient_correction": false, + "hz_out": 1, + "rr_corr_factor": 1.0, + "acc_corr_avg": 1.0, + "dist_float": 25.0 + }, + "Validation": { + "trigger_delta_x_max": 10.0, + "trigger_delta_y_max": 100.0, + "delta_head_max": 10.0, + "segruns_min_CAL": 5, + "segruns_min_LS": 1, + "segruns_min_HS": 2, + "segruns_min_head_MS": 10, + "delta_Hz_max": 1.0, + "delta_parallel_max": 20.0, + "v_wind_avg_max_CAL": 5.0, + "v_wind_1s_max_CAL": 8.0, + "beta_avg_max_CAL": 5.0, + "leng_crit": 3.0, + "v_wind_avg_max_LS": 5.0, + "v_wind_1s_max_LS": 8.0, + "v_veh_avg_min_LS": 9.0, + "v_veh_avg_max_LS": 16.0, + "v_veh_float_delta_LS": 0.15, + "tq_sum_float_delta_LS": 0.1, + "v_wind_avg_max_HS": 5.0, + "v_wind_1s_max_HS": 8.0, + "beta_avg_max_HS": 3.0, + "v_veh_avg_min_HS": 80.0, + "v_veh_1s_delta_HS": 0.3, + "tq_sum_1s_delta_HS": 0.1, + "delta_t_tyre_max": 5.0, + "delta_rr_corr_max": 0.3, + "t_amb_min": 0.0, + "t_amb_max": 35.0, + "t_amb_var": 3.0, + "t_amb_tarmac": 25.0 + } + } +} \ No newline at end of file