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

This commit is contained in:
2025-07-08 10:52:32 +02:00
parent e6746f76b1
commit c6748055fd
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() { }