|
|
@ -11,7 +11,7 @@ namespace Qwirkle.Converters
|
|
|
|
|
|
|
|
|
|
|
|
string colorstring = (string)value;
|
|
|
|
string colorstring = (string)value;
|
|
|
|
|
|
|
|
|
|
|
|
if(string.IsNullOrWhiteSpace(colorstring)) return Colors.Transparent;
|
|
|
|
if (string.IsNullOrWhiteSpace(colorstring)) return Colors.Transparent;
|
|
|
|
|
|
|
|
|
|
|
|
if (colorstring == "Yellow") return Colors.Yellow;
|
|
|
|
if (colorstring == "Yellow") return Colors.Yellow;
|
|
|
|
if (colorstring == "Red") return Colors.Red;
|
|
|
|
if (colorstring == "Red") return Colors.Red;
|
|
|
@ -30,4 +30,22 @@ namespace Qwirkle.Converters
|
|
|
|
throw new NotImplementedException();
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class RoundToVisibilityConverter : IValueConverter
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (value is not string)
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string sh = (string)value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return sh == "Round";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw new NotSupportedException();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|