using Jugenddienst_Stunden.ViewModels;
using System.Windows.Input;
namespace Jugenddienst_Stunden.Views;
public partial class StundePage : ContentPage {
///
/// CTOR
///
public StundePage() {
InitializeComponent();
if (BindingContext is StundeViewModel vm) {
vm.AlertEvent += Vm_AlertEvent;
//vm.InfoEvent += Vm_InfoEvent;
vm.ConfirmEvent += ShowConfirm;
}
}
private void Vm_AlertEvent(object? sender, string e) {
DisplayAlert("Fehler:", e, "OK");
}
private async Task ShowConfirm(string title, string message) {
return await DisplayAlert(title, message, "Passt!", "Na, nor decht nit.");
}
}