Files
Jugenddienst-Stunden/Jugenddienst Stunden/Views/StundePage.xaml.cs
2024-10-13 12:28:41 +02:00

31 lines
655 B
C#

using Jugenddienst_Stunden.ViewModels;
using System.Windows.Input;
namespace Jugenddienst_Stunden.Views;
public partial class StundePage : ContentPage {
/// <summary>
/// CTOR
/// </summary>
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<bool> ShowConfirm(string title, string message) {
return await DisplayAlert(title, message, "Passt!", "Na, nor decht nit.");
}
}