23 lines
737 B
C#
23 lines
737 B
C#
using System;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using System.Globalization;
|
|
using System.Windows.Data;
|
|
|
|
namespace HashCalculator.GUI.Converters
|
|
{
|
|
[SuppressMessage("Microsoft.Performance", "CA1812")]
|
|
[ValueConversion(typeof(InputEntry), typeof(bool))]
|
|
internal class ValidInputEntryTypeToBooleanConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
var entry = value as InputEntry;
|
|
return entry?.IsValid == true;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
} |