flower-story/App/MauiProgram.cs
2023-06-26 22:33:44 +08:00

36 lines
930 B
C#

using Blahblah.FlowerStory.Data;
#if DEBUG
using Microsoft.Extensions.Logging;
#endif
namespace Blahblah.FlowerStory
{
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");
})
.ConfigureMauiHandlers(handlers =>
{
});
#if DEBUG
builder.Logging.AddDebug();
#endif
builder.Services.AddSingleton<MainPage>();
builder.Services.AddSingleton<FlowerDatabase>();
builder.Services.AddLocalization();
return builder.Build();
}
}
}