Bessere Trennung manueller / automatischer Login
Umstellung auf Sekunden wegen aktualisierter Hauptanwendung
Umstellung auf Toasts bei Informationsmeldungen
Abstände und Sichtbarkeiten vereinheitlicht
Upgrade auf .NET9
This commit is contained in:
2025-02-15 22:59:06 +01:00
parent 65d5dc94df
commit 4449b4ad0e
18 changed files with 268 additions and 121 deletions

View File

@@ -1,5 +1,7 @@
using Jugenddienst_Stunden.ViewModels;
using Jugenddienst_Stunden.Models;
using CommunityToolkit.Maui.Core;
using CommunityToolkit.Maui.Alerts;
namespace Jugenddienst_Stunden.Views;
@@ -41,9 +43,21 @@ public partial class StundenPage : ContentPage {
await DisplayAlert("Fehler:", e, "OK");
});
}
//private void Vm_InfoEvent(object? sender, string e) {
// DisplayAlert("Information:", e, "OK");
//}
//private void Vm_InfoEvent(object? sender, string e) {
// MainThread.BeginInvokeOnMainThread(async () => {
// await DisplayAlert("Information:", e, "OK");
// });
//}
private void Vm_InfoEvent(object? sender, string e) {
MainThread.BeginInvokeOnMainThread(async () => {
await DisplayAlert("Information:", e, "OK");
CancellationTokenSource cts = new CancellationTokenSource();
ToastDuration duration = ToastDuration.Short;
double fontSize = 20;
var toast = Toast.Make(e, duration, fontSize);
await toast.Show(cts.Token);
});
}