コード例 #1
0
ファイル: ProgrammingService.cs プロジェクト: rs38/ediabaslib
 public void AddListener(PsdzContext psdzContext)
 {
     RemoveListener();
     this.PsdzProgressListener = new PsdzProgressListener(this.EventManager);
     this.psdz.AddPsdzProgressListener(this.PsdzProgressListener);
     this.VehicleProgrammingEventHandler = new VehicleProgrammingEventHandler(ProgrammingInfos, psdzContext);
     this.psdz.AddPsdzEventListener(this.VehicleProgrammingEventHandler);
 }
コード例 #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);
 }