Add InfoEvent with confirmation
This commit is contained in:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user