using Muchinfo.MTPClient.Data.Enums; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Data; namespace Muchinfo.MTPClient.Infrastructure.Converters { public class WRStatusToIsEnabledConvert : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { bool result = false; if (value != null) { var wRStatus = (eWRStatus)value; switch (wRStatus) { case eWRStatus.Normal: result = true; break; case eWRStatus.Canceled: case eWRStatus.Frozen: case eWRStatus.Inactive: //case eWRStatus.: result = false; break; } } return result; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } }