1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- // Copyright (c) 2012-2020 fo-dicom contributors.
- // Licensed under the Microsoft Public License (MS-PL).
- using Dicom.Log;
- using System;
- using System.Configuration;
- using System.Threading;
- namespace Worklist_SCP
- {
- public class Program
- {
- protected Program()
- {
- }
- static void Main(string[] args)
- {
- // Initialize log manager.
-
- LogManager.SetImplementation(ConsoleLogManager.Instance);
- var configIpAddress = ConfigurationManager.AppSettings["IpAddress"];
- var configPort = ConfigurationManager.AppSettings["Port"];
- var configAETitle = ConfigurationManager.AppSettings["AETitle"];
- Console.WriteLine($"Starting QR SCP server with AET: {configAETitle} on ipAdress {configIpAddress} port {configPort}");
- WorklistServer.Start(configIpAddress, int.Parse(configPort), configAETitle);
- Console.WriteLine("Press any key to stop the service");
- //Console.Read();
- //while (true)
- //{
- // // Console.WriteLine("Stopping QR service");
- //}
- //WorklistServer.Stop();
- for (; ; )
- {
- try
- {
- Thread.Sleep(10000);
- }
- catch (ThreadInterruptedException e)
- {
- ConsoleLogger.Instance.Error("捕获异常{0}", e.Message);
- }
- }
- }
- }
- }
|