First version

This commit is contained in:
2026-03-19 23:11:13 +01:00
parent 7503d77c82
commit 8615d1de07
71 changed files with 3128 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
namespace cfs_tracker.Models;
public static class HealthStateExtensions
{
public static Color ToColor(this HealthState state)
{
return state switch
{
HealthState.Green => Color.FromArgb("#4CAF50"),
HealthState.Yellow => Color.FromArgb("#FBC02D"),
HealthState.Red => Color.FromArgb("#E53935"),
HealthState.Gray => Color.FromArgb("#757575"),
_ => Colors.Transparent
};
}
public static string ToLabel(this HealthState state)
{
return state switch
{
HealthState.Green => "Gut",
HealthState.Yellow => "So lala",
HealthState.Red => "Schlecht",
HealthState.Gray => "Totalausfall",
_ => ""
};
}
}