Bessere Trennung manueller / automatischer Login
Umstellung auf Sekunden wegen aktualisierter Hauptanwendung
Umstellung auf Toasts bei Informationsmeldungen
Abstände und Sichtbarkeiten vereinheitlicht
Upgrade auf .NET9
This commit is contained in:
2025-02-15 22:59:06 +01:00
parent 65d5dc94df
commit 4449b4ad0e
18 changed files with 268 additions and 121 deletions

View File

@@ -0,0 +1,29 @@
using System.Globalization;
namespace Jugenddienst_Stunden.Converter;
internal class SecondsTimeConverter : IValueConverter {
private int seconds;
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) {
if (value is null)
return "0:0";
if (value is int) {
seconds = (int)value;
} else {
int.TryParse((string?)value, out seconds);
}
TimeSpan time = TimeSpan.FromSeconds(seconds);
return (int)time.TotalHours + ":" + Math.Abs(time.Minutes);
//return time.ToString(@"hh\:mm");
//return time.ToString(@"hh\:mm\:ss");
//return "00:00";
}
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) {
throw new NotImplementedException();
}
}