private void InitChart(ChartPanel chartPanel, IDataSeries dataSeries) { this.chartPanel = chartPanel; this.chartPanel.Dock = DockStyle.Fill; foreach (Component component in (ArrangedElementCollection)this.tabChart.Controls) { component.Dispose(); } this.tabChart.Controls.Clear(); this.tabChart.Controls.Add((Control)chartPanel); this.chartPanel.Init(dataSeries); if (this.chartPanel.ChartControl == null) { return; } this.chartPanel.ChartControl.LabelDigitsCount = PriceFormatHelper.GetDecimalPlaces(this.instrument); }
private void InitChart(ChartPanel chartPanel, IDataSeries dataSeries) { this.chartPanel = chartPanel; this.chartPanel.Dock = DockStyle.Fill; foreach (Component component in (ArrangedElementCollection) this.tabChart.Controls) component.Dispose(); this.tabChart.Controls.Clear(); this.tabChart.Controls.Add((Control) chartPanel); this.chartPanel.Init(dataSeries); if (this.chartPanel.ChartControl == null) return; this.chartPanel.ChartControl.LabelDigitsCount = PriceFormatHelper.GetDecimalPlaces(this.instrument); }