From 9d36af31f3646a9ece38f17fcde31f1320d767ec Mon Sep 17 00:00:00 2001 From: cdk <2441919651@qq.com> Date: 星期二, 24 六月 2025 13:29:09 +0800 Subject: [PATCH] 增加采购退货 --- Program.cs | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Program.cs b/Program.cs index 91a2ad9..e982d13 100644 --- a/Program.cs +++ b/Program.cs @@ -14,10 +14,23 @@ [STAThread] static void Main() { - - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new frmMain()); + bool ret; + System.Threading.Mutex mutex = new System.Threading.Mutex(true, Application.ProductName, out ret); + + + string name = Application.ProductName; + + if (ret) + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new frmMain()); + } + else + { + MessageBox.Show(null, "鏈変竴涓拰鏈▼搴忕浉鍚岀殑搴旂敤绋嬪簭宸茬粡鍦ㄨ繍琛岋紝璇蜂笉瑕佸悓鏃惰繍琛屽涓湰绋嬪簭銆俓n\n杩欎釜绋嬪簭鍗冲皢閫�鍑恒��", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning); + Application.Exit();//閫�鍑虹▼搴� + } } } } -- Gitblit v1.9.3