using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Data; namespace Aucma.Scada.UI.Converter.AssemblyPlan { public class PlanStatusConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value == null) { return false; } else { int info = (int)value; string result = ""; switch (info) { case 1: result = "待执行"; break; case 2: result = "执行中"; break; case 3: result = "完成"; break; default: break; } return result; } } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } }