Beispiel #1
0
        private void WorkerUpdater(object cState)
        {
            int          nErrIndx = int.MaxValue;
            Roll         cRollMid;
            List <Bytes> aBytesMid;

            while (!_bStopped)
            {
                try
                {
                    if (null == _aBytesMidUpdated && DateTime.Now > _dtMidNextUpdate)
                    {
                        if (_cPreferences.PollUpdate())
                        {
                            cRollMid = _cPreferences.cPoll.NewRollMidGet();
                            cRollMid.Prepare(23);
                            aBytesMid = cRollMid.PreRenderedFramesGet();
                            cRollMid.ClearPreRenderedQueue();
                            cRollMid.PreRenderedFramesRegistrationsMoveTo(_cRollMid, aBytesMid);
                            lock (_oLockUpdater)
                            {
                                _aBytesMidUpdated = aBytesMid;
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    if (nErrIndx++ > 40)
                    {
                        (new Logger()).WriteError(ex);
                        nErrIndx = 0;
                    }
                }
            }
Beispiel #2
0
        public void Start()
        {
            eStatus = BTL.EffectStatus.Running;
            _cPLMatTop.Start();
            _cPLMatBottom.Start();
            _cPLMatMiddle.Start();

            _cPreferences.PollUpdate();

            //DNF
            //System.Threading.Thread _cThreadFramesGettingWorker;
            //_cThreadFramesGettingWorker = new System.Threading.Thread(FramesGettingWorker);
            //_cThreadFramesGettingWorker.IsBackground = true;
            //_cThreadFramesGettingWorker.Priority = System.Threading.ThreadPriority.Normal;
            //_cThreadFramesGettingWorker.Start();



            if (null != Started)
            {
                Plugin.EventSend(Started, this);
            }
        }