示例#1
0
        public void Execute(IJobExecutionContext context)
        {
            lock (m_obj)
            {
                JobDataMap data = context.JobDetail.JobDataMap;
                string     sn   = data.GetString("SpotInspectionJob_SN");
                _dataAcquisition = data.Get("Sender") as DataAcquisition;
                _sn = sn;

                var screenInfo = _dataAcquisition.ScreenInfos.Find(l => l.LedSN == sn);
                if (_dataAcquisition.MonitorDataReader == null || !_dataAcquisition.DetectConfigParamList.Keys.Contains(sn))
                {
                    return;
                }
                _dataAcquisition.MonitorDataReader.DetectPointCompletedEvent -= DetectPointCompleted;
                _dataAcquisition.MonitorDataReader.DetectPointCompletedEvent += DetectPointCompleted;
                _dataAcquisition.MonitorDataReader.DetectPoint(screenInfo.Commport, screenInfo.LedInfo as ILEDDisplayInfo, _dataAcquisition.DetectConfigParamList[sn], sn);
            }
        }
        public void Execute(IJobExecutionContext context)
        {
            lock (m_obj)
            {
                JobDataMap data = context.JobDetail.JobDataMap;
                string sn = data.GetString("SpotInspectionJob_SN");
                _dataAcquisition = data.Get("Sender") as DataAcquisition;
                _sn = sn;

                var screenInfo = _dataAcquisition.ScreenInfos.Find(l => l.LedSN == sn);
                if (_dataAcquisition.MonitorDataReader == null || !_dataAcquisition.DetectConfigParamList.Keys.Contains(sn))
                {
                    return;
                }
                _dataAcquisition.MonitorDataReader.DetectPointCompletedEvent -= DetectPointCompleted;
                _dataAcquisition.MonitorDataReader.DetectPointCompletedEvent += DetectPointCompleted;
                _dataAcquisition.MonitorDataReader.DetectPoint(screenInfo.Commport, screenInfo.LedInfo as ILEDDisplayInfo, _dataAcquisition.DetectConfigParamList[sn], sn);
            }
        }