You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

56 lines
2.6 KiB

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace SunlightCentralizedControlManagement_SCCM_.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.Await;//等待
else if (i == "101") Staten = Properties.Resources.Ready;//准备
else if (i == "102") Staten = Properties.Resources.Measure;//计量
else if (i == "109") Staten = Properties.Resources.ERR;//错误
else if (i == "110") Staten = Properties.Resources.NotSent;//未发送
else if (i == "111") Staten = Properties.Resources.LtemizedSending;//发送明细
else if (i == "112") Staten = Properties.Resources.DNotSent;//未发送明细
else if (i == "119") Staten = Properties.Resources.Fail;//失败
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 == "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 if (i == "801") Staten = Properties.Resources.Online;//在线
else if (i == "899") Staten = Properties.Resources.CloseTheConnection;//关闭连接
else if (i == "1") Staten = Properties.Resources.dye;//染料
else if (i == "2") Staten = Properties.Resources.chemicals;//助剂
else if (i == "3") Staten = Properties.Resources.powder;//粉体
else Staten = "";
return Staten;
}
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
}
}