public Context() { if (config == null) { config = new Common.Config.Profile { StorageDriver = new Common.Config.Storage.WindowsRegistry() { ProfileName = Common.Metadata.Name } }; config.Load(); } if (ASCOMTrace == null) { ASCOMTrace = new TraceLogger(String.Empty, Common.Metadata.Name) { Enabled = config.ASCOMTraceLogEnable }; } if (!Server.StartedByCOM) { if (Form == null) { Form = new Forms.DebugForm(); Form.Show(); } LogMessage("Context::Context", "LocalServer not started by COM"); } LogMessage("Context::Context", "LocalServer ready"); }
protected override void Dispose(bool Disposing) { if (Disposing) { if (Form != null) { Form.Dispose(); Form = null; } if (ASCOMTrace != null) { ASCOMTrace.Dispose(); ASCOMTrace = null; } } base.Dispose(Disposing); }