From 74829d03824aba8a0ba349554348f8ff48dbb562 Mon Sep 17 00:00:00 2001 From: maqiao <625215135@qq.com> Date: Fri, 15 Nov 2024 11:26:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=8A=A8=E9=80=80?= =?UTF-8?q?=E5=87=BA=E6=A3=80=E6=B5=8B=E7=BA=BF=E7=A8=8B=E5=81=9C=E6=AD=A2?= =?UTF-8?q?=E4=BB=A5=E9=87=8D=E6=96=B0=E8=AE=A1=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DM_Weight/App.config | 2 +- DM_Weight/Views/HomeWindow.xaml.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DM_Weight/App.config b/DM_Weight/App.config index 27b072d..e4ba36b 100644 --- a/DM_Weight/App.config +++ b/DM_Weight/App.config @@ -37,7 +37,7 @@ - + diff --git a/DM_Weight/Views/HomeWindow.xaml.cs b/DM_Weight/Views/HomeWindow.xaml.cs index 265a17a..99eaa62 100644 --- a/DM_Weight/Views/HomeWindow.xaml.cs +++ b/DM_Weight/Views/HomeWindow.xaml.cs @@ -28,7 +28,7 @@ namespace DM_Weight.Views public partial class HomeWindow : UserControl { int autoExit = Convert.ToInt32(ConfigurationManager.AppSettings["autoExit"] ?? "0"); - System.Timers.Timer idleTimer; + System.Timers.Timer idleTimer;//= new System.Timers.Timer(60000); IEventAggregator _eventAggregator; public HomeWindow(IEventAggregator eventAggregator) { @@ -57,6 +57,7 @@ namespace DM_Weight.Views //logger.Info($"进入自动退出定时方法{allTrue}"); if (allTrue) { + idleTimer.Stop(); //无人操作,自动退出 _eventAggregator.GetEvent().Publish(); }