From edeff64c12cfb53a8e57f8359c8db7c0989f63c3 Mon Sep 17 00:00:00 2001 From: lhiven <2366881222@qq.com> Date: Sat, 6 Jan 2024 15:29:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=AA=E8=83=BD=E6=89=93?= =?UTF-8?q?=E5=BC=80=E5=8D=95=E4=B8=AA=E5=BA=94=E7=94=A8=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.SkyLine/Program.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Rs.SkyLine/Program.cs b/Rs.SkyLine/Program.cs index 39ff832..8d99a1a 100644 --- a/Rs.SkyLine/Program.cs +++ b/Rs.SkyLine/Program.cs @@ -26,7 +26,15 @@ namespace Rs.MotionPlat Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //Application.Run(new FormIO2()); - Application.Run(new Home()); + if (System.Diagnostics.Process.GetProcessesByName(System.Diagnostics.Process.GetCurrentProcess().ProcessName).Length > 1) + { + Msg.ShowInfo("Anther application is running"); + } + else + { + Application.Run(new Home()); + } + } } }