using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Data; namespace XGLFinishPro.Tools { public class OrderInOutConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { // 根据输入值返回对应的输出值 已派发w1未派w0活动w2报工w3 if (value.Equals("0")) { return "进"; } else { return "出"; } } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { // 如果需要双向绑定,也需要实现 ConvertBack 方法 throw new NotImplementedException(); } } }