TRX/tools/installer/TRX_InstallerLib/Utils/ComparisonConverter.cs
lahm86 e16fcda94b tools/installer: create common installer library
This creates a generic common installer WPF library for both games.
2025-03-30 12:34:54 +01:00

17 lines
481 B
C#

using System.Globalization;
using WD = System.Windows.Data;
namespace TRX_InstallerLib.Utils;
public class ComparisonConverter : WD.IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return value.Equals(parameter);
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return (bool)value ? parameter : WD.Binding.DoNothing;
}
}