Files
6098/Cowain.Bake.Common/Converter/DummyRuleConvertor.cs

25 lines
677 B
C#
Raw Normal View History

using System;
using System.Globalization;
using System.Windows.Data;
using Cowain.Bake.Common.Enums;
namespace Cowain.Bake.Common.Converter
{
public class DummyRuleConvertor:IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value == null) { return null; }
int rule = System.Convert.ToInt32(value);
DummyPlaceRule a = (DummyPlaceRule)rule;
return a.GetDescription();
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return null;
}
}
}