public void Break(BreakType type) { Instance = null; if (_serverWorker != null) { _serverWorker.Dispose(); } }
public void AddServices() { Instance = this; if (_hl7Options.Autostart) { try { _serverWorker = new TCPServerWorker(_hl7Options.HL7IPAddress, _hl7Options.HL7Port, Source); _serverWorker.Startup(); SystemMessage(Logger.Global, LogType.Information, "HL7 Server started (listening on IP: " + _hl7Options.HL7IPAddress + ", Port: " + _hl7Options.HL7Port + ")", null); } catch (Exception e) { _serverWorker = null; SystemMessage(Logger.Global, LogType.Error, "HL7 Server could not start. " + e.Message, Source); } } }
public void Configure(IWin32Window Parent, ServerSettings Settings, string ServerDirectory) { ConfigureDialog configure = new ConfigureDialog(); string optionsFile = HL7ServerMWL.GetOptionsFile(ServerDirectory); HL7ServerMWL.InitializeOptions(ServerDirectory, Settings.AETitle); configure.Text = Settings.AETitle + " HL7 Server Options"; //configure.propertyGridOptions.SelectedObject = options; // SetupOwnerWindow(new HandleRef(this, Parent.Handle), new HandleRef(this, configure.Handle)); if (configure.ShowDialog() == DialogResult.OK) { try { AddInUtils.Serialize <HL7Options>(HL7ServerMWL.HL7Options, optionsFile); } catch { } } }