using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Data; namespace XGL.Tools { public class DeviceNameConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value.Equals("equ_type_cxj")) { return "成型机"; } if (value.Equals("equ_type_hf")) { return "烘房"; } if (value.Equals("equ_type_lg")) { return "料罐"; } if (value.Equals("equ_type_spdsj")) { return "吊筛机"; } return "未知"; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } }