コード例 #1
0
        public void Construct(Parameters parameters)
        {
            m_parameters    = parameters;
            m_realTimeState = new ChartState(m_parameters, m_realTimeQuotes);
            m_historyState  = new ChartState(m_parameters, m_historyQuotes);

            m_currentState = m_realTimeState;

            m_settings = ChartSettingsManager.GetSettings(parameters.Symbol);
            m_realTimeQuotes.Interval = m_settings.Duration;
            m_historyQuotes.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 DataFeedProxy(parameters.Symbol);
            m_proxy.Tick    += OnTick;
            if (m_proxy.IsInitialized)
            {
                m_help.Visible = false;
            }
            else
            {
                m_spreads.Visible = false;
            }
        }
コード例 #2
0
        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;
        }
コード例 #3
0
 private void OnOptions(object sender, EventArgs e)
 {
     try
     {
         ChartSettings       oldSettings = new ChartSettings(m_settings);
         ChartSettingsDialog dialog      = new ChartSettingsDialog(this);
         DialogResult        result      = dialog.ShowDialog();
         if (DialogResult.Cancel == result)
         {
             m_settings = oldSettings;
         }
         else if (DialogResult.Yes == result)
         {
             ChartSettingsManager.Save(m_parameters.Symbol, m_settings);
         }
     }
     catch (System.Exception ex)
     {
         MessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }