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

namespace Earthblend.Tts.Common.Core.Converters
{
    public class GreaterThanConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null) return false;
            if (parameter==null) return false;

            return System.Convert.ToDouble(value.ToString()) > System.Convert.ToDouble(parameter.ToString());
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value;
        }
    }
}
