diff --git a/ASCOM.Utilities/ASCOM Diagnostics/DiagnosticsForm.Designer.vb b/ASCOM.Utilities/ASCOM Diagnostics/DiagnosticsForm.Designer.vb index 27de93b26..28d12b6ae 100644 --- a/ASCOM.Utilities/ASCOM Diagnostics/DiagnosticsForm.Designer.vb +++ b/ASCOM.Utilities/ASCOM Diagnostics/DiagnosticsForm.Designer.vb @@ -45,6 +45,7 @@ Partial Class DiagnosticsForm Me.MenuSerialTraceEnabled = New System.Windows.Forms.ToolStripMenuItem() Me.MenuIncludeSerialTraceDebugInformation = New System.Windows.Forms.ToolStripMenuItem() Me.MenuProfileTraceEnabled = New System.Windows.Forms.ToolStripMenuItem() + Me.MenuRegistryTraceEnabled = New System.Windows.Forms.ToolStripMenuItem() Me.MenuUtilTraceEnabled = New System.Windows.Forms.ToolStripMenuItem() Me.MenuTimerTraceEnabled = New System.Windows.Forms.ToolStripMenuItem() Me.MenuSimulatorTraceEnabled = New System.Windows.Forms.ToolStripMenuItem() @@ -65,7 +66,6 @@ Partial Class DiagnosticsForm Me.lblAction = New System.Windows.Forms.Label() Me.btnViewLastLog = New System.Windows.Forms.Button() Me.SerialTraceFileName = New System.Windows.Forms.SaveFileDialog() - Me.MenuRegistryTraceEnabled = New System.Windows.Forms.ToolStripMenuItem() Me.MenuStrip1.SuspendLayout() Me.SuspendLayout() ' @@ -115,12 +115,13 @@ Partial Class DiagnosticsForm ' Me.lblResult.AutoSize = True Me.lblResult.Location = New System.Drawing.Point(2, 206) - Me.lblResult.MinimumSize = New System.Drawing.Size(400, 0) + Me.lblResult.MaximumSize = New System.Drawing.Size(400, 13) + Me.lblResult.MinimumSize = New System.Drawing.Size(400, 13) Me.lblResult.Name = "lblResult" Me.lblResult.RightToLeft = System.Windows.Forms.RightToLeft.No Me.lblResult.Size = New System.Drawing.Size(400, 13) Me.lblResult.TabIndex = 4 - Me.lblResult.Text = "Label1" + Me.lblResult.Text = "Result" Me.lblResult.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'MenuStrip1 @@ -230,6 +231,12 @@ Partial Class DiagnosticsForm Me.MenuProfileTraceEnabled.Size = New System.Drawing.Size(282, 22) Me.MenuProfileTraceEnabled.Text = "Profile Trace Enabled" ' + 'MenuRegistryTraceEnabled + ' + Me.MenuRegistryTraceEnabled.Name = "MenuRegistryTraceEnabled" + Me.MenuRegistryTraceEnabled.Size = New System.Drawing.Size(282, 22) + Me.MenuRegistryTraceEnabled.Text = "Registry Trace Enabled" + ' 'MenuUtilTraceEnabled ' Me.MenuUtilTraceEnabled.Name = "MenuUtilTraceEnabled" @@ -338,12 +345,13 @@ Partial Class DiagnosticsForm ' Me.lblAction.AutoSize = True Me.lblAction.Location = New System.Drawing.Point(22, 236) - Me.lblAction.MinimumSize = New System.Drawing.Size(380, 0) + Me.lblAction.MaximumSize = New System.Drawing.Size(380, 13) + Me.lblAction.MinimumSize = New System.Drawing.Size(380, 13) Me.lblAction.Name = "lblAction" Me.lblAction.RightToLeft = System.Windows.Forms.RightToLeft.No Me.lblAction.Size = New System.Drawing.Size(380, 13) Me.lblAction.TabIndex = 6 - Me.lblAction.Text = "Label1" + Me.lblAction.Text = "Action" Me.lblAction.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'btnViewLastLog @@ -356,12 +364,6 @@ Partial Class DiagnosticsForm Me.btnViewLastLog.Text = "View Last Log" Me.btnViewLastLog.UseVisualStyleBackColor = True ' - 'MenuRegistryTraceEnabled - ' - Me.MenuRegistryTraceEnabled.Name = "MenuRegistryTraceEnabled" - Me.MenuRegistryTraceEnabled.Size = New System.Drawing.Size(282, 22) - Me.MenuRegistryTraceEnabled.Text = "Registry Trace Enabled" - ' 'DiagnosticsForm ' Me.AcceptButton = Me.btnRunDiagnostics diff --git a/ASCOM.Utilities/ASCOM Diagnostics/DiagnosticsForm.vb b/ASCOM.Utilities/ASCOM Diagnostics/DiagnosticsForm.vb index 552eb9623..1487e300b 100644 --- a/ASCOM.Utilities/ASCOM Diagnostics/DiagnosticsForm.vb +++ b/ASCOM.Utilities/ASCOM Diagnostics/DiagnosticsForm.vb @@ -194,11 +194,6 @@ Public Class DiagnosticsForm Console.WriteLine("Console created") End If - AstroUtil = New AstroUtils.AstroUtils - Nov3 = New NOVAS.NOVAS3 - Nov31 = New NOVAS.NOVAS31 - AscomUtil = New Util - transform = New Astrometry.Transform.Transform() Me.BringToFront() Me.KeyPreview = True ' Ensure that key press events are sent to the form so that the key press event handler can respond to them @@ -221,6 +216,12 @@ Public Class DiagnosticsForm .Enabled = True } + transform = New Astrometry.Transform.Transform() ' Create a new Transform component for this run + AstroUtil = New AstroUtils.AstroUtils + Nov3 = New NOVAS.NOVAS3 + Nov31 = New NOVAS.NOVAS31 + AscomUtil = New Util + btnExit.Enabled = False ' Disable buttons during run btnViewLastLog.Enabled = False btnRunDiagnostics.Enabled = False @@ -545,6 +546,22 @@ Public Class DiagnosticsForm TL.BlankLine() End If + Try + AstroUtil.Dispose() + TL.LogMessage("AstroUtilTests", "AstroUtils Disposed OK") + Catch ex As Exception + LogException("AstroUtilTests", "AstroUtils: " & ex.ToString) + End Try + AstroUtil = Nothing + + Try + transform.Dispose() + TL.LogMessage("Diagnostics", "Transform Disposed OK") + Catch ex As Exception + LogException("Diagnostics", "Transform: " & ex.ToString) + End Try + transform = Nothing + TL.BlankLine() TL.LogMessage("Diagnostics", SuccessMessage) TL.Enabled = False @@ -656,7 +673,7 @@ Public Class DiagnosticsForm 'Eo06a tests eo = SOFA.Eo06a(2400000.5, 53736.0) - CompareDouble("SOFATests", "Eo06a-eo", eo, -0.0013328823719418337, 0.000000000000001) + CompareDouble("SOFATests", "Eo06a-eo", eo, -0.0013328823719418338, 0.000000000000001) 'Atic13 tests ri = 2.7101215729690389 @@ -3922,8 +3939,6 @@ Public Class DiagnosticsForm TransformTest2000("Polaris", "02:31:51.263", "89:15:50.68", TOLERANCE_E5, TOLERANCE_E4) TransformTest2000("Arcturus", "14:15:38.943", "19:10:37.93", TOLERANCE_E5, TOLERANCE_E4) - transform.Dispose() - TL.BlankLine() End Sub @@ -8401,13 +8416,6 @@ Public Class DiagnosticsForm TL.BlankLine() - Try - AstroUtil.Dispose() - TL.LogMessage("AstroUtilTests", "ASCOM.Astrometry.AstroUtils.AstroUtils, Disposed OK") - Catch ex As Exception - LogException("AstroUtilTests", "ASCOM.Astrometry.AstroUtils.AstroUtils: " & ex.ToString) - End Try - AstroUtil = Nothing TL.LogMessage("AstroUtilTests", "Finished") TL.BlankLine()