Add InfoEvent with confirmation

This commit is contained in:
2025-12-19 10:29:30 +01:00
parent 98d6d61f16
commit 8d512963b5
3 changed files with 46 additions and 6 deletions

View File

@@ -33,7 +33,14 @@ public partial class LoginPage : ContentPage {
if (BindingContext is LoginViewModel vm) {
vm.AlertEvent += async (_, msg) => await DisplayAlert("Fehler:", msg, "OK");
vm.InfoEvent += async (_, msg) => await DisplayAlert("Information:", msg, "OK");
//vm.InfoEvent += async (_, msg) => await DisplayAlert("Information:", msg, "OK");
// Neues InfoEvent: Dialog anzeigen und nach Bestätigung das Result setzen
vm.InfoEvent += async (_, infoArgs) => {
await MainThread.InvokeOnMainThreadAsync(async () => {
await DisplayAlert(infoArgs.Title, infoArgs.Message, infoArgs.ConfirmText);
infoArgs.SetResult(true);
});
};
}
barcodeScannerView.Options =