2b0797f50f
Linked colors to options menu Options extension Aussehen aufgebohrt: - erlaubt text von status zu ändern, - bessere beschriftung von Farben desing änderung und bedienung - heute status felder anklickbar, - Farbpalette verdunkelt und kontrast reduziert - Kalender Tage anklickbar gemacht - Optionen überarbeitet
42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
using cfs_tracker.Helpers;
|
|
|
|
namespace cfs_tracker.Models;
|
|
|
|
public static class HealthStateExtensions
|
|
{
|
|
public static string ToColorKey(this HealthState state)
|
|
{
|
|
return state switch
|
|
{
|
|
HealthState.Green => ThemeKeys.StateGreen,
|
|
HealthState.Yellow => ThemeKeys.StateYellow,
|
|
HealthState.Red => ThemeKeys.StateRed,
|
|
HealthState.Gray => ThemeKeys.StateGray,
|
|
_ => ThemeKeys.PanelBackground2
|
|
};
|
|
}
|
|
|
|
public static string ToTextKey(this HealthState state)
|
|
{
|
|
return state switch
|
|
{
|
|
HealthState.Green => ThemeKeys.StatusGreenText,
|
|
HealthState.Yellow => ThemeKeys.StatusYellowText,
|
|
HealthState.Red => ThemeKeys.StatusRedText,
|
|
HealthState.Gray => ThemeKeys.StatusGrayText,
|
|
_ => ""
|
|
};
|
|
}
|
|
|
|
public static string ToFallbackText(this HealthState state)
|
|
{
|
|
return state switch
|
|
{
|
|
HealthState.Green => "Grün",
|
|
HealthState.Yellow => "Gelb",
|
|
HealthState.Red => "Rot",
|
|
HealthState.Gray => "Grau",
|
|
_ => ""
|
|
};
|
|
}
|
|
} |