using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Data; namespace DyeingComputer.ConvertMoels { internal class StatenConvert : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value == null) { return null; } else { string Staten = null; string i = value.ToString(); if (i == "101") Staten = "准备就绪"; if (i == "102") Staten = "计量输送"; if (i == "201") Staten = "自动状态"; if (i == "202") Staten = "转入排队"; if (i == "203") Staten = "等待命令"; if (i == "301") Staten = "步骤完成"; if (i == "309") Staten = "输送异常"; return Staten; } } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } }