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.
45 lines
1.2 KiB
C#
45 lines
1.2 KiB
C#
using System;
|
|
using System.Globalization;
|
|
using System.Windows.Data;
|
|
|
|
namespace Aucma.Scada.UI.ConvertToObj
|
|
{
|
|
public class PlanStatusConverter : IMultiValueConverter
|
|
{
|
|
public object Convert(object[] value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if (value == null)
|
|
{
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
int info = (int)value[0];
|
|
string result = "";
|
|
switch (info)
|
|
{
|
|
case 1:
|
|
result = "待执行";
|
|
break;
|
|
case 2:
|
|
result = "执行中";
|
|
break;
|
|
case 3:
|
|
result = "完成";
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|