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

namespace NavisworksTransport.UI.WPF.Converters
{
    /// <summary>
    /// 路径类型转换器，将PathType枚举转换为中文显示
    /// </summary>
    public class PathTypeConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is NavisworksTransport.PathType pathType)
            {
                return pathType.GetDisplayName();
            }
            return "地面";
        }

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