21 lines
583 B
C#
21 lines
583 B
C#
using System;
|
|
using System.Globalization;
|
|
using System.Windows.Data;
|
|
|
|
namespace HashCalculator.GUI.Converters
|
|
{
|
|
[ValueConversion(typeof(int), typeof(bool))]
|
|
public class IsZeroToBooleanConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
return (int)value == 0 ? false : true;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|