示例#1
0
 private void OnSecurityListCompleted(object sender, Eventos.Lib.ControlEvents.SecurityListCompletedEventArgs args)
 {
     mktRecvProc.Start();
     mktIncrProc.Start();
     Thread.Sleep(100);
     shouldMonitor = true;
 }
示例#2
0
        private void iniciaCanal()
        {
            if (!channelConfig.IsNewsChannel)
            {
                secListProc = new SecurityListProcessor(channelState, channelConfig, monitorConfig);
                channelState.SecListProc             = secListProc;
                secListProc.OnSecurityListCompleted += new SecurityListProcessor.OnSecurityListCompletedHandler(OnSecurityListCompleted);

                mktRecvProc = new MarketRecoveryProcessor(channelState, channelConfig, monitorConfig);
                mktRecvProc.OnRecoveryStarted   += new MarketRecoveryProcessor.OnRecoveryStartedHandler(OnRecoveryStarted);
                mktRecvProc.OnRecoveryCompleted += new MarketRecoveryProcessor.OnRecoveryCompletedHandler(OnRecoveryCompleted);
                channelState.MktRecvProc         = mktRecvProc;

                mktIncrProc = new MarketIncrementalProcessor(channelState, channelConfig, monitorConfig);
                channelState.MktIncrProc = mktIncrProc;

                secListProc.Start();
            }
            else
            {
                mktIncrProc = new MarketIncrementalProcessor(channelState, channelConfig, monitorConfig);
                channelState.MktIncrProc = mktIncrProc;

                mktIncrProc.Start();

                Thread.Sleep(200);

                mktIncrProc.StartPacketProcessing(0);
            }
        }