123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using System;
- using CB.Entity;
- using CB.Interface;
- namespace CB.TrendChart
- {
- /// <summary>
- /// 走势图常用
- /// </summary>
- public class TrendChartUtils
- {
- public static string GetTrendChartClassName(ChartItemClassName ClassName)
- {
- string className = "";
- switch (ClassName)
- {
- case ChartItemClassName.SingleValue:
- className = "CB.TrendChart.SingleValueItem,CB.TrendChart";
- break;
- case ChartItemClassName.MultiValue:
- className = "CB.TrendChart.MultiValueItem,CB.TrendChart";
- break;
- }
- return className;
- }
- /// <summary>
- /// 返回走势图项处理类
- /// </summary>
- /// <typeparam name="T"></typeparam>
- /// <param name="className"></param>
- /// <returns></returns>
- public static IChartItem<T> GetTrendChartInterface<T>(ChartItemClassName className) where T : LotteryOpenCode
- {
- switch (className)
- {
- case ChartItemClassName.SingleValue:
- return new SingleValueItem<T>();
- case ChartItemClassName.MultiValue:
- return new MultiValueItem<T>();
- case ChartItemClassName.SpecialValue:
- return new SpecialValueItem<T>();
- }
- return null;
- }
- }
- }
|