Beispiel #1
0
        /// <summary>
        /// 创建行情数据处理器。
        /// </summary>
        private void CreateMarketDataProcessor()
        {
            try
            {
                TimeSpan dayKLinePublishInterval = TimeSpan.Parse(ConfigurationManager.AppSettings["DayKLinePublishInterval"]);
                if (dayKLinePublishInterval < TimeSpan.Zero)
                {
                    throw new ApplicationException("非法的日线发布间隔");
                }

                KLineProcessor processor = new KLineProcessor(dayKLinePublishInterval);
                processor.Notify += OnNotifyEventArrived;
                m_kLineProcessor  = processor;

                string text = String.Format("{0} Create {1} OK.", this, processor);
                m_eventLogger.WriteInformation(text);
            }
            catch (Exception ex)
            {
                string text = "Create MarketDataReceiver object failed, " + ex.Message;
                throw new ApplicationException(text, ex);
            }
        }
Beispiel #2
0
        private void ShowMarketDataProcessorInfo()
        {
            KLineProcessor processor = USeManager.Instance.MarketDataProcessor;

            this.lblProcessor_ProcessCount.Text = processor.ProcessCount.ToString();
        }