You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
using HandyControl.Tools.Extension;
|
|
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 ShiftConvert : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if (value.ToString().IsNullOrEmpty())
|
|
{
|
|
return "未发起检测";
|
|
}
|
|
else if (value.Equals("0"))
|
|
{
|
|
return "待检测";
|
|
}
|
|
else if (value.Equals("1"))
|
|
{
|
|
return "监测中";
|
|
}
|
|
else if (value.Equals("2"))
|
|
{
|
|
return "检测完成";
|
|
}
|
|
else if(value.Equals("5"))
|
|
{
|
|
return "白班";
|
|
}
|
|
else
|
|
{
|
|
return "夜班";
|
|
}
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
// 如果需要双向绑定,也需要实现 ConvertBack 方法
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|