public void Construct(Parameters parameters) { m_parameters = parameters; m_realTimeState = new ChartState(m_parameters, m_realTimeQuotes); m_currentState = m_realTimeState; m_settings = ChartSettingsManager.GetSettings(parameters.Symbol); m_realTimeQuotes.Interval = m_settings.Duration; m_parameters.SetHeight(m_settings.Height); m_spreads.Height = (int)(m_settings.Height - cTopOffset - cBottomOffset); m_timer.Interval = m_settings.UpdateInterval; m_proxy = new DataFeed(parameters.This, parameters.Func2); m_proxy.Tick += OnTick; }
private void Destroy() { DataFeed proxy = m_proxy; m_proxy = null; if (null != proxy) { proxy.Tick -= OnTick; proxy.Dispose(); } }