1
0
mirror of synced 2024-12-24 01:53:08 +01:00
MassiveKnob/Windows/MassiveKnob/Helpers/ComparisonConverter.cs
Mark van Renswoude 197aef531a Improved stability of analog signals in the Arduino sketch
Reimplemented automatic refresh of the serial port list
Improved serial device connection retry
Moved plugins to their own subfolder for better separation, added metadata on the entry assembly to load
Added logging settings
Added Run at startup setting
Many visual enhancements
2021-03-05 11:47:12 +01:00

19 lines
558 B
C#

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