コード例 #1
0
 public void OnCurrentEcuChanged(IEcuProgrammingInfo ecu)
 {
     if (this.ProgrammingEventRaised != null)
     {
         this.ProgrammingEventRaised(this, new ProgrammingCurrentEcuChangedEventArgs(DateTime.Now, ecu));
     }
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 public ProgrammingCurrentEcuChangedEventArgs(DateTime timestamp, IEcuProgrammingInfo ecuProgrammingInfo) : base(timestamp)
 {
     this.EcuProgrammingInfo = ecuProgrammingInfo;
 }