Prima configurazione e struttura
This commit is contained in:
@@ -1,19 +1,17 @@
|
||||
using CommunityToolkit.Maui;
|
||||
using IntegryApiClient.MAUI;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Template.Maui.Services;
|
||||
using Template.Shared;
|
||||
using Template.Shared.Interfaces;
|
||||
using MudBlazor.Services;
|
||||
using SteUp.Maui.Core;
|
||||
using SteUp.Maui.Core.Services;
|
||||
using SteUp.Shared;
|
||||
using SteUp.Shared.Core.Interface;
|
||||
|
||||
namespace Template.Maui
|
||||
namespace SteUp.Maui
|
||||
{
|
||||
public static class MauiProgram
|
||||
{
|
||||
#if DEBUG
|
||||
private const string BaseRestServicesEndpoint = "https://devservices.studioml.it/ems-api/";
|
||||
//private const string BaseRestServicesEndpoint = "http://192.168.2.23:8080/ems-api/";
|
||||
#else
|
||||
private const string BaseRestServicesEndpoint = "https://services.studioml.it/ems-api/";
|
||||
#endif
|
||||
private const string AppToken = "4fef1843-793d-499b-a7ed-1edd8cac465c";
|
||||
|
||||
public static MauiApp CreateMauiApp()
|
||||
{
|
||||
@@ -22,21 +20,22 @@ namespace Template.Maui
|
||||
var builder = MauiApp.CreateBuilder();
|
||||
builder
|
||||
.UseMauiApp<App>()
|
||||
.UseIntegry(BaseRestServicesEndpoint)
|
||||
.ConfigureFonts(fonts =>
|
||||
{
|
||||
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
|
||||
});
|
||||
.UseIntegry(appToken: AppToken, useLoginAzienda: true)
|
||||
.UseMauiCommunityToolkit()
|
||||
.ConfigureFonts(fonts => { fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); });
|
||||
|
||||
builder.Services.AddMauiBlazorWebView();
|
||||
builder.Services.AddBlazorBootstrap();
|
||||
builder.Services.AddMudServices();
|
||||
|
||||
#if DEBUG
|
||||
builder.Services.AddBlazorWebViewDeveloperTools();
|
||||
builder.Logging.AddDebug();
|
||||
#endif
|
||||
|
||||
builder.Services.AddSingleton<IFormFactor, FormFactor>();
|
||||
builder.AddAuthorizationCore();
|
||||
builder.RegisterAppServices();
|
||||
builder.RegisterIntegryServices();
|
||||
builder.RegisterSystemService();
|
||||
|
||||
return builder.Build();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user