1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using CB.Entity;
- using CB.Interface;
- namespace CB.TrendChart
- {
- class SpecialValueItem<TEntity> : ChartItemRepository<TEntity>, IChartItem<TEntity> where TEntity : LotteryOpenCode
- {
- public new int[] _itemIndex;
- public override void Init(ChartCssConfigInfo cssConfig, TrendChartItemInfo itemConfig)
- {
- DefaultInit(cssConfig, itemConfig);
- }
- #region 未用
- public override void MissDataInit(TrendChartData TrendChartCofig, int i)
- {
- }
- public override string GetMissData(MissDataType missDataType)
- {
- return "";
- }
- #endregion
- public override bool SetItemValue(TEntity entity)
- {
- if (this._ItemIndex == null)
- {
- this._ItemIndex = new int[this._itemConfig.ItemCount];
- }
- _itemIndex = new int[this._itemConfig.ItemCount];
- return SetSpecialValue(entity, ref _itemIndex, ref this._ItemIndex);
- }
- public override bool SetItemValue(TEntity entity, TEntity lastentity)
- {
- if (this._ItemIndex == null)
- {
- this._ItemIndex = new int[this._itemConfig.ItemCount];
- }
- _itemIndex = new int[this._itemConfig.ItemCount];
- return SetSpecialValue(entity, ref _itemIndex, ref this._ItemIndex);
- }
- public override string GetFomartString(string fomart, ChartCssConfigInfo cssConfig = null)
- {
- var html = GetFomartHTML(fomart, cssConfig);
- var sp = new StringBuilder((html.Item1.Length + 40) * this._itemConfig.ItemCount);
- switch (this._itemConfig.FuntionType)
- {
- case ChartItemType.SpecialValue_FCSSQ_ChuHaoPL:
- sp.Append(CssValueFunction.SpecialValue_FCSSQ_ChuHaoPL(this._LocalEntity, this._itemConfig, this._cssConfig, this._ItemIndex, html.Item1));
- break;
- case ChartItemType.SpecialValue_TCDLT_ChuHaoPL:
- sp.Append(CssValueFunction.SpecialValue_TCDLT_ChuHaoPL(this._LocalEntity, this._itemConfig, this._cssConfig, this._ItemIndex, html.Item1));
- break;
- default:
- for (int i = 0; i < this._itemConfig.ItemCount; i++)
- {
- sp.Append(GetHtml(true, html.Item1, "", this._ItemIndex[i].ToString(), i));
- }
- break;
- }
- return sp.ToString();
- }
- }
- }
|