namespace GDNXFD.Alert.Config.Converters { using GDNXFD.Alert.Config.Resources.Strings; using System; using System.IO; using System.Windows.Data; using System.Windows.Media.Imaging; /// /// travel type to text converter /// public class TravelTypeToTextConverter : IValueConverter { /// /// Convert a travel type to text. /// /// /// /// /// /// public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value != null) { TravelType travelType = (TravelType)value; switch (travelType) { case TravelType.Unknown: return StringProvider.GetString("TravelTypeUnkown"); case TravelType.OneWay: return StringProvider.GetString("TravelTypeOneWay"); case TravelType.Roundtrip: return StringProvider.GetString("TravelTypeRoundTrip"); default: break; } } return null; } /// /// Convert back /// /// /// /// /// /// public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } }