From 991d1c27d36bf5d51b0c28683bf1b4b7fb143dda Mon Sep 17 00:00:00 2001 From: maqiao <625215135@qq.com> Date: Fri, 15 Nov 2024 08:41:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=9A=E6=AC=A1=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E7=A8=8B=E5=BA=8F=E6=97=A5=E5=BF=97=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=8C=87=E7=BA=B9=E6=9C=BAip=E4=B8=BA50?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DM_Weight/App.config | 2 +- DM_Weight/App.xaml.cs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/DM_Weight/App.config b/DM_Weight/App.config index e8b74b7..8c2e57e 100644 --- a/DM_Weight/App.config +++ b/DM_Weight/App.config @@ -99,7 +99,7 @@ - + diff --git a/DM_Weight/App.xaml.cs b/DM_Weight/App.xaml.cs index 3c8d840..081ea18 100644 --- a/DM_Weight/App.xaml.cs +++ b/DM_Weight/App.xaml.cs @@ -26,6 +26,7 @@ using System.Timers; using DM_Weight.HIKVISION; using System.Diagnostics; using System.Runtime.InteropServices; +using log4net.Repository.Hierarchy; namespace DM_Weight { @@ -284,9 +285,11 @@ namespace DM_Weight { //获取欲启动程序名 string processName = System.Diagnostics.Process.GetCurrentProcess().ProcessName; + logger.Info($"欲启动程序名:{processName}"); //检查程序是否已经启动,已经启动则显示提示退出程序 if (System.Diagnostics.Process.GetProcessesByName(processName).Length > 1) { + logger.Info($"系统在运行!"); //系统在运行 RaiseOtherProcess(); Application.Current.Shutdown();