Skip to content
Permalink
main
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
using SkiaSharp.Views.Maui.Controls.Hosting;
namespace AppMeteoMAUI;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseSkiaSharp()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
fonts.AddFont("times new roman.ttf", "TimesNewRoman");
fonts.AddFont("FiraSans-Bold.otf", "FiraSansBold");
fonts.AddFont("Purple Smile.ttf", "PurpleSmile");
fonts.AddFont("Requiem.ttf", "Requiem");
fonts.AddFont("Low Budget.ttf", "LowBudget");
});
#if DEBUG
builder.Logging.AddDebug();
#endif
builder.Services.AddSingleton<IGeolocation>(Geolocation.Default);
string dbPath = FileAccessHelper.GetFileLocalPath("Preferiti.db3");
builder.Services.AddSingleton<PreferitiRepository>(s => ActivatorUtilities.CreateInstance<PreferitiRepository>(s, dbPath));
return builder.Build();
}
}