[#61] Windows: Use red and green color to indicate type of WineVariety
All checks were successful
Test / Run tests (push) Successful in 2m17s
All checks were successful
Test / Run tests (push) Successful in 2m17s
This commit is contained in:
@ -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() { }
|
||||
|
||||
|
Reference in New Issue
Block a user