DicomServer/Desktop/Worklist SCP/Program.cs
2024-12-13 10:06:20 +08:00

57 lines
1.5 KiB
C#

// Copyright (c) 2012-2021 fo-dicom contributors.
// Licensed under the Microsoft Public License (MS-PL).
using FellowOakDicom;
using FellowOakDicom.Log;
using System;
using System.Threading;
using System.Windows.Forms;
namespace Worklist_SCP
{
public class Program
{
protected Program()
{
}
[STAThread]
static void Main(string[] args)
{
//new DicomSetupBuilder()
// .RegisterServices(s => s.AddFellowOakDicom().AddLogManager<ConsoleLogManager>())
// .Build();
//var port = args != null && args.Length > 0 && int.TryParse(args[0], out int tmp) ? tmp : 8005;
//Console.WriteLine($"Starting QR SCP server with AET: QRSCP on port {port}");
//WorklistServer.Start(port, "QRSCP");
//Console.WriteLine("Press any key to stop the service");
//Console.Read();
//Console.WriteLine("Stopping QR service");
//WorklistServer.Stop();
bool createNew;
var m = new Mutex(true, Application.ProductName, out createNew);
if (createNew)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new worklistForm());
}
else
MessageBox.Show("福乐云DICOM SCP正在运行中......", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}