| 12345678910111213141516171819202122232425262728293031323334 |
- using Muchinfo.MTPClient.Data.Enums;
- using Muchinfo.MTPClient.Resources;
- using System;
- using System.Windows.Data;
- namespace Muchinfo.MTPClient.Infrastructure.Converters
- {
- public class WarningDirectionConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- string result = string.Empty;
- if (value != null)
- {
- var warningType = (Direction)value;
- switch (warningType)
- {
- case Direction.Ask:
- result = Client_Resource.Infrastructure_sell;
- break;
- case Direction.Bid:
- result = Client_Resource.Infrastructure_buy;
- break;
- }
- }
- return result;
- }
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
- }
|