[#61] Windows: Use red and green color to indicate type of WineVariety
All checks were successful
Test / Run tests (push) Successful in 1m41s

This commit is contained in:
2025-07-08 10:52:32 +02:00
parent 53b1dedcf2
commit 181199039e
8 changed files with 21 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.Windows.Media;
namespace Elwig.Models.Entities {
[Table("wine_variety"), PrimaryKey("SortId")]
@@ -20,6 +21,7 @@ namespace Elwig.Models.Entities {
public bool IsRed => Type == "R";
public bool IsWhite => Type == "W";
public Brush? Color => IsWhite ? Brushes.DarkGreen : IsRed ? Brushes.DarkRed : null;
public WineVar() { }