From 77a6233e6355483176608d6da9984055e2ae901b Mon Sep 17 00:00:00 2001 From: BookerLiu Date: Thu, 6 Apr 2023 20:51:17 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20=E4=BC=98=E5=8C=96everything?= =?UTF-8?q?=E5=90=AF=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Control/UserControls/Config/OtherControl.xaml.cs | 2 +- Plugins/EveryThing/EveryThingUtil.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Control/UserControls/Config/OtherControl.xaml.cs b/Control/UserControls/Config/OtherControl.xaml.cs index 5eb69f2..a1a886d 100644 --- a/Control/UserControls/Config/OtherControl.xaml.cs +++ b/Control/UserControls/Config/OtherControl.xaml.cs @@ -196,7 +196,7 @@ namespace GeekDesk.Control.UserControls.Config { if (MainWindow.appData.AppConfig.EnableEveryThing == true) { - EveryThingUtil.EnableEveryThing(); + EveryThingUtil.EnableEveryThing(0); } else { EveryThingUtil.DisableEveryThing(); diff --git a/Plugins/EveryThing/EveryThingUtil.cs b/Plugins/EveryThing/EveryThingUtil.cs index 209d0ca..4208cad 100644 --- a/Plugins/EveryThing/EveryThingUtil.cs +++ b/Plugins/EveryThing/EveryThingUtil.cs @@ -27,7 +27,7 @@ namespace GeekDesk.Plugins.EveryThing private static Process exeProcess = null; - public static void EnableEveryThing() + public static void EnableEveryThing(int delayTime = 2000) { string pluginsPath = Constants.PLUGINS_PATH; @@ -38,7 +38,7 @@ namespace GeekDesk.Plugins.EveryThing { try { - Thread.Sleep(2000); + Thread.Sleep(delayTime); //判断EveryThing服务是否已启动 bool enabled = false;