using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Data; namespace formula_manage.ConvertMoels { /// /// 设备数值转换器 /// /// internal class IndustrySQLConvert : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { string Industry = System.Convert.ToString(value); if (Industry == "0")//类型 { return "浸染"; } else { if (Industry == "1") { return "连染"; } else { if (Industry == "2") { return "印染"; } else { return "未知类型"; } } } } /// /// public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { return null; } } }