Bessere Trennung manueller / automatischer Login Umstellung auf Sekunden wegen aktualisierter Hauptanwendung Umstellung auf Toasts bei Informationsmeldungen Abstände und Sichtbarkeiten vereinheitlicht Upgrade auf .NET9
42 lines
1.4 KiB
C#
42 lines
1.4 KiB
C#
using CommunityToolkit.Maui;
|
|
using Jugenddienst_Stunden.Models;
|
|
using Microsoft.Extensions.Logging;
|
|
using ZXing.Net.Maui.Controls;
|
|
|
|
namespace Jugenddienst_Stunden;
|
|
|
|
/// <summary>
|
|
/// Das Hauptprogramm.
|
|
/// </summary>
|
|
public static class MauiProgram {
|
|
|
|
public static MauiApp CreateMauiApp() {
|
|
var builder = MauiApp.CreateBuilder();
|
|
builder
|
|
.UseMauiApp<App>()
|
|
// Initialize the .NET MAUI Community Toolkit by adding the below line of code
|
|
.UseMauiCommunityToolkit()
|
|
.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();
|
|
}
|
|
|
|
|
|
}
|