diff --git a/CHANGES.md b/CHANGES.md index 59105c065c1dc9dbe02304588bebcee3d837b83b..f4791f4ea2555ca779c260991206d57f68db0b37 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -20,7 +20,8 @@ JRC contributions (see VECTO-29): * Implement an API for writing Header/Body json-files. * Apply Object-oriented design weith resource-management when I/O files. * Sporadic fixes to work with filenames having 2-part extensions (ie `some_file.csjob.json`). - * Improve logging-API so now a single log-routine is used everywhere(instead of 3 different ones). + * Log: Improve logging-API so now a single log-routine is used everywhere(instead of 3 different ones). + * async: Stop abusing worker-Thread with Globals, use DoWorkEventArgs instead. * General restructuring of the folders and names in the project. @@ -36,6 +37,7 @@ JRC contributions: ##### Internal: * Log unhandled exceptions. * Gather all infos related to Job-properties (type, description, units) in a single place, the JSON-schema for the job-file. + * async: Stop abusing worker-Thread with Globals, use DoWorkEventArgs instead. * Sporadic fixes to work with filenames having 2-part extensions (ie `some_file.csjob.json`). * More refactorings to simplify structure of source files and folders. diff --git a/CSE/ApplicationEvents.vb b/CSE/ApplicationEvents.vb index 839f837e8f29e58afc0a06f07d4b468bfc944a40..682717e5ef0352b98ee4446c7a14960a8c478eaf 100644 --- a/CSE/ApplicationEvents.vb +++ b/CSE/ApplicationEvents.vb @@ -109,7 +109,7 @@ End Sub 'Private Sub MyApplicationDomain_UnhandledException(ByVal sender As Object, ByVal ev As UnhandledExceptionEventArgs) ' Dim ex As Exception = DirectCast(ev.ExceptionObject, Exception) - ' logme(9, False, format("Worked's unhandled exception: {0}", ex.Message), ex) + ' logme(9, False, format("Worker's unhandled exception: {0}", ex.Message), ex) 'End Sub End Class diff --git a/CSE/CSE.vbproj b/CSE/CSE.vbproj index 8bb535411a338138512a2b32934b797143d890c2..17f2a44a77339ccb620d9fd5bc71707e80c5953e 100644 --- a/CSE/CSE.vbproj +++ b/CSE/CSE.vbproj @@ -298,6 +298,13 @@ <ItemGroup> <None Include="Resources\Refresh-icon.png" /> </ItemGroup> + <ItemGroup> + <None Include="Resources\Play-icon.png" /> + </ItemGroup> + <ItemGroup> + <Content Include="Resources\Stop-icon.png" /> + <None Include="Resources\Stop-icon1.png" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. diff --git a/CSE/GUI/F_Main.Designer.vb b/CSE/GUI/F_Main.Designer.vb index cd8df770a2d2b91b3e6e9d76e931a5ef7186bf02..2c66811ab363872cb1fd906a49575733cae40cb5 100644 --- a/CSE/GUI/F_Main.Designer.vb +++ b/CSE/GUI/F_Main.Designer.vb @@ -24,15 +24,16 @@ Partial Class F_Main Private Sub InitializeComponent() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(F_Main)) Me.MenuStrip1 = New System.Windows.Forms.MenuStrip() - Me.DataToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolStripMenuItemNew = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolStripMenuItemOpen = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator() - Me.ToolStripMenuItemSave = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolStripMenuItemSaveAs = New System.Windows.Forms.ToolStripMenuItem() + Me.MenuItemFile = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator() Me.ToolStripMenuItemExit = New System.Windows.Forms.ToolStripMenuItem() + Me.MenuItemNewJob = New System.Windows.Forms.ToolStripMenuItem() + Me.MenuItemLoadJob = New System.Windows.Forms.ToolStripMenuItem() + Me.MenuItemReloadJob = New System.Windows.Forms.ToolStripMenuItem() + Me.MenuItemSaveJob = New System.Windows.Forms.ToolStripMenuItem() + Me.MenuItemSaveAsJob = New System.Windows.Forms.ToolStripMenuItem() Me.ToolsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.MenuItemClearLog = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripMenuItemLog = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator3 = New System.Windows.Forms.ToolStripSeparator() Me.ToolStripMenuItemOption = New System.Windows.Forms.ToolStripMenuItem() @@ -83,7 +84,6 @@ Partial Class F_Main Me.PictureBox2 = New System.Windows.Forms.PictureBox() Me.Label1 = New System.Windows.Forms.Label() Me.PictureBox1 = New System.Windows.Forms.PictureBox() - Me.ButtonSaveNewJob = New System.Windows.Forms.Button() Me.ButtonCalC = New System.Windows.Forms.Button() Me.GroupBox1 = New System.Windows.Forms.GroupBox() Me.TextBoxDataC = New System.Windows.Forms.TextBox() @@ -228,10 +228,6 @@ Partial Class F_Main Me.Label20 = New System.Windows.Forms.Label() Me.LRhoAirRef = New System.Windows.Forms.Label() Me.TB_roh_air_ref = New System.Windows.Forms.TextBox() - Me.ButtonClearLogs = New System.Windows.Forms.Button() - Me.ButtonLoadJob = New System.Windows.Forms.Button() - Me.ButtonSaveJob = New System.Windows.Forms.Button() - Me.ButtonReloadJob = New System.Windows.Forms.Button() Me.MenuStrip1.SuspendLayout() Me.GroupBoxJob.SuspendLayout() Me.GB_hz_out.SuspendLayout() @@ -262,72 +258,80 @@ Partial Class F_Main ' 'MenuStrip1 ' - Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DataToolStripMenuItem, Me.ToolsToolStripMenuItem, Me.InfoToolStripMenuItem}) + Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.MenuItemFile, Me.MenuItemNewJob, Me.MenuItemLoadJob, Me.MenuItemReloadJob, Me.MenuItemSaveJob, Me.MenuItemSaveAsJob, Me.ToolsToolStripMenuItem, Me.InfoToolStripMenuItem}) Me.MenuStrip1.Location = New System.Drawing.Point(0, 0) Me.MenuStrip1.Name = "MenuStrip1" Me.MenuStrip1.Size = New System.Drawing.Size(944, 24) Me.MenuStrip1.TabIndex = 0 Me.MenuStrip1.Text = "MenuStrip1" ' - 'DataToolStripMenuItem + 'MenuItemFile ' - Me.DataToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItemNew, Me.ToolStripMenuItemOpen, Me.ToolStripSeparator1, Me.ToolStripMenuItemSave, Me.ToolStripMenuItemSaveAs, Me.ToolStripSeparator2, Me.ToolStripMenuItemExit}) - Me.DataToolStripMenuItem.Name = "DataToolStripMenuItem" - Me.DataToolStripMenuItem.Size = New System.Drawing.Size(37, 20) - Me.DataToolStripMenuItem.Text = "Job" + Me.MenuItemFile.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripSeparator2, Me.ToolStripMenuItemExit}) + Me.MenuItemFile.Name = "MenuItemFile" + Me.MenuItemFile.Size = New System.Drawing.Size(37, 20) + Me.MenuItemFile.Text = "File" ' - 'ToolStripMenuItemNew + 'ToolStripSeparator2 ' - Me.ToolStripMenuItemNew.Image = Global.CSE.My.Resources.Resources.Neu - Me.ToolStripMenuItemNew.Name = "ToolStripMenuItemNew" - Me.ToolStripMenuItemNew.Size = New System.Drawing.Size(111, 22) - Me.ToolStripMenuItemNew.Text = "New" + Me.ToolStripSeparator2.Name = "ToolStripSeparator2" + Me.ToolStripSeparator2.Size = New System.Drawing.Size(89, 6) ' - 'ToolStripMenuItemOpen + 'ToolStripMenuItemExit ' - Me.ToolStripMenuItemOpen.Image = Global.CSE.My.Resources.Resources.Öffnen - Me.ToolStripMenuItemOpen.Name = "ToolStripMenuItemOpen" - Me.ToolStripMenuItemOpen.Size = New System.Drawing.Size(111, 22) - Me.ToolStripMenuItemOpen.Text = "Open" + Me.ToolStripMenuItemExit.Image = Global.CSE.My.Resources.Resources.Beenden + Me.ToolStripMenuItemExit.Name = "ToolStripMenuItemExit" + Me.ToolStripMenuItemExit.Size = New System.Drawing.Size(92, 22) + Me.ToolStripMenuItemExit.Text = "Exit" ' - 'ToolStripSeparator1 + 'MenuItemNewJob ' - Me.ToolStripSeparator1.Name = "ToolStripSeparator1" - Me.ToolStripSeparator1.Size = New System.Drawing.Size(108, 6) + Me.MenuItemNewJob.Image = Global.CSE.My.Resources.Resources.Neu + Me.MenuItemNewJob.Name = "MenuItemNewJob" + Me.MenuItemNewJob.Size = New System.Drawing.Size(80, 20) + Me.MenuItemNewJob.Text = "New Job" ' - 'ToolStripMenuItemSave + 'MenuItemLoadJob ' - Me.ToolStripMenuItemSave.Image = Global.CSE.My.Resources.Resources.Speichern - Me.ToolStripMenuItemSave.Name = "ToolStripMenuItemSave" - Me.ToolStripMenuItemSave.Size = New System.Drawing.Size(111, 22) - Me.ToolStripMenuItemSave.Text = "Save" + Me.MenuItemLoadJob.Image = Global.CSE.My.Resources.Resources.Öffnen + Me.MenuItemLoadJob.Name = "MenuItemLoadJob" + Me.MenuItemLoadJob.Size = New System.Drawing.Size(82, 20) + Me.MenuItemLoadJob.Text = "Load Job" ' - 'ToolStripMenuItemSaveAs + 'MenuItemReloadJob ' - Me.ToolStripMenuItemSaveAs.Image = Global.CSE.My.Resources.Resources.Speichern_unter - Me.ToolStripMenuItemSaveAs.Name = "ToolStripMenuItemSaveAs" - Me.ToolStripMenuItemSaveAs.Size = New System.Drawing.Size(111, 22) - Me.ToolStripMenuItemSaveAs.Text = "SaveAs" + Me.MenuItemReloadJob.Image = Global.CSE.My.Resources.Resources.Refresh_icon + Me.MenuItemReloadJob.Name = "MenuItemReloadJob" + Me.MenuItemReloadJob.Size = New System.Drawing.Size(92, 20) + Me.MenuItemReloadJob.Text = "Reload Job" ' - 'ToolStripSeparator2 + 'MenuItemSaveJob ' - Me.ToolStripSeparator2.Name = "ToolStripSeparator2" - Me.ToolStripSeparator2.Size = New System.Drawing.Size(108, 6) + Me.MenuItemSaveJob.Image = Global.CSE.My.Resources.Resources.Speichern + Me.MenuItemSaveJob.Name = "MenuItemSaveJob" + Me.MenuItemSaveJob.Size = New System.Drawing.Size(80, 20) + Me.MenuItemSaveJob.Text = "Save Job" ' - 'ToolStripMenuItemExit + 'MenuItemSaveAsJob ' - Me.ToolStripMenuItemExit.Image = Global.CSE.My.Resources.Resources.Beenden - Me.ToolStripMenuItemExit.Name = "ToolStripMenuItemExit" - Me.ToolStripMenuItemExit.Size = New System.Drawing.Size(111, 22) - Me.ToolStripMenuItemExit.Text = "Exit" + Me.MenuItemSaveAsJob.Image = Global.CSE.My.Resources.Resources.Speichern_unter + Me.MenuItemSaveAsJob.Name = "MenuItemSaveAsJob" + Me.MenuItemSaveAsJob.Size = New System.Drawing.Size(75, 20) + Me.MenuItemSaveAsJob.Text = "Save As" ' 'ToolsToolStripMenuItem ' - Me.ToolsToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItemLog, Me.ToolStripSeparator3, Me.ToolStripMenuItemOption}) + Me.ToolsToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.MenuItemClearLog, Me.ToolStripMenuItemLog, Me.ToolStripSeparator3, Me.ToolStripMenuItemOption}) Me.ToolsToolStripMenuItem.Name = "ToolsToolStripMenuItem" Me.ToolsToolStripMenuItem.Size = New System.Drawing.Size(48, 20) Me.ToolsToolStripMenuItem.Text = "Tools" ' + 'MenuItemClearLog + ' + Me.MenuItemClearLog.Name = "MenuItemClearLog" + Me.MenuItemClearLog.Size = New System.Drawing.Size(144, 22) + Me.MenuItemClearLog.Text = "Clear Log" + ' 'ToolStripMenuItemLog ' Me.ToolStripMenuItemLog.Image = Global.CSE.My.Resources.Resources.Log_File @@ -349,10 +353,11 @@ Partial Class F_Main ' 'InfoToolStripMenuItem ' + Me.InfoToolStripMenuItem.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right Me.InfoToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.CreatActivationFileToolStripMenuItem, Me.ToolStripMenuItemAbout, Me.ToolStripMenuItemManu}) Me.InfoToolStripMenuItem.Name = "InfoToolStripMenuItem" - Me.InfoToolStripMenuItem.Size = New System.Drawing.Size(40, 20) - Me.InfoToolStripMenuItem.Text = "Info" + Me.InfoToolStripMenuItem.Size = New System.Drawing.Size(44, 20) + Me.InfoToolStripMenuItem.Text = "Help" ' 'CreatActivationFileToolStripMenuItem ' @@ -393,7 +398,7 @@ Partial Class F_Main Me.GroupBoxJob.Margin = New System.Windows.Forms.Padding(2) Me.GroupBoxJob.Name = "GroupBoxJob" Me.GroupBoxJob.Padding = New System.Windows.Forms.Padding(2) - Me.GroupBoxJob.Size = New System.Drawing.Size(905, 71) + Me.GroupBoxJob.Size = New System.Drawing.Size(906, 71) Me.GroupBoxJob.TabIndex = 21 Me.GroupBoxJob.TabStop = False Me.GroupBoxJob.Text = "General" @@ -405,8 +410,8 @@ Partial Class F_Main Me.TextBoxWeather.Location = New System.Drawing.Point(144, 42) Me.TextBoxWeather.Margin = New System.Windows.Forms.Padding(2) Me.TextBoxWeather.Name = "TextBoxWeather" - Me.TextBoxWeather.Size = New System.Drawing.Size(718, 20) - Me.TextBoxWeather.TabIndex = 36 + Me.TextBoxWeather.Size = New System.Drawing.Size(719, 20) + Me.TextBoxWeather.TabIndex = 2 ' 'ButtonWeather ' @@ -423,11 +428,11 @@ Partial Class F_Main ' Me.ButtonSelectWeather.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.ButtonSelectWeather.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonSelectWeather.Location = New System.Drawing.Point(866, 42) + Me.ButtonSelectWeather.Location = New System.Drawing.Point(867, 42) Me.ButtonSelectWeather.Margin = New System.Windows.Forms.Padding(2) Me.ButtonSelectWeather.Name = "ButtonSelectWeather" Me.ButtonSelectWeather.Size = New System.Drawing.Size(31, 23) - Me.ButtonSelectWeather.TabIndex = 35 + Me.ButtonSelectWeather.TabIndex = 3 Me.ButtonSelectWeather.Text = "..." Me.ButtonSelectWeather.UseVisualStyleBackColor = True ' @@ -438,8 +443,8 @@ Partial Class F_Main Me.TextBoxVeh1.Location = New System.Drawing.Point(145, 15) Me.TextBoxVeh1.Margin = New System.Windows.Forms.Padding(2) Me.TextBoxVeh1.Name = "TextBoxVeh1" - Me.TextBoxVeh1.Size = New System.Drawing.Size(717, 20) - Me.TextBoxVeh1.TabIndex = 14 + Me.TextBoxVeh1.Size = New System.Drawing.Size(718, 20) + Me.TextBoxVeh1.TabIndex = 0 ' 'ButtonVeh ' @@ -456,7 +461,7 @@ Partial Class F_Main ' Me.ButtonSelectVeh.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.ButtonSelectVeh.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonSelectVeh.Location = New System.Drawing.Point(866, 12) + Me.ButtonSelectVeh.Location = New System.Drawing.Point(867, 12) Me.ButtonSelectVeh.Margin = New System.Windows.Forms.Padding(2) Me.ButtonSelectVeh.Name = "ButtonSelectVeh" Me.ButtonSelectVeh.Size = New System.Drawing.Size(31, 23) @@ -595,7 +600,7 @@ Partial Class F_Main Me.TextBoxbetaf.Location = New System.Drawing.Point(271, 20) Me.TextBoxbetaf.Name = "TextBoxbetaf" Me.TextBoxbetaf.Size = New System.Drawing.Size(40, 20) - Me.TextBoxbetaf.TabIndex = 21 + Me.TextBoxbetaf.TabIndex = 10 Me.TextBoxbetaf.TextAlign = System.Windows.Forms.HorizontalAlignment.Right ' 'TextBoxbetad @@ -603,7 +608,7 @@ Partial Class F_Main Me.TextBoxbetad.Location = New System.Drawing.Point(383, 20) Me.TextBoxbetad.Name = "TextBoxbetad" Me.TextBoxbetad.Size = New System.Drawing.Size(40, 20) - Me.TextBoxbetad.TabIndex = 22 + Me.TextBoxbetad.TabIndex = 11 Me.TextBoxbetad.TextAlign = System.Windows.Forms.HorizontalAlignment.Right ' 'TextBoxAirf @@ -611,7 +616,7 @@ Partial Class F_Main Me.TextBoxAirf.Location = New System.Drawing.Point(46, 20) Me.TextBoxAirf.Name = "TextBoxAirf" Me.TextBoxAirf.Size = New System.Drawing.Size(40, 20) - Me.TextBoxAirf.TabIndex = 19 + Me.TextBoxAirf.TabIndex = 8 Me.TextBoxAirf.TextAlign = System.Windows.Forms.HorizontalAlignment.Right ' 'TextBoxAird @@ -619,7 +624,7 @@ Partial Class F_Main Me.TextBoxAird.Location = New System.Drawing.Point(154, 20) Me.TextBoxAird.Name = "TextBoxAird" Me.TextBoxAird.Size = New System.Drawing.Size(40, 20) - Me.TextBoxAird.TabIndex = 20 + Me.TextBoxAird.TabIndex = 9 Me.TextBoxAird.TextAlign = System.Windows.Forms.HorizontalAlignment.Right ' 'CB_gradient_correction @@ -664,7 +669,7 @@ Partial Class F_Main Me.GroupBoxInput.Margin = New System.Windows.Forms.Padding(2) Me.GroupBoxInput.Name = "GroupBoxInput" Me.GroupBoxInput.Padding = New System.Windows.Forms.Padding(2) - Me.GroupBoxInput.Size = New System.Drawing.Size(906, 141) + Me.GroupBoxInput.Size = New System.Drawing.Size(907, 141) Me.GroupBoxInput.TabIndex = 23 Me.GroupBoxInput.TabStop = False Me.GroupBoxInput.Text = "Constant speed test" @@ -687,18 +692,18 @@ Partial Class F_Main Me.TextBoxDataLS2.Location = New System.Drawing.Point(145, 110) Me.TextBoxDataLS2.Margin = New System.Windows.Forms.Padding(2) Me.TextBoxDataLS2.Name = "TextBoxDataLS2" - Me.TextBoxDataLS2.Size = New System.Drawing.Size(653, 20) - Me.TextBoxDataLS2.TabIndex = 42 + Me.TextBoxDataLS2.Size = New System.Drawing.Size(654, 20) + Me.TextBoxDataLS2.TabIndex = 19 ' 'ButtonSelectDataLS1 ' Me.ButtonSelectDataLS1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.ButtonSelectDataLS1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonSelectDataLS1.Location = New System.Drawing.Point(802, 53) + Me.ButtonSelectDataLS1.Location = New System.Drawing.Point(803, 53) Me.ButtonSelectDataLS1.Margin = New System.Windows.Forms.Padding(2) Me.ButtonSelectDataLS1.Name = "ButtonSelectDataLS1" Me.ButtonSelectDataLS1.Size = New System.Drawing.Size(31, 23) - Me.ButtonSelectDataLS1.TabIndex = 35 + Me.ButtonSelectDataLS1.TabIndex = 16 Me.ButtonSelectDataLS1.Text = "..." Me.ButtonSelectDataLS1.UseVisualStyleBackColor = True ' @@ -720,18 +725,18 @@ Partial Class F_Main Me.TextBoxDataLS1.Location = New System.Drawing.Point(145, 56) Me.TextBoxDataLS1.Margin = New System.Windows.Forms.Padding(2) Me.TextBoxDataLS1.Name = "TextBoxDataLS1" - Me.TextBoxDataLS1.Size = New System.Drawing.Size(653, 20) - Me.TextBoxDataLS1.TabIndex = 36 + Me.TextBoxDataLS1.Size = New System.Drawing.Size(654, 20) + Me.TextBoxDataLS1.TabIndex = 15 ' 'ButtonSelectDataLS2 ' Me.ButtonSelectDataLS2.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.ButtonSelectDataLS2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonSelectDataLS2.Location = New System.Drawing.Point(802, 107) + Me.ButtonSelectDataLS2.Location = New System.Drawing.Point(803, 107) Me.ButtonSelectDataLS2.Margin = New System.Windows.Forms.Padding(2) Me.ButtonSelectDataLS2.Name = "ButtonSelectDataLS2" Me.ButtonSelectDataLS2.Size = New System.Drawing.Size(31, 23) - Me.ButtonSelectDataLS2.TabIndex = 41 + Me.ButtonSelectDataLS2.TabIndex = 20 Me.ButtonSelectDataLS2.Text = "..." Me.ButtonSelectDataLS2.UseVisualStyleBackColor = True ' @@ -739,11 +744,11 @@ Partial Class F_Main ' Me.ButtonSelectDataHS.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.ButtonSelectDataHS.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonSelectDataHS.Location = New System.Drawing.Point(802, 80) + Me.ButtonSelectDataHS.Location = New System.Drawing.Point(803, 80) Me.ButtonSelectDataHS.Margin = New System.Windows.Forms.Padding(2) Me.ButtonSelectDataHS.Name = "ButtonSelectDataHS" Me.ButtonSelectDataHS.Size = New System.Drawing.Size(31, 23) - Me.ButtonSelectDataHS.TabIndex = 38 + Me.ButtonSelectDataHS.TabIndex = 18 Me.ButtonSelectDataHS.Text = "..." Me.ButtonSelectDataHS.UseVisualStyleBackColor = True ' @@ -754,8 +759,8 @@ Partial Class F_Main Me.TextBoxDataHS.Location = New System.Drawing.Point(144, 83) Me.TextBoxDataHS.Margin = New System.Windows.Forms.Padding(2) Me.TextBoxDataHS.Name = "TextBoxDataHS" - Me.TextBoxDataHS.Size = New System.Drawing.Size(654, 20) - Me.TextBoxDataHS.TabIndex = 39 + Me.TextBoxDataHS.Size = New System.Drawing.Size(655, 20) + Me.TextBoxDataHS.TabIndex = 17 ' 'ButtonDataHS ' @@ -773,12 +778,15 @@ Partial Class F_Main Me.ButtonEval.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.ButtonEval.Enabled = False Me.ButtonEval.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonEval.Location = New System.Drawing.Point(837, 17) + Me.ButtonEval.Image = Global.CSE.My.Resources.Resources.Play_icon + Me.ButtonEval.Location = New System.Drawing.Point(838, 17) Me.ButtonEval.Margin = New System.Windows.Forms.Padding(2) Me.ButtonEval.Name = "ButtonEval" Me.ButtonEval.Size = New System.Drawing.Size(60, 113) - Me.ButtonEval.TabIndex = 34 + Me.ButtonEval.TabIndex = 21 Me.ButtonEval.Text = "Evaluate" + Me.ButtonEval.TextAlign = System.Drawing.ContentAlignment.BottomCenter + Me.ButtonEval.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText Me.ButtonEval.UseVisualStyleBackColor = True ' 'TextBoxMSCT @@ -788,8 +796,8 @@ Partial Class F_Main Me.TextBoxMSCT.Location = New System.Drawing.Point(144, 19) Me.TextBoxMSCT.Margin = New System.Windows.Forms.Padding(2) Me.TextBoxMSCT.Name = "TextBoxMSCT" - Me.TextBoxMSCT.Size = New System.Drawing.Size(654, 20) - Me.TextBoxMSCT.TabIndex = 23 + Me.TextBoxMSCT.Size = New System.Drawing.Size(655, 20) + Me.TextBoxMSCT.TabIndex = 13 ' 'ButtonMSCT ' @@ -806,11 +814,11 @@ Partial Class F_Main ' Me.ButtonSelectMSCT.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.ButtonSelectMSCT.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonSelectMSCT.Location = New System.Drawing.Point(802, 17) + Me.ButtonSelectMSCT.Location = New System.Drawing.Point(803, 17) Me.ButtonSelectMSCT.Margin = New System.Windows.Forms.Padding(2) Me.ButtonSelectMSCT.Name = "ButtonSelectMSCT" Me.ButtonSelectMSCT.Size = New System.Drawing.Size(31, 23) - Me.ButtonSelectMSCT.TabIndex = 22 + Me.ButtonSelectMSCT.TabIndex = 14 Me.ButtonSelectMSCT.Text = "..." Me.ButtonSelectMSCT.UseVisualStyleBackColor = True ' @@ -845,31 +853,19 @@ Partial Class F_Main Me.PictureBox1.TabIndex = 27 Me.PictureBox1.TabStop = False ' - 'ButtonSaveNewJob - ' - Me.ButtonSaveNewJob.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButtonSaveNewJob.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonSaveNewJob.ForeColor = System.Drawing.SystemColors.ControlText - Me.ButtonSaveNewJob.Image = Global.CSE.My.Resources.Resources.Speichern_unter - Me.ButtonSaveNewJob.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.ButtonSaveNewJob.Location = New System.Drawing.Point(819, 636) - Me.ButtonSaveNewJob.Margin = New System.Windows.Forms.Padding(2) - Me.ButtonSaveNewJob.Name = "ButtonSaveNewJob" - Me.ButtonSaveNewJob.Size = New System.Drawing.Size(109, 34) - Me.ButtonSaveNewJob.TabIndex = 32 - Me.ButtonSaveNewJob.Text = "Save New" - Me.ButtonSaveNewJob.UseVisualStyleBackColor = True - ' 'ButtonCalC ' Me.ButtonCalC.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.ButtonCalC.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonCalC.Location = New System.Drawing.Point(836, 18) + Me.ButtonCalC.Image = Global.CSE.My.Resources.Resources.Play_icon + Me.ButtonCalC.Location = New System.Drawing.Point(837, 18) Me.ButtonCalC.Margin = New System.Windows.Forms.Padding(2) Me.ButtonCalC.Name = "ButtonCalC" Me.ButtonCalC.Size = New System.Drawing.Size(60, 163) - Me.ButtonCalC.TabIndex = 30 + Me.ButtonCalC.TabIndex = 12 Me.ButtonCalC.Text = "Calibrate" + Me.ButtonCalC.TextAlign = System.Drawing.ContentAlignment.BottomCenter + Me.ButtonCalC.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText Me.ButtonCalC.UseVisualStyleBackColor = True ' 'GroupBox1 @@ -887,7 +883,7 @@ Partial Class F_Main Me.GroupBox1.Controls.Add(Me.ButtonCalC) Me.GroupBox1.Location = New System.Drawing.Point(6, 81) Me.GroupBox1.Name = "GroupBox1" - Me.GroupBox1.Size = New System.Drawing.Size(905, 188) + Me.GroupBox1.Size = New System.Drawing.Size(906, 188) Me.GroupBox1.TabIndex = 33 Me.GroupBox1.TabStop = False Me.GroupBox1.Text = "Calibration test" @@ -899,8 +895,8 @@ Partial Class F_Main Me.TextBoxDataC.Location = New System.Drawing.Point(144, 47) Me.TextBoxDataC.Margin = New System.Windows.Forms.Padding(2) Me.TextBoxDataC.Name = "TextBoxDataC" - Me.TextBoxDataC.Size = New System.Drawing.Size(653, 20) - Me.TextBoxDataC.TabIndex = 33 + Me.TextBoxDataC.Size = New System.Drawing.Size(654, 20) + Me.TextBoxDataC.TabIndex = 6 ' 'ButtonDataC ' @@ -917,11 +913,11 @@ Partial Class F_Main ' Me.ButtonSelectDataC.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.ButtonSelectDataC.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonSelectDataC.Location = New System.Drawing.Point(801, 45) + Me.ButtonSelectDataC.Location = New System.Drawing.Point(802, 45) Me.ButtonSelectDataC.Margin = New System.Windows.Forms.Padding(2) Me.ButtonSelectDataC.Name = "ButtonSelectDataC" Me.ButtonSelectDataC.Size = New System.Drawing.Size(31, 23) - Me.ButtonSelectDataC.TabIndex = 32 + Me.ButtonSelectDataC.TabIndex = 7 Me.ButtonSelectDataC.Text = "..." Me.ButtonSelectDataC.UseVisualStyleBackColor = True ' @@ -1034,8 +1030,8 @@ Partial Class F_Main Me.TextBoxMSCC.Location = New System.Drawing.Point(144, 20) Me.TextBoxMSCC.Margin = New System.Windows.Forms.Padding(2) Me.TextBoxMSCC.Name = "TextBoxMSCC" - Me.TextBoxMSCC.Size = New System.Drawing.Size(653, 20) - Me.TextBoxMSCC.TabIndex = 17 + Me.TextBoxMSCC.Size = New System.Drawing.Size(654, 20) + Me.TextBoxMSCC.TabIndex = 4 ' 'ButtonMSCC ' @@ -1052,11 +1048,11 @@ Partial Class F_Main ' Me.ButtonSelectMSCC.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.ButtonSelectMSCC.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonSelectMSCC.Location = New System.Drawing.Point(801, 18) + Me.ButtonSelectMSCC.Location = New System.Drawing.Point(802, 18) Me.ButtonSelectMSCC.Margin = New System.Windows.Forms.Padding(2) Me.ButtonSelectMSCC.Name = "ButtonSelectMSCC" Me.ButtonSelectMSCC.Size = New System.Drawing.Size(31, 23) - Me.ButtonSelectMSCC.TabIndex = 16 + Me.ButtonSelectMSCC.TabIndex = 5 Me.ButtonSelectMSCC.Text = "..." Me.ButtonSelectMSCC.UseVisualStyleBackColor = True ' @@ -1074,7 +1070,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(807, 187) + Me.TabControlOutMsg.Size = New System.Drawing.Size(925, 187) Me.TabControlOutMsg.TabIndex = 34 ' 'TabPageMSG @@ -1085,7 +1081,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(799, 161) + Me.TabPageMSG.Size = New System.Drawing.Size(917, 161) Me.TabPageMSG.TabIndex = 0 Me.TabPageMSG.Text = "Messages(0)" Me.TabPageMSG.UseVisualStyleBackColor = True @@ -1101,7 +1097,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(793, 147) + Me.ListBoxMSG.Size = New System.Drawing.Size(915, 147) Me.ListBoxMSG.TabIndex = 23 ' 'TabPageWar @@ -1111,7 +1107,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(799, 161) + Me.TabPageWar.Size = New System.Drawing.Size(917, 161) Me.TabPageWar.TabIndex = 1 Me.TabPageWar.Text = "Warnings (0)" Me.TabPageWar.UseVisualStyleBackColor = True @@ -1127,7 +1123,7 @@ Partial Class F_Main Me.ListBoxWar.Location = New System.Drawing.Point(2, 4) Me.ListBoxWar.Margin = New System.Windows.Forms.Padding(2) Me.ListBoxWar.Name = "ListBoxWar" - Me.ListBoxWar.Size = New System.Drawing.Size(828, 147) + Me.ListBoxWar.Size = New System.Drawing.Size(946, 147) Me.ListBoxWar.TabIndex = 26 ' 'TabPageErr @@ -1136,7 +1132,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(799, 161) + Me.TabPageErr.Size = New System.Drawing.Size(917, 161) Me.TabPageErr.TabIndex = 2 Me.TabPageErr.Text = "Errors (0)" Me.TabPageErr.UseVisualStyleBackColor = True @@ -1152,7 +1148,7 @@ Partial Class F_Main Me.ListBoxErr.Location = New System.Drawing.Point(2, 4) Me.ListBoxErr.Margin = New System.Windows.Forms.Padding(2) Me.ListBoxErr.Name = "ListBoxErr" - Me.ListBoxErr.Size = New System.Drawing.Size(828, 147) + Me.ListBoxErr.Size = New System.Drawing.Size(946, 147) Me.ListBoxErr.TabIndex = 27 ' 'TextBoxVeh @@ -1174,7 +1170,7 @@ Partial Class F_Main Me.TabControl1.Location = New System.Drawing.Point(8, 72) Me.TabControl1.Name = "TabControl1" Me.TabControl1.SelectedIndex = 0 - Me.TabControl1.Size = New System.Drawing.Size(924, 443) + Me.TabControl1.Size = New System.Drawing.Size(925, 443) Me.TabControl1.TabIndex = 35 ' 'TPMain @@ -1185,7 +1181,7 @@ Partial Class F_Main Me.TPMain.Location = New System.Drawing.Point(4, 22) Me.TPMain.Name = "TPMain" Me.TPMain.Padding = New System.Windows.Forms.Padding(3) - Me.TPMain.Size = New System.Drawing.Size(916, 417) + Me.TPMain.Size = New System.Drawing.Size(917, 417) Me.TPMain.TabIndex = 0 Me.TPMain.Text = "Main" Me.TPMain.UseVisualStyleBackColor = True @@ -1202,7 +1198,7 @@ Partial Class F_Main Me.TPCriteria.Location = New System.Drawing.Point(4, 22) Me.TPCriteria.Name = "TPCriteria" Me.TPCriteria.Padding = New System.Windows.Forms.Padding(3) - Me.TPCriteria.Size = New System.Drawing.Size(916, 417) + Me.TPCriteria.Size = New System.Drawing.Size(917, 417) Me.TPCriteria.TabIndex = 1 Me.TPCriteria.Text = "Criteria" Me.TPCriteria.UseVisualStyleBackColor = True @@ -2322,73 +2318,12 @@ Partial Class F_Main Me.TB_roh_air_ref.TabIndex = 1 Me.TB_roh_air_ref.TextAlign = System.Windows.Forms.HorizontalAlignment.Right ' - 'ButtonClearLogs - ' - 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.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.ButtonClearLogs.Location = New System.Drawing.Point(819, 675) - Me.ButtonClearLogs.Margin = New System.Windows.Forms.Padding(2) - Me.ButtonClearLogs.Name = "ButtonClearLogs" - Me.ButtonClearLogs.Size = New System.Drawing.Size(109, 32) - Me.ButtonClearLogs.TabIndex = 36 - Me.ButtonClearLogs.Text = "Clear log" - Me.ButtonClearLogs.UseVisualStyleBackColor = True - ' - 'ButtonLoadJob - ' - 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.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(109, 36) - Me.ButtonLoadJob.TabIndex = 37 - Me.ButtonLoadJob.Text = "Load Job" - Me.ButtonLoadJob.UseVisualStyleBackColor = True - ' - 'ButtonSaveJob - ' - Me.ButtonSaveJob.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButtonSaveJob.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonSaveJob.Image = Global.CSE.My.Resources.Resources.Speichern - Me.ButtonSaveJob.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.ButtonSaveJob.Location = New System.Drawing.Point(819, 597) - Me.ButtonSaveJob.Margin = New System.Windows.Forms.Padding(2) - Me.ButtonSaveJob.Name = "ButtonSaveJob" - Me.ButtonSaveJob.Size = New System.Drawing.Size(109, 35) - Me.ButtonSaveJob.TabIndex = 38 - Me.ButtonSaveJob.Text = "Save Job" - Me.ButtonSaveJob.UseVisualStyleBackColor = True - ' - 'ButtonReloadJob - ' - Me.ButtonReloadJob.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButtonReloadJob.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonReloadJob.Image = Global.CSE.My.Resources.Resources.Refresh_icon - Me.ButtonReloadJob.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.ButtonReloadJob.Location = New System.Drawing.Point(819, 560) - Me.ButtonReloadJob.Margin = New System.Windows.Forms.Padding(2) - Me.ButtonReloadJob.Name = "ButtonReloadJob" - Me.ButtonReloadJob.Size = New System.Drawing.Size(109, 33) - Me.ButtonReloadJob.TabIndex = 39 - Me.ButtonReloadJob.Text = "Reload Job" - Me.ButtonReloadJob.UseVisualStyleBackColor = True - ' 'F_Main ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(944, 712) - Me.Controls.Add(Me.ButtonReloadJob) - Me.Controls.Add(Me.ButtonSaveJob) - Me.Controls.Add(Me.ButtonLoadJob) - Me.Controls.Add(Me.ButtonClearLogs) Me.Controls.Add(Me.TabControl1) - Me.Controls.Add(Me.ButtonSaveNewJob) Me.Controls.Add(Me.PictureBox2) Me.Controls.Add(Me.TabControlOutMsg) Me.Controls.Add(Me.Label1) @@ -2449,12 +2384,7 @@ Partial Class F_Main End Sub Friend WithEvents MenuStrip1 As System.Windows.Forms.MenuStrip - Friend WithEvents DataToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem - Friend WithEvents ToolStripMenuItemNew As System.Windows.Forms.ToolStripMenuItem - Friend WithEvents ToolStripMenuItemOpen As System.Windows.Forms.ToolStripMenuItem - Friend WithEvents ToolStripSeparator1 As System.Windows.Forms.ToolStripSeparator - Friend WithEvents ToolStripMenuItemSave As System.Windows.Forms.ToolStripMenuItem - Friend WithEvents ToolStripMenuItemSaveAs As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents MenuItemFile As System.Windows.Forms.ToolStripMenuItem Friend WithEvents ToolStripSeparator2 As System.Windows.Forms.ToolStripSeparator Friend WithEvents ToolStripMenuItemExit As System.Windows.Forms.ToolStripMenuItem Friend WithEvents ToolsToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem @@ -2476,7 +2406,6 @@ Partial Class F_Main Friend WithEvents PictureBox2 As System.Windows.Forms.PictureBox Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox - Friend WithEvents ButtonSaveNewJob As System.Windows.Forms.Button Friend WithEvents ButtonCalC As System.Windows.Forms.Button Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox Friend WithEvents TextBoxMSCC As System.Windows.Forms.TextBox @@ -2650,12 +2579,14 @@ Partial Class F_Main Friend WithEvents ButtonSelectDataHS As System.Windows.Forms.Button Friend WithEvents TextBoxDataHS As System.Windows.Forms.TextBox 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 ButtonCrtImport As System.Windows.Forms.Button Friend WithEvents ButtonCrtExport As System.Windows.Forms.Button Friend WithEvents ButtonCrtReset As System.Windows.Forms.Button - Friend WithEvents ButtonSaveJob As System.Windows.Forms.Button - Friend WithEvents ButtonReloadJob As System.Windows.Forms.Button + Friend WithEvents MenuItemNewJob As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents MenuItemLoadJob As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents MenuItemReloadJob As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents MenuItemSaveJob As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents MenuItemSaveAsJob As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents MenuItemClearLog As System.Windows.Forms.ToolStripMenuItem End Class diff --git a/CSE/GUI/F_Main.vb b/CSE/GUI/F_Main.vb index 594634dbbac1c93ff49a699fa3fff973ab7b3d27..f871cda374bcdd98a08b9b11186791a80170cbe6 100644 --- a/CSE/GUI/F_Main.vb +++ b/CSE/GUI/F_Main.vb @@ -5,7 +5,6 @@ Public Class F_Main ' Declarations Private ToolstripSave As Boolean = False Private Formname As String = "Job configurations" - Private Cali As Boolean = True ' Load the GUI Private Sub CSEMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load @@ -78,7 +77,7 @@ Public Class F_Main fWriteLog(3) End Sub - Private Sub ClearLogsHandler(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonClearLogs.Click + Private Sub ClearLogsHandler(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItemClearLog.Click ListBoxMSG.Items.Clear() TabPageMSG.Text = "Messages(0)" ListBoxWar.Items.Clear() @@ -93,15 +92,15 @@ Public Class F_Main #Region "Job IO" ' Menu New - Private Sub NewJobHandler(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItemNew.Click + Private Sub NewJobHandler(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItemNewJob.Click fClear_VECTO_Form(True) End Sub - Private Sub ReloadJobHandler(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonReloadJob.Click + Private Sub ReloadJobHandler(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItemReloadJob.Click Dim reload = True doLoadJob(reload) End Sub - Private Sub LoadJobHandler(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItemOpen.Click, ButtonLoadJob.Click + Private Sub LoadJobHandler(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItemLoadJob.Click Dim reload = False doLoadJob(reload) End Sub @@ -134,7 +133,7 @@ Public Class F_Main newJob = New cJob(jobFileToLoad) Else newJob = New cJob(True) - newJob.fReadOldJobFile() + newJob.fReadOldJobFile(jobFileToLoad) End If newJob.Validate() @@ -147,11 +146,11 @@ Public Class F_Main End Try End Sub - Private Sub SaveJobHandler(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItemSave.Click, ButtonSaveJob.Click + Private Sub SaveJobHandler(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItemSaveJob.Click Dim saveAs = False doSaveJob(saveAs) End Sub - Private Sub SaveJobAsHandler(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItemSaveAs.Click, ButtonSaveNewJob.Click + Private Sub SaveJobAsHandler(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItemSaveAsJob.Click Dim saveAs = True doSaveJob(saveAs) End Sub @@ -233,6 +232,29 @@ Public Class F_Main #Region "Calibration" + + '#################################################################### + '#### Only HERE manage "Exec" button's state (Text, Image, etc). #### + '#################################################################### + Private _CalibrationState As Boolean = False + Private _CalibrationTxts = {"Calibrate", "Cancel"} + Private _CalibrationImgs = {My.Resources.Resources.Play_icon, My.Resources.Resources.Stop_icon} + Private Property CalibrationState As Boolean + Get + Return _CalibrationState + End Get + Set(ByVal value As Boolean) + If _CalibrationState Xor value Then + Dim indx = -CInt(value) + Me.ButtonCalC.Text = _CalibrationTxts(indx) + Me.ButtonCalC.Image = _CalibrationImgs(indx) + Me.ButtonCalC.UseWaitCursor = value + End If + _CalibrationState = value + End Set + End Property + + ' Open the filebrowser for the selection of the datafile from the calibration run Private Sub ButtonSelectDataC_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSelectDataC.Click ' Open the filebrowser with the *.csdat parameter @@ -282,47 +304,47 @@ Public Class F_Main End Sub ' Calculate button calibration test - Private Sub ButtonCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonCalC.Click + Private Sub CalibrationHandler(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonCalC.Click ' Generate cancel butten if the backgroundworker is busy If BWorker.IsBusy Then - logme(8, False, "Calibration not started! Another operation still running in the background") BWorker.CancelAsync() - Exit Sub + logme(8, False, "Cancel requested for background-operation...") + Return End If ' Read the data from the GUI UI_PopulateToJob(True) UI_PopulateToCriteria() + Me.TextBoxRVeh.Text = 0 + Me.TextBoxRAirPos.Text = 0 + Me.TextBoxRBetaMis.Text = 0 + + ' Check if outfolder exist. If not then generate the folder + If Not System.IO.Directory.Exists(OutFolder) Then + If OutFolder <> Nothing Then + ' Generate the folder if it is desired + Dim resEx As MsgBoxResult + resEx = MsgBox(format("Output-folder({0}) doesn´t exist! \n\nCreate Folder?", OutFolder), MsgBoxStyle.YesNo, "Create folder?") + If resEx = MsgBoxResult.Yes Then + IO.Directory.CreateDirectory(OutFolder) + Else + Exit Sub + End If + Else + logme(9, False, "No outputfolder is given!") + Exit Sub + End If + End If + Dim ok = False Try - ' Change the Calculate button in a cancel button - Me.ButtonCalC.Text = "Cancel" - Me.TextBoxRVeh.Text = 0 - Me.TextBoxRAirPos.Text = 0 - Me.TextBoxRBetaMis.Text = 0 - Cali = True + ' Change the button "Exec" --> "Cancel" + Me.CalibrationState = True ' Save the Jobfiles doSaveJob(False) - ' Check if outfolder exist. If not then generate the folder - If Not System.IO.Directory.Exists(OutFolder) Then - If OutFolder <> Nothing Then - ' Generate the folder if it is desired - Dim resEx As MsgBoxResult - resEx = MsgBox(format("Output-folder({0}) doesn´t exist! \n\nCreate Folder?", OutFolder), MsgBoxStyle.YesNo, "Create folder?") - If resEx = MsgBoxResult.Yes Then - IO.Directory.CreateDirectory(OutFolder) - Else - Exit Sub - End If - Else - logme(9, False, "No outputfolder is given!") - Exit Sub - End If - End If - ' Clear the MSG on the GUI Me.ListBoxMSG.Items.Clear() fClear_VECTO_Form(False, False) @@ -330,17 +352,41 @@ Public Class F_Main logme(7, False, format("Starting CALIBRATION: \n\i* Job: {0}\n* Out: {1}", JobFile, OutFolder)) ' Start the calculation in the backgroundworker - Me.BackgroundWorkerVECTO.RunWorkerAsync() + Dim jobType = OpType.Calibration + Me.BackgroundWorkerVECTO.RunWorkerAsync(New cAsyncJob(jobType)) ok = True Finally - If Not ok Then Me.ButtonEval.Text = "Calibrate" + '' Re-enable "Exec" button on failures. + If Not ok Then CalibrationState = False End Try End Sub #End Region ' Calibration -#Region "Coasting" +#Region "Evaluation" + '#################################################################### + '#### Only HERE manage "Exec" button's state (Text, Image, etc). #### + '#################################################################### + Private _EvaluationState As Boolean = False + Private _EvaluationTxts = {"Evaluate", "Cancel"} + Private _EvaluationImgs = {My.Resources.Resources.Play_icon, My.Resources.Resources.Stop_icon} + Private Property EvaluationState As Boolean + Get + Return _EvaluationState + End Get + Set(ByVal value As Boolean) + If _EvaluationState Xor value Then + Dim indx = -CInt(value) + Me.ButtonEval.Text = _EvaluationTxts(indx) + Me.ButtonEval.Image = _EvaluationImgs(indx) + Me.ButtonEval.UseWaitCursor = value + End If + _EvaluationState = value + End Set + End Property + + ' Open the filebrowser for the selection of the measure section file from the test run Private Sub ButtonSelectMSCT_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSelectMSCT.Click ' Open the filebrowser with the *.csmsc parameter @@ -438,46 +484,47 @@ Public Class F_Main End Sub ' Evaluate button test run - Private Sub ButtonEvaluate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonEval.Click + Private Sub EvaluationHandler(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonEval.Click ' Generate cancel butten if the backgroundworker is busy If BWorker.IsBusy Then BWorker.CancelAsync() - logme(8, False, "Evaluation not started! Another operation still running in the background") - Exit Sub + logme(8, False, "Cancel requested for background-operation...") + + Return End If ' Read the data from the GUI UI_PopulateToJob(True) UI_PopulateToCriteria() + ' Check if outfolder exist. If not then generate the folder + If Not System.IO.Directory.Exists(OutFolder) Then + If OutFolder <> Nothing Then + ' Generate the folder if it is desired + Dim resEx As MsgBoxResult + resEx = MsgBox(format("Output-folder({0}) doesn´t exist! \n\nCreate Folder?", OutFolder), MsgBoxStyle.YesNo, "Create folder?") + If resEx = MsgBoxResult.Yes Then + IO.Directory.CreateDirectory(OutFolder) + Else + Exit Sub + End If + Else + logme(9, False, "No outputfolder is given!") + Exit Sub + End If + End If + + Dim ok = False Try - ' Change the Calculate button in a cancel button - Me.ButtonEval.Text = "Cancel" - Cali = False + ' Change the button "Exec" --> "Cancel" + Me.EvaluationState = True fWriteLog(2, 4, "----- Speed runs ") ' Save the Jobfiles doSaveJob(False) - ' Check if outfolder exist. If not then generate the folder - If Not System.IO.Directory.Exists(OutFolder) Then - If OutFolder <> Nothing Then - ' Generate the folder if it is desired - Dim resEx As MsgBoxResult - resEx = MsgBox(format("Output-folder({0}) doesn´t exist! \n\nCreate Folder?", OutFolder), MsgBoxStyle.YesNo, "Create folder?") - If resEx = MsgBoxResult.Yes Then - IO.Directory.CreateDirectory(OutFolder) - Else - Exit Sub - End If - Else - logme(9, False, "No outputfolder is given!") - Exit Sub - End If - End If - ' Clear the MSG on the GUI fClear_VECTO_Form(False, False) @@ -485,14 +532,16 @@ Public Class F_Main logme(7, False, format("Starting EVALUATION: \n\i* Job: {0}\n* Out: {1}", JobFile, OutFolder)) ' Start the calculation in the backgroundworker - Me.BackgroundWorkerVECTO.RunWorkerAsync() + Dim jobType = OpType.Evaluation + Me.BackgroundWorkerVECTO.RunWorkerAsync(New cAsyncJob(jobType)) ok = True Finally - If Not ok Then Me.ButtonEval.Text = "Evaluate" + '' Re-enable "Exec" button on failures. + If Not ok Then EvaluationState = False End Try End Sub -#End Region ' Coasting +#End Region ' Evaluation #Region "Tools menu" @@ -616,20 +665,46 @@ Public Class F_Main #End Region 'Options tab +#Region "AsynJob" + + Private Enum OpType + Calibration + Evaluation + End Enum + + ''' <summary>The Datum exchanged in the 3 AsyncWorked methods</summary> + Private Class cAsyncJob + + Public ReadOnly Operation As OpType + + Sub New(ByVal type As OpType) + Me.Operation = type + End Sub + + Public ReadOnly Property IsCalibration As Boolean + Get + Return Me.Operation = OpType.Calibration + End Get + End Property + + End Class + '*********Backgroundworker********* ' Backgroundworker for the calculation in the background Private Sub BackgroundWorkerVECTO_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) _ Handles BackgroundWorkerVECTO.DoWork + Dim asyncJob As cAsyncJob = e.Argument + '' Pass the async-job datum down the road. + e.Result = asyncJob + '##### START THE CALCULATION ##### '################################# - '' FIXME: Stop abusing worker-Thread with Globals, use DoWorkEventArgsfor that instead!! - calculation(Cali) - + calculation(asyncJob.IsCalibration) '################################# - ' Polling if the backgroundworker was canceled + ' Cancel if cancel requested... If Me.BackgroundWorkerVECTO.CancellationPending Then e.Cancel = True End Sub @@ -647,32 +722,30 @@ Public Class F_Main ' Identify the ending from the backgroundworker Private Sub BackgroundWorkerVECTO_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) _ Handles BackgroundWorkerVECTO.RunWorkerCompleted - - Dim op = IIf(Cali, "Calibration", "Evaluation") - ' If an Error is detected If e.Error IsNot Nothing Then - logme(8, False, format("{0} ended with exception: {1}", op, e.Error.Message), e.Error) + logme(8, False, format("Backround operation ended with exception: {0}", e.Error.Message), e.Error) + ElseIf e.Cancelled Then + logme(7, False, "Backround operation aborted by user.") Else - If e.Cancelled Then - logme(7, False, format("{0} aborted by user.", op)) - Else - logme(7, False, format("{0} ended OK.", op)) - If Cali Then Me.ButtonEval.Enabled = True - End If + logme(7, False, "Backround operation ended OK.") + Dim asyncJob As cAsyncJob = e.Result + If asyncJob.IsCalibration Then Me.ButtonEval.Enabled = True End If - ' Reset the calculate button to calculate - If Cali Then - Me.ButtonCalC.Text = "Calibrate" - Me.TextBoxRVeh.Text = Math.Round(fv_veh, 3).ToString - Me.TextBoxRAirPos.Text = Math.Round(fv_pe, 3).ToString - Me.TextBoxRBetaMis.Text = Math.Round(beta_ame, 2).ToString - Else - Me.ButtonEval.Text = "Evaluate" - End If FileBlock = False + + '' Re-enable all "Exec" buttons + CalibrationState = False + EvaluationState = False + + Me.TextBoxRVeh.Text = Math.Round(fv_veh, 3).ToString + Me.TextBoxRAirPos.Text = Math.Round(fv_pe, 3).ToString + Me.TextBoxRBetaMis.Text = Math.Round(beta_ame, 2).ToString + + End Sub +#End Region ' AsynJob #Region "UI populate" @@ -681,11 +754,12 @@ Public Class F_Main ' Read the data from the textboxes (General) Job.vehicle_fpath = TextBoxVeh1.Text Job.ambient_fpath = TextBoxWeather.Text - Job.Anemometer(0) = TextBoxAirf.Text - Job.Anemometer(1) = TextBoxAird.Text - Job.Anemometer(2) = TextBoxbetaf.Text - Job.Anemometer(3) = TextBoxbetad.Text - + If UBound(Job.Anemometer) = 3 Then + Job.Anemometer(0) = TextBoxAirf.Text + Job.Anemometer(1) = TextBoxAird.Text + Job.Anemometer(2) = TextBoxbetaf.Text + Job.Anemometer(3) = TextBoxbetad.Text + End If ' Appropriate the inputfiles from calibration run Job.calib_run_fpath = TextBoxDataC.Text Job.calib_track_fpath = TextBoxMSCC.Text @@ -871,6 +945,8 @@ Public Class F_Main TextBoxDataLS2.Clear() ButtonEval.Enabled = False + EvaluationState = False + ' Option parameters to standard installJob(New cJob) @@ -962,4 +1038,7 @@ Public Class F_Main #End Region + Private Sub ClearLogToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItemClearLog.Click + + End Sub End Class diff --git a/CSE/GUI/F_Preferences.vb b/CSE/GUI/F_Preferences.vb index cdae6935a95adb26fd033311594e0859d4b51f35..746655d513e21cb02f176173d9265b910d74ee26 100644 --- a/CSE/GUI/F_Preferences.vb +++ b/CSE/GUI/F_Preferences.vb @@ -34,7 +34,7 @@ Public Class F_Preferences Private Sub FormClosingHandler(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing If Me.Dirty Then - Dim res = MsgBox("Save changes?", MsgBoxStyle.YesNoCancel, "Preferences Changed") + Dim res = MsgBox(format("Preferences have changed.\nSave changes?"), MsgBoxStyle.YesNoCancel, "Save Preferences?") Select Case res Case MsgBoxResult.No Case MsgBoxResult.Yes diff --git a/CSE/IO/cJob.vb b/CSE/IO/cJob.vb index 2c5ad14d8ce1362801b11f152009fd7f07632393..c34730d29307ebb373334ddd2ceba02bde013ef9 100644 --- a/CSE/IO/cJob.vb +++ b/CSE/IO/cJob.vb @@ -261,7 +261,7 @@ Public Class cJob ' Function for reading the jobfile - Public Sub fReadOldJobFile() + Public Sub fReadOldJobFile(ByVal jobFile As String) ' Declarations Dim i As Integer Dim Line() As String @@ -270,7 +270,7 @@ Public Class cJob Using FileInVECTO As New cFile_V3 ' Open the jobfile - FileInVECTO.OpenReadWithEx(JobFile) + FileInVECTO.OpenReadWithEx(jobFile) ' Read the data from the jobfile vehicle_fpath = FileInVECTO.ReadLine(0) @@ -393,7 +393,7 @@ Public Class cJob crt.tq_sum_1s_delta_HS = Line(0) End Select Else - Throw New ArgumentException(format("The given value in the Job-file({0}) at position({1}) is not a number!", JobFile, i)) + Throw New ArgumentException(format("The given value in the Job-file({0}) at position({1}) is not a number!", jobFile, i)) End If Loop Catch ex As Exception @@ -402,7 +402,7 @@ Public Class cJob ' Look if enough parameters are given If i < 34 Then - Throw New ArgumentException(format("Premature ending of the Job-file({0})!", JobFile)) + Throw New ArgumentException(format("Premature ending of the Job-file({0})!", jobFile)) End If diff --git a/CSE/My Project/Resources.Designer.vb b/CSE/My Project/Resources.Designer.vb index c786114d9ebbd9d656ed48082f0dc40e5045e8e3..bfdf40b445ccaed684f0c74d460458dba5af71eb 100644 --- a/CSE/My Project/Resources.Designer.vb +++ b/CSE/My Project/Resources.Designer.vb @@ -210,6 +210,16 @@ Namespace My.Resources End Get End Property + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property Play_icon() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Play-icon", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + '''<summary> ''' Looks up a localized resource of type System.Drawing.Bitmap. '''</summary> @@ -250,6 +260,16 @@ Namespace My.Resources End Get End Property + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property Stop_icon() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Stop-icon", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + '''<summary> ''' Looks up a localized resource of type System.Drawing.Bitmap. '''</summary> diff --git a/CSE/My Project/Resources.resx b/CSE/My Project/Resources.resx index 868c36570f6cad131df936de2f33f31bc971f65b..964990f637374c1da7846e0a6507de4e19e5b2db 100644 --- a/CSE/My Project/Resources.resx +++ b/CSE/My Project/Resources.resx @@ -133,6 +133,9 @@ <data name="Icon" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="Refresh-icon" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Refresh-icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="Beenden" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Beenden.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> @@ -151,6 +154,9 @@ <data name="Neu" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Neu.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="Play-icon" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Play-icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="VECTO_LOGO" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\VECTO_LOGO.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> @@ -181,7 +187,7 @@ <data name="Öffnen" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Öffnen.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Refresh-icon" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\Refresh-icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="Stop-icon" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Stop-icon1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> </root> \ No newline at end of file diff --git a/CSE/Resources/Play-icon.png b/CSE/Resources/Play-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..bf822612ee7f416f189a9f8d6c03cd4a6411ca4f Binary files /dev/null and b/CSE/Resources/Play-icon.png differ diff --git a/CSE/Resources/Stop-icon.png b/CSE/Resources/Stop-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..d6badde84674c2fa9c4e8760a2f79d694981ef7f Binary files /dev/null and b/CSE/Resources/Stop-icon.png differ diff --git a/CSE/Resources/Stop-icon1.png b/CSE/Resources/Stop-icon1.png new file mode 100644 index 0000000000000000000000000000000000000000..d6badde84674c2fa9c4e8760a2f79d694981ef7f Binary files /dev/null and b/CSE/Resources/Stop-icon1.png differ diff --git a/CSE/utils.vb b/CSE/utils.vb index 5c372720ad50737e0febc9ef7aec80f789c6f6ba..e299d3886af0e524bdf1646ccfe7123d1a9e2331 100644 --- a/CSE/utils.vb +++ b/CSE/utils.vb @@ -261,37 +261,42 @@ Module utils Private Sub updateLogWindow(ByVal logFileLevel As Integer, ByVal text As String, ByVal tabLabel As String, ByVal ex As Exception) ' Established the text wit the symbol from the style Dim printEx = False + Dim lbox As ListBox If (ex IsNot Nothing) Then printEx = (logFileLevel > 1 AndAlso Prefs.logLevel <= 2) text = format("{0} (Check {1} for details)", text, IIf(printEx, "error/warn tab", "log-file")) End If - ' Write to Log-windows - Select Case logFileLevel - Case 2 ' Warning - F_Main.ListBoxMSG.Items.Add(text) - F_Main.ListBoxWar.Items.Add(text) - F_Main.TabPageWar.Text = format("Warnings({0})", F_Main.ListBoxWar.Items.Count) - If printEx Then - F_Main.ListBoxWar.Items.Add(format("\i{0}", ex)) - End If - Case 3 ' Error - F_Main.ListBoxErr.Items.Add(text) - If printEx Then - F_Main.ListBoxErr.Items.Add(format("\i{0}", ex)) - End If - F_Main.TabPageErr.Text = format("Errors({0})", F_Main.ListBoxErr.Items.Count) - Case Else - '' ignored - End Select - F_Main.ListBoxMSG.Items.Add(text) - F_Main.TabPageMSG.Text = format("Messages({0})", F_Main.ListBoxMSG.Items.Count) - + ' Always write to log-msg tab. + '' + lbox = F_Main.ListBoxMSG + lbox.Items.Add(text) + F_Main.TabPageMSG.Text = format("Messages({0})", lbox.Items.Count) ' Set the Scrollbars in the Listboxes at the end - F_Main.ListBoxMSG.TopIndex = F_Main.ListBoxMSG.Items.Count - 1 - F_Main.ListBoxWar.TopIndex = F_Main.ListBoxWar.Items.Count - 1 - F_Main.ListBoxErr.TopIndex = F_Main.ListBoxErr.Items.Count - 1 + lbox.TopIndex = lbox.Items.Count - 1 + + ''Write to other Log-windows. + '' + Dim label As String + If logFileLevel = 2 Then ' Warning + lbox = F_Main.ListBoxWar + label = "Warnings" + ElseIf logFileLevel = 3 Then ' Error + lbox = F_Main.ListBoxErr + label = "Errors" + Else + Return + End If + + lbox.Items.Add(text) + If printEx Then + lbox.Items.Add(format("\i{0}", ex)) + End If + + lbox.TopIndex = lbox.Items.Count - 1 + F_Main.TabPageWar.Text = format("Warnings({0})", lbox.Items.Count) + End Sub @@ -463,9 +468,7 @@ Module utils End Using End Sub - ''' <summary> - ''' Reads an obligatory value from a json-object, or uses the default-value (if supplied). - ''' </summary> + ''' <summary>Reads an obligatory value from a json-object, or uses the default-value (if supplied).</summary> Function jvalue(ByVal jobj As JObject, ByVal item As Object, Optional ByVal defaultValue As Object = Nothing) As Object Dim value = jobj(item) @@ -550,10 +553,7 @@ Module utils Private regexp_newLine As New Regex("\r\n|\n\r|\n|\r", RegexOptions.Compiled) - '''<summary> - ''' Invokes String.Format() translating '\n', '\t' and '\i' for indenting by-2 - ''' all subsequent lines. - '''</summary> + '''<summary>Invokes String.Format() translating '\n', '\t' and '\i' for indenting by-2 all subsequent lines</summary> ''' <remarks> ''' New-lines are visible only in textBoxes - not console and/or imediate-window. ''' <h4>EXAMPLE:</h4>