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;