Skip to content
Permalink
4e6b0bb600
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
62 lines (50 sloc) 2.18 KB
using Mobile_app_development6002CEM.Model;
using Mobile_app_development6002CEM.Service;
using Mobile_app_development6002CEM.ViewModels;
using Mobile_app_development6002CEM.Views;
using Microsoft.Extensions.Logging;
using Supabase;
using CommunityToolkit.Maui;
namespace Mobile_app_development6002CEM;
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");
}).UseMauiCommunityToolkit();
var url = AppConfig.Url;
var key = AppConfig.Key;
builder.Services.AddSingleton(provider => new Supabase.Client(url, key));
builder.Services.AddSingleton<LoginPage>();
builder.Services.AddSingleton<LoginViewModel>();
builder.Services.AddSingleton<RegisterPage>();
builder.Services.AddSingleton<RegisterViewModel>();
builder.Services.AddSingleton<HomePage>();
builder.Services.AddSingleton<HomePageViewModel>();
builder.Services.AddSingleton<UserAccountPage>();
builder.Services.AddSingleton<UserAccountViewModel>();
builder.Services.AddSingleton<WalletPage>();
builder.Services.AddSingleton<WalletViewModel>();
builder.Services.AddSingleton<PaymentPage>();
builder.Services.AddSingleton<PaymentViewModel>();
builder.Services.AddSingleton<BookingPage>();
builder.Services.AddSingleton<BookingViewModel>();
builder.Services.AddSingleton<updateEmail>();
builder.Services.AddSingleton<updateEmailViewModel>();
builder.Services.AddSingleton<updatePass>();
builder.Services.AddSingleton<updatePassViewModel>();
builder.Services.AddSingleton<TransactionPage>();
builder.Services.AddSingleton<TransactionViewModel>();
builder.Services.AddSingleton<IDataService, DataService>();
#if DEBUG
builder.Logging.AddDebug();
#endif
return builder.Build();
}
}