using System; using System.Collections.Generic; using System.Globalization; 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 == "100") Staten = Properties.Resources.Ready; else if (i == "101") Staten = Properties.Resources.Ready; else if (i == "102") Staten = Properties.Resources.Measure; else if (i == "201") Staten = Properties.Resources.Auto; else if (i == "202") Staten = Properties.Resources.LineUp; else if (i == "203") Staten = Properties.Resources.Await; else if (i == "205") Staten = Properties.Resources.RUN; else if (i == "301") Staten = Properties.Resources.Finish; else if (i == "309") Staten = Properties.Resources.Abnormal; else if (i == "800") Staten = Properties.Resources.Notimplementation; else if (i == "801") Staten = Properties.Resources.Implementation; else Staten = "null"; return Staten; } } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } }