public void OnCurrentEcuChanged(IEcuProgrammingInfo ecu) { if (this.ProgrammingEventRaised != null) { this.ProgrammingEventRaised(this, new ProgrammingCurrentEcuChangedEventArgs(DateTime.Now, ecu)); } }
public VehicleProgrammingEventHandler(EcuProgrammingInfos ecuProgrammingInfos, PsdzContext psdzContext, bool ecusSeveralTimesPossible = false) { this.psdzContext = psdzContext; this.diagAddrToEcuMap = new Dictionary <long, EcuProgrammingInfo>(); if (!ecusSeveralTimesPossible) { using (IEnumerator <IEcuProgrammingInfo> enumerator = ecuProgrammingInfos.GetEnumerator()) { while (enumerator.MoveNext()) { IEcuProgrammingInfo ecuProgrammingInfo = enumerator.Current; EcuProgrammingInfo ecuProgrammingInfo2 = (EcuProgrammingInfo)ecuProgrammingInfo; if (!this.diagAddrToEcuMap.ContainsKey(ecuProgrammingInfo2.Ecu.ID_SG_ADR)) { this.diagAddrToEcuMap.Add(ecuProgrammingInfo2.Ecu.ID_SG_ADR, ecuProgrammingInfo2); } } return; } } this.FillEcusIfSeveralTimesPossible(ecuProgrammingInfos); }
public ProgrammingCurrentEcuChangedEventArgs(DateTime timestamp, IEcuProgrammingInfo ecuProgrammingInfo) : base(timestamp) { this.EcuProgrammingInfo = ecuProgrammingInfo; }