using System;
using System.Globalization;
using System.Windows.Data;
using Valg.EVA.Skanning.Resources;

namespace Valg.EVA.Skanning.Assets.Converter
{
    public class EnumeratorToTextConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var resourceKey = string.Format("{0}.{1}_{2}", parameter as string, value.GetType().Name, value);
            return LanguageResource.GetText(resourceKey);
        }

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

