|
|
@ -12,6 +12,7 @@ using SlnMesnac.Extensions;
|
|
|
|
using SlnMesnac.Generate;
|
|
|
|
using SlnMesnac.Generate;
|
|
|
|
using SlnMesnac.TouchSocket;
|
|
|
|
using SlnMesnac.TouchSocket;
|
|
|
|
using SlnMesnac.Redis;
|
|
|
|
using SlnMesnac.Redis;
|
|
|
|
|
|
|
|
using System.Threading;
|
|
|
|
|
|
|
|
|
|
|
|
#region << 版 本 注 释 >>
|
|
|
|
#region << 版 本 注 释 >>
|
|
|
|
/*--------------------------------------------------------------------
|
|
|
|
/*--------------------------------------------------------------------
|
|
|
@ -42,12 +43,22 @@ namespace PrintBarCode
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
public class Startup
|
|
|
|
public class Startup
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private System.Threading.Mutex? mutex = null;
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="configuration"></param>
|
|
|
|
/// <param name="configuration"></param>
|
|
|
|
public Startup(IConfiguration configuration)
|
|
|
|
public Startup(IConfiguration configuration)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
bool ret;
|
|
|
|
|
|
|
|
mutex = new System.Threading.Mutex(true, System.Diagnostics.Process.GetCurrentProcess().ProcessName, out ret);
|
|
|
|
|
|
|
|
if (!ret)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
MessageBox.Show("应用程序已开启,禁止重复运行");
|
|
|
|
|
|
|
|
Environment.Exit(0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Configuration = configuration;
|
|
|
|
Configuration = configuration;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|