public void Process(SlagBlowingEvent _event) { try { this._Module._Heat.SlagBlowingHistory.Add( _event); } catch { } }
private bool DoSlagBlowingEvent(int iIdxInPointLi) { bool bErg = false; try { SlagBlowingEvent evSlagBlowing = new SlagBlowingEvent(); evSlagBlowing.iCnvNr = pointLi[iIdxInPointLi].iCnvNr; j = findPoint("NVOLSLAGBLOW",pointLi[iIdxInPointLi].iCnvNr); if (j >= 0) { evSlagBlowing.NVol = pointLi[j].iDataValue; j = findPoint("SLAGBLOWING",pointLi[iIdxInPointLi].iCnvNr); if (j >= 0) { evSlagBlowing.SlagBlowingFlag = pointLi[j].iDataValue; sLfdEvtMsg = evSlagBlowing.ToString(); mainGate.PushEvent(evSlagBlowing); AddLogg(evSlagBlowing.ToString()); bErg = true; } else { AddLogg("При SlagBlowingEvent не найдена точка K" + pointLi[iIdxInPointLi].iCnvNr + " SLAGBLOWING"); } } else { AddLogg("При SlagBlowingEvent не найдена точка K" + pointLi[iIdxInPointLi].iCnvNr + " NVOLSLAGBLOW"); } } catch (Exception eXc) { sLfdEvtErr = eXc.Message; AddLogg("При SlagBlowingEvent K" + pointLi[iIdxInPointLi].iCnvNr + " Exception: " + eXc.Message); } return bErg; }
private bool ProcessEvent(SlagBlowingEvent _event) { // Начало раздувки шлака if (_event.SlagBlowingFlag == 1 && !Repositary.ContainsKey("SlagBlowing")) { try { DBWorker.Instance.Insert((int)HeatPassportOperations.SlagBlowingEvent, _event.Time, m_ConverterNumber, HeatNumber, _event.SlagBlowingFlag, _event.NVol); Repositary.Add("SlagBlowing", true); } catch { return false; } } // Конец раздувки шлака if (_event.SlagBlowingFlag == 0 && Repositary.ContainsKey("SlagBlowing")) { try { DBWorker.Instance.Insert((int)HeatPassportOperations.SlagBlowingEvent, _event.Time, m_ConverterNumber, HeatNumber, _event.SlagBlowingFlag, _event.NVol); Repositary.Remove("SlagBlowing"); } catch { return false; } } return true; }