
namespace HistoryView.Converters;

public class RunningModeToBool : IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        if (value is not RunningMode runningMode)
            return false;

        if (parameter is not string para)
            return false;

        switch (runningMode)
        {

            case RunningMode.Realtime:
                return para == "Realtime";
            case RunningMode.Simulate:
                return para == "Simulate";
            case RunningMode.Undefined:
            default:
                return false;
        }
    }

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
        throw new NotImplementedException();
    }
}
