Beachte die Einstellung ob Projekte und Gemeinden aktiv sind. Verbiete Änderungen an der Freistellung, wenn sie genehmigt wurde. Vereinfache das Speichern der Einstellungen Bessere Fehlerbehandlung, einheitlichere API
46 lines
1.9 KiB
C#
46 lines
1.9 KiB
C#
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>()
|
|
.ConfigureFonts(fonts => {
|
|
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
|
|
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
|
|
})
|
|
.UseBarcodeReader();
|
|
|
|
#if DEBUG
|
|
if (GlobalVar.ApiKey == null) {
|
|
//Preferences.Default.Set("apiKey
|
|
//Preferences.Default.Set("apiKey", "M3xneWlWNG85TmNIcmo1NnpxWkxVYS9JMDBFRlV8aHR0cDovL2hvdXJzLmRhdW5pLm1pbmUubnU6ODEvYXBwYXBp");
|
|
//Preferences.Default.Set("name", "Testserver: Lea");
|
|
//Preferences.Default.Set("surname", "Mair");
|
|
//Preferences.Default.Set("EmployeeId", 3);
|
|
//Preferences.Default.Set("apiUrl", "http://hours.dauni.mine.nu:81/appapi");
|
|
//HoursBase HoursBase = new HoursBase();
|
|
//HoursBase.tokendata = new TokenData("MTQxfHNkdFptQkNZTXlPT3ZyMHNBZDl0UnVxNExMRXxodHRwOi8vaG91cnMuZGF1bmkubWluZS5udTo4MS9hcHBhcGk=");
|
|
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", "http://hours.dauni.mine.nu:81/appapi");
|
|
}
|
|
builder.Logging.AddDebug();
|
|
#endif
|
|
|
|
return builder.Build();
|
|
}
|
|
|
|
|
|
}
|