Play Console and others
This commit is contained in:
52
Jugenddienst Stunden/ViewModels/StundeViewModel.cs
Normal file
52
Jugenddienst Stunden/ViewModels/StundeViewModel.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user