| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- using MuchInfo.Chart.Data.EnumTypes;
- using MuchInfo.Chart.WPF.Helpers;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Windows.Data;
- //----------------------------------------------------------------
- //Module Name: QuikTimeSpanConverter
- //Purpose:
- //CopyRight: Muchinfo
- //History:
- //----------------------------------------------------------------
- //DateTime 2015/4/8 11:41:18
- //Author ouyang.hongbin
- //Description Create
- //----------------------------------------------------------------
- namespace MuchInfo.Chart.WPF.Converter
- {
- public class QuikTimeSpanConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- var Rlt = "";
- var cycle = (CycleType)value;
- switch (cycle)
- {
- case CycleType.TimeSharing:
- Rlt = LanguageManager.FindResource(LanguageConst.TimeSpanControl_TimeSharingLine);
- break;
- case CycleType.Minute:
- Rlt = LanguageManager.FindResource(LanguageConst.TimeSpanControl_OneMinute);
- break;
- case CycleType.Minute3:
- Rlt = LanguageManager.FindResource(LanguageConst.TimeSpanControl_ThreeMinute);
- break;
- case CycleType.Minute5:
- Rlt = LanguageManager.FindResource(LanguageConst.TimeSpanControl_FiveMinute);
- break;
- case CycleType.Minute10:
- Rlt = LanguageManager.FindResource(LanguageConst.TimeSpanControl_TenMinute);
- break;
- case CycleType.Minute15:
- Rlt = LanguageManager.FindResource(LanguageConst.TimeSpanControl_FifteenMinute);
- break;
- case CycleType.Minute30:
- Rlt = LanguageManager.FindResource(LanguageConst.TimeSpanControl_ThirtyMinute);
- break;
- case CycleType.Minute60:
- Rlt = LanguageManager.FindResource(LanguageConst.TimeSpanControl_SixtyMinute);
- break;
- case CycleType.Minute90:
- Rlt = LanguageManager.FindResource(LanguageConst.TimeSpanControl_NinetyMinute);
- break;
- case CycleType.Minute120:
- Rlt = LanguageManager.FindResource(LanguageConst.TimeSpanControl_Minute120);
- break;
- case CycleType.Minute180:
- Rlt = LanguageManager.FindResource(LanguageConst.TimeSpanControl_Minute180);
- break;
- case CycleType.Minute240:
- Rlt = LanguageManager.FindResource(LanguageConst.TimeSpanControl_Minute240);
- break;
- case CycleType.Hour:
- Rlt = LanguageManager.FindResource(LanguageConst.TimeSpanControl_OneHour);
- break;
- case CycleType.Day:
- Rlt = LanguageManager.FindResource(LanguageConst.TimeSpanControl_OneDay);
- break;
- case CycleType.Week:
- Rlt = LanguageManager.FindResource(LanguageConst.TimeSpanControl_OneWeek);
- break;
- case CycleType.Month:
- Rlt = LanguageManager.FindResource(LanguageConst.TimeSpanControl_OneMonth);
- break;
- case CycleType.Quarter:
- Rlt = LanguageManager.FindResource(LanguageConst.TimeSpanControl_OneQuarter);
- break;
- case CycleType.Year:
- Rlt = LanguageManager.FindResource(LanguageConst.TimeSpanControl_OneYear);
- break;
- }
- return Rlt;
- }
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
- }
|