feat:基础功能实现

This commit is contained in:
ShaoHua
2026-03-31 22:44:32 +08:00
parent ed3d90cd7a
commit 81c649cb23
131 changed files with 22903 additions and 196 deletions
+37
View File
@@ -0,0 +1,37 @@
using Microsoft.Extensions.Logging;
using TodoList.Maui.Services;
using TodoList.Maui.Services.Platforms;
namespace TodoList.Maui;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
builder.Services.AddSingleton<IHotKeySettingsService, HotKeySettingsService>();
builder.Services.AddSingleton<IGlobalHotKeyService>(sp => new NullGlobalHotKeyService());
builder.Services.AddSingleton<ISystemTrayService>(sp =>
{
#if WINDOWS
return new NullSystemTrayService();
#else
return new NullSystemTrayService();
#endif
});
#if DEBUG
builder.Logging.AddDebug();
#endif
return builder.Build();
}
}