using CommunityToolkit.Maui; using Jugenddienst_Stunden.Models; using Microsoft.Extensions.Logging; using ZXing.Net.Maui.Controls; namespace Jugenddienst_Stunden; /// /// Das Hauptprogramm. /// public static class MauiProgram { public static MauiApp CreateMauiApp() { var builder = MauiApp.CreateBuilder(); builder .UseMauiApp() // Initialize the .NET MAUI Community Toolkit by adding the below line of code .UseMauiCommunityToolkit(options => { options.SetShouldEnableSnackbarOnWindows(true); }) .ConfigureFonts(fonts => { fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); }) //.UseBarcodeScanning(); .UseBarcodeReader(); #if DEBUG if (GlobalVar.ApiKey == null) { GlobalVar.ApiKey = Preferences.Default.Get("apiKey", "MTQxfHNkdFptQkNZTXlPT3ZyMHNBZDl0UnVxNExMRXxodHRwOi8vaG91cnMuZGF1bmkubWluZS5udTo4MS9hcHBhcGk="); GlobalVar.Name = Preferences.Default.Get("name", "Testserver: Isabell"); GlobalVar.Surname = Preferences.Default.Get("surname", "Biasi"); GlobalVar.EmployeeId = Preferences.Default.Get("EmployeeId", 141); GlobalVar.ApiUrl = Preferences.Default.Get("apiUrl", "https://hours.dauni.mine.nu/appapi"); } builder.Logging.AddDebug(); #endif return builder.Build(); } }