Play Console and others

This commit is contained in:
2024-09-15 23:51:32 +02:00
parent d54c71a037
commit 17bc9ed190
17 changed files with 325 additions and 98 deletions

View File

@@ -0,0 +1,52 @@
using CommunityToolkit.Mvvm.ComponentModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace Jugenddienst_Stunden.ViewModels {
internal class StundeViewModel : ObservableObject, IQueryAttributable {
public int id { get; set; }
private Types.DayTime _stunde;
public string Description {
get => _stunde.description;
set {
if (_stunde.description != value) {
_stunde.description = value;
OnPropertyChanged();
}
}
}
public int Identifier => (int)_stunde.id;
public ICommand SaveCommand { get; private set; }
public ICommand DeleteCommand { get; private set; }
//private async Task Save() {
// _stunde.Date = DateTime.Now;
// _stunde.Save();
// await Shell.Current.GoToAsync($"..?saved={_stunde.Filename}");
//}
//private async Task Delete() {
// _stunde.Delete();
// await Shell.Current.GoToAsync($"..?deleted={_stunde.Filename}");
//}
async void IQueryAttributable.ApplyQueryAttributes(IDictionary<string, object> query) {
if (query.ContainsKey("load")) {
DateTime heute = DateTime.Now;
//_stunde = await Models.Stunde.LoadDay(heute);
//_stunde = await Models.Stunde.LoadData();
//RefreshProperties();
}
}
}
}