using System;
using System.Globalization;
using System.Windows.Data;

namespace QC.QMine.QMineInterface;

public class StrToBoolIsEnabledConverter : IValueConverter
{
	public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
	{
		if (System.Convert.ToString(value) == "1")
		{
			return true;
		}
		return false;
	}

	public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
	{
		throw new InvalidOperationException("Converter cannot convert back.");
	}
}
