using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Data; using System.Windows.Media; namespace HxUserManagement.Classes { public class StatusToStringConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { int nVal = int.Parse((string)value); switch (nVal) { case 0: return Properties.Resources.strLock; case 1: return Properties.Resources.strNormal; default: return ""; } } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return null; } } }