Files
ClashWidget/Converters/NodeMatchConverter.cs
2026-05-08 11:59:26 +08:00

20 lines
553 B
C#

using System.Globalization;
using System.Windows.Data;
namespace ClashWidget.Converters;
public class NodeMatchConverter : IMultiValueConverter
{
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
if (values.Length >= 2 && values[0] is string a && values[1] is string b)
return a == b;
return false;
}
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
{
throw new NotSupportedException();
}
}