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.

52 lines
1.5 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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不工作1A门工作2B门工作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();
}
}
}