29 lines
617 B
C#
29 lines
617 B
C#
using Jugenddienst_Stunden.ViewModels;
|
|
using System.Windows.Input;
|
|
|
|
namespace Jugenddienst_Stunden.Views;
|
|
|
|
public partial class StundePage : ContentPage {
|
|
|
|
|
|
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.");
|
|
}
|
|
|
|
} |