using ScottPlot.TickGenerators.Financial; using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Data; using System.Windows.Media; namespace SunlightCentralizedControlManagement_SCCM_.ConvertMoels { internal class StatexmlConvert : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value == null) { return null; } else { string Staten = "None"; string i = value.ToString(); if (i == "101") Staten = "Walk";//运行 else if (i == "202") Staten = "RunFast";//运行 else if (i == "301") Staten = "Stop";//完成 else if (i == "309") Staten = "ErrorOutline";//错误 else if (i == "800") Staten = "LinkOff";//未连接 else if (i == "801") Staten = "Link";//连接成功 else if (i == "899") Staten = "LinkOff";//关闭连接 else if (i == "True") Staten = "Lock";//锁 return Staten; } } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } }