首次提交:添加src文件夹代码
This commit is contained in:
26
Cowain.Bake.Common/Converter/TaskCmdConvertor.cs
Normal file
26
Cowain.Bake.Common/Converter/TaskCmdConvertor.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user