27 lines
716 B
C#
27 lines
716 B
C#
|
|
using Cowain.Bake.Common.Enums;
|
|||
|
|
using System;
|
|||
|
|
using System.Globalization;
|
|||
|
|
using System.Windows.Data;
|
|||
|
|
|
|||
|
|
namespace Cowain.Bake.Common.Converter
|
|||
|
|
{
|
|||
|
|
public class TaskCmdConvertor : IValueConverter
|
|||
|
|
{
|
|||
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|||
|
|
{
|
|||
|
|
if (value == null)
|
|||
|
|
{
|
|||
|
|
return null;
|
|||
|
|
}
|
|||
|
|
value = System.Convert.ToInt32(value);
|
|||
|
|
ETaskStep status = (ETaskStep)value;
|
|||
|
|
return status.FetchDescription();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|||
|
|
{
|
|||
|
|
return null;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|