yaoxiaodan

using ReadCardService.ServiceBus;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using PurClient.Logging;

namespace ReadCardService.WinUI
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{

//System.Threading.Mutex mutex = new System.Threading.Mutex(false, "应用程序的程序集GUID号");
System.Threading.Mutex mutex = new System.Threading.Mutex(false, "e8feb7e7-e733-46a6-8afe-365e224dd1c7");

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
bool running = !mutex.WaitOne(0, false);
if (!running)
{
Application.Run(new FormLogs());
}
else
{
MessageBox.Show("程序已经启动,请勿重复打开");
}


}
}
}

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-02-25
  • 2022-01-03
  • 2021-12-08
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-26
  • 2021-08-07
  • 2022-01-09
  • 2021-11-19
  • 2022-12-23
  • 2021-07-21
  • 2022-12-23
相关资源
相似解决方案