Révision 18f910c6 GES_PAC/MauiProgram.cs
GES_PAC/MauiProgram.cs | ||
---|---|---|
1 | 1 |
using Microsoft.Extensions.Logging; |
2 |
using CommunityToolkit.Maui; |
|
3 |
using GES_PAC.Services; |
|
4 |
using Microsoft.Maui.Platform; |
|
5 |
using GES_PAC.View; |
|
6 |
using GES_PAC.ViewModel; |
|
2 | 7 |
|
3 | 8 |
namespace GES_PAC; |
4 | 9 |
|
... | ... | |
9 | 14 |
var builder = MauiApp.CreateBuilder(); |
10 | 15 |
builder |
11 | 16 |
.UseMauiApp<App>() |
12 |
.ConfigureFonts(fonts => |
|
17 |
.UseMauiCommunityToolkit() |
|
18 |
.ConfigureFonts(fonts => |
|
13 | 19 |
{ |
14 | 20 |
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); |
15 | 21 |
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); |
16 | 22 |
}); |
17 | 23 |
|
24 |
// Services |
|
25 |
builder.Services.AddSingleton<ConnexionService>(); |
|
26 |
|
|
27 |
// Views |
|
28 |
builder.Services.AddSingleton<MainView>(); |
|
29 |
builder.Services.AddSingleton<CreatePlaceView>(); |
|
30 |
builder.Services.AddSingleton<CreateDayView>(); |
|
31 |
builder.Services.AddSingleton<CreatePersonView>(); |
|
32 |
|
|
33 |
// ViewModels |
|
34 |
builder.Services.AddSingleton<MainViewModel>(); |
|
35 |
builder.Services.AddSingleton<CreatePlaceViewModel>(); |
|
36 |
builder.Services.AddSingleton<CreateDayViewModel>(); |
|
37 |
builder.Services.AddSingleton<CreatePersonViewModel>(); |
|
38 |
|
|
18 | 39 |
#if DEBUG |
19 |
builder.Logging.AddDebug();
|
|
40 |
builder.Logging.AddDebug();
|
|
20 | 41 |
#endif |
21 | 42 |
|
22 | 43 |
return builder.Build(); |
Formats disponibles : Unified diff