-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMauiProgram.cs
39 lines (36 loc) · 1.22 KB
/
MauiProgram.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using Camera.MAUI;
using CommunityToolkit.Maui;
using Microsoft.Extensions.Logging;
using PoznejHrademMaui.DataManager;
namespace PoznejHrademMaui
{
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseMauiCameraView()
.UseMauiCommunityToolkit()
.ConfigureMauiHandlers(handlers =>
{
#if ANDROID
handlers.AddHandler<Microsoft.Maui.Controls.Maps.Map, PoznejHrademMaui.Platforms.Android.CustomMapHandler>();
#elif IOS
handlers.AddHandler<Microsoft.Maui.Controls.Maps.Map, PoznejHrademMaui.Platforms.iOS.CustomMapHandler>();
#endif
})
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
#if DEBUG
builder.Logging.AddDebug();
#endif
builder.Services.AddSingleton<DatabaseService>();
return builder.Build();
}
}
}