예제 #1
0
        internal static AbstractPlot Create(GdiEngine engine, ZChart chart, object source, ChartSetting chartSetting)
        {
            AbstractPlot cPlot      = null;
            EChartType   cChartType = chartSetting.ChartType;

            switch (cChartType)
            {
            case EChartType.Candlestick:
                cPlot = new PlotCandlestick(engine, source, chartSetting);
                break;

            case EChartType.HLC:
                cPlot = new PlotHlc(engine, source, chartSetting);
                break;

            case EChartType.OHLC:
                cPlot = new PlotOhlc(engine, source, chartSetting);
                break;

            case EChartType.ClosingLine:
                cPlot = new PlotClosingLine(engine, source, chartSetting);
                break;

            case EChartType.TextObject:
                cPlot = new PlotTextObject(engine, chart, source, chartSetting);
                break;

            case EChartType.TradeObject:
                cPlot = new PlotTradeObject(engine, source, chartSetting);
                break;
            }
            return(cPlot);
        }
예제 #2
0
        internal Line(GdiEngine engine)
        {
            __cGDI    = engine.GDI;
            __cEngine = engine;

            __cLineInfos = new List <_LineInfo>(2);
        }
예제 #3
0
        internal Cross(GdiEngine engine)
        {
            __cGDI    = engine.GDI;
            __cEngine = engine;

            __cLineInfos = new List <_LineInfo>(2);
            __cTextInfos = new List <_TextInfo>(2);
        }
예제 #4
0
        internal PlotTextObject(GdiEngine engine, ZChart chart, object source, ChartSetting chartSetting)
            : base(engine, chartSetting)
        {
            __cGDI         = engine.GDI;
            __cTextObjects = source as TextContainer;
            __cTextObjects.SetChartProperty(chart.ChartProperty);

            __cLayers  = new List <Layer>(8);
            __cObjects = new Dictionary <int, Queue <TextObject> >(8);
            __cLayers  = chart.Layers;
        }
예제 #5
0
 internal PlotOhlc(GdiEngine engine, object source, ChartSetting chartSetting)
     : base(engine, chartSetting)
 {
     __cGDI  = engine.GDI;
     __cBars = source as Instrument;
 }
예제 #6
0
 internal PlotTradeObject(GdiEngine engine, object source, ChartSetting chartSetting)
     : base(engine, chartSetting)
 {
     __cGDI    = engine.GDI;
     __cTrades = source as TradeContainer;
 }