Skip to content

Commit

Permalink
优化 Everything调用超时提醒
Browse files Browse the repository at this point in the history
修复 截图工具鼠标指针的内存泄漏
  • Loading branch information
MakesYT committed May 8, 2024
1 parent e636772 commit d30b6df
Show file tree
Hide file tree
Showing 4 changed files with 214 additions and 178 deletions.
4 changes: 4 additions & 0 deletions Core.Window/Everything/EverythingService.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using Core.SDKs.Services;
using log4net;
using Microsoft.Extensions.DependencyInjection;
using PluginCore;

namespace Core.Window.Everything;

Expand All @@ -19,6 +21,7 @@ public bool isRun()
if (!task.Wait(TimeSpan.FromSeconds(1)))
{
Log.Error("Everything调用超时");
ServiceManager.Services.GetService<IToastService>()!.Show("Everything", "Everything调用超时");
return false;
}

Expand All @@ -35,6 +38,7 @@ public bool isRun()
if (!task.Wait(TimeSpan.FromSeconds(1)))
{
Log.Error("Everything调用超时");
ServiceManager.Services.GetService<IToastService>()!.Show("Everything", "Everything调用超时");
return false;
}

Expand Down
4 changes: 4 additions & 0 deletions Core.Window/Everything/Tools.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#region

using System.Text;
using Core.SDKs.Services;
using Core.SDKs.Services.Config;
using log4net;
using Microsoft.Extensions.DependencyInjection;
using PluginCore;

#endregion

Expand All @@ -29,6 +32,7 @@ public static void main(List<string> Items)
if (!task.Wait(TimeSpan.FromSeconds(1)))
{
Log.Error("Everything调用超时");
ServiceManager.Services.GetService<IToastService>()!.Show("Everything", "Everything调用超时");
}
}

Expand Down
Loading

0 comments on commit d30b6df

Please sign in to comment.