コード例 #1
0
        public void Break(BreakType type)
        {
            Instance = null;

            if (_serverWorker != null)
            {
                _serverWorker.Dispose();
            }
        }
コード例 #2
0
        public void AddServices()
        {
            Instance = this;

            if (_hl7Options.Autostart)
            {
                try
                {
                    _serverWorker = new TCPServerWorker(_hl7Options.HL7IPAddress, _hl7Options.HL7Port);
                    _serverWorker.Startup();
                    SystemMessage(Logger.Global, LogType.Information, "HL7 Server started (listening on IP: " + _hl7Options.HL7IPAddress + ", Port: " + _hl7Options.HL7Port + ")", null);
                }
                catch (Exception e)
                {
                    _serverWorker = null;//properly no license
                    SystemMessage(Logger.Global, LogType.Error, "HL7 Server could not start. " + e.Message, Source);
                }
            }
        }
コード例 #3
0
        public void Configure(IWin32Window Parent, ServerSettings Settings, string ServerDirectory)
        {
            ConfigureDialog configure = new ConfigureDialog();

            string optionsFile = HL7ServerPatientUpdate.GetOptionsFile(ServerDirectory);

            HL7ServerPatientUpdate.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>(HL7ServerPatientUpdate.HL7Options, optionsFile);
                }
                catch { }
            }
        }