remove INotifyIconWindow

This commit is contained in:
Aigio Liu
2021-08-29 18:57:29 +08:00
parent 7478763d19
commit 7bac01cdd4
5 changed files with 25 additions and 164 deletions
@@ -10,14 +10,7 @@ namespace Microsoft.Extensions.DependencyInjection
{
public static partial class ServiceCollectionExtensions
{
/// <summary>
/// 添加桌面平台服务
/// </summary>
/// <param name="services"></param>
/// <param name="hasSteam"></param>
/// <param name="hasGUI"></param>
/// <returns></returns>
public static IServiceCollection AddDesktopPlatformService(this IServiceCollection services, bool hasSteam, bool hasGUI)
public static IServiceCollection AddDesktopPlatformService(this IServiceCollection services, bool hasSteam, bool hasGUI, bool hasNotifyIcon)
{
if (OperatingSystem2.IsWindows)
{
@@ -43,7 +36,7 @@ namespace Microsoft.Extensions.DependencyInjection
}
services.AddSingleton<ISystemWindowApiService, SystemWindowApiServiceImpl>();
services.AddSingleton<ISystemJumpListService, SystemJumpListServiceImpl>();
services.AddNotifyIcon();
if (hasNotifyIcon) services.AddNotifyIcon();
}
else
{