public override void Dispose() { if (IsStarted) { StopSeries(); } _drawTimer.Flush(); _timer.Flush(); }
public void Draw(CandleSeries series, IEnumerable <Candle> candles) { if (series == null) { throw new ArgumentNullException("series"); } if (candles == null) { throw new ArgumentNullException("candles"); } Series = series; _candles = candles; _candlesCount = 0; var ohlcArea = new ChartArea { Height = 210 }; ChartPanel.AddArea(ohlcArea); _candlesElem = new ChartCandleElement(); ChartPanel.AddElement(ohlcArea, _candlesElem, series); var volumeArea = new ChartArea { Height = 130 }; ChartPanel.AddArea(volumeArea); _volumeElem = new ChartIndicatorElement { IndicatorPainter = new VolumePainter(), }; var indicator = new VolumeIndicator(); _indicators.Add(_volumeElem, indicator); ChartPanel.AddElement(volumeArea, _volumeElem, series, indicator); CancelButton.Visibility = Visibility.Visible; _drawTimer.Flush(); }
void IDisposable.Dispose() { _timer.Flush(); }