You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mastermind/Sources/MauiSpark/Convertisseurs/IndicateurVersCouleurMAUI.cs

30 lines
799 B

using CoreLibrary.Core;
using System.Globalization;
namespace MauiSpark.Convertisseurs
{
public class IndicateurVersCouleurMAUI : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is not Indicateur) return "black";
switch (value)
{
case Indicateur.BONNEPLACE:
return "black";
case Indicateur.BONNECOULEUR:
return "white";
default:
return "black";
}
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}