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.
|
|
|
|
using Admin.Core.Common;
|
|
|
|
|
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.Core.DoorFoam.ConvertTo
|
|
|
|
|
{
|
|
|
|
|
public class CarStatusConverter : IValueConverter
|
|
|
|
|
{
|
|
|
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
|
|
|
{
|
|
|
|
|
if (value == null)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
//模式:0,不工作;1,A门工作;2,B门工作;3,AB门工作
|
|
|
|
|
string result = "";
|
|
|
|
|
switch (value.ObjToInt())
|
|
|
|
|
{
|
|
|
|
|
case 0:
|
|
|
|
|
result = "未工作";
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
result = "A门工作";
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
result = "B门工作";
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
result = "AB门工作";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
result = "未工作";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|