Gui Changes

This commit is contained in:
2024-09-19 19:36:36 +02:00
parent b5c20b8177
commit 7803c3dc27
6 changed files with 46 additions and 46 deletions

View File

@@ -1,5 +1,6 @@
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Jugenddienst_Stunden.Models;
using Jugenddienst_Stunden.Types;
using System;
using System.Collections.Generic;
@@ -26,6 +27,8 @@ namespace Jugenddienst_Stunden.ViewModels {
}
}
public string SubTitle { get; set; } = DateTime.Today.ToString("dddd, d. MMM. yyyy");
public int Identifier => (int)_stunde.id;
public ICommand SaveCommand { get; private set; }
@@ -40,6 +43,7 @@ namespace Jugenddienst_Stunden.ViewModels {
public StundeViewModel(Types.DayTime stunde) {
_stunde = stunde;
//SaveCommand = new AsyncRelayCommand(Save);
//DeleteCommand = new AsyncRelayCommand(Delete);
}
@@ -59,8 +63,9 @@ namespace Jugenddienst_Stunden.ViewModels {
if (query.ContainsKey("load")) {
//DateTime heute = DateTime.Now;
_stunde = await Models.Stunde.LoadEntry(Convert.ToInt32(query["load"]));
SubTitle = _stunde.day.ToString("dddd, d. MMM. yyyy");
OnPropertyChanged(nameof(Stunde));
OnPropertyChanged(nameof(SubTitle));
}
}
}