Quellcode durchsuchen

✅ 优化everything启动

BookerLiu vor 2 Jahren
Ursprung
Commit
77a6233e63

+ 1 - 1
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();

+ 2 - 2
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;