internal void SetSvkTargetForEachEcu(ISvt svt) { if (svt == null) { foreach (EcuProgrammingInfo ecuProgrammingInfo in this.ecuProgrammingInfos) { ecuProgrammingInfo.SvkTarget = null; } return; } foreach (IEcuObj ecuObj in svt.Ecus) { EcuProgrammingInfo ecuProgrammingInfo2 = this.GetItemFromProgrammingInfos((long)ecuObj.EcuIdentifier.DiagAddrAsInt); if (ecuProgrammingInfo2 != null) { ecuProgrammingInfo2.SvkTarget = ecuObj.StandardSvk; } else { ECU ecu = this.programmingObjectBuilder.Build(ecuObj); if (ecu != null) { ecuProgrammingInfo2 = this.GetEcuProgrammingInfo(ecu); ecuProgrammingInfo2.SvkTarget = ecuObj.StandardSvk; } } } }
private void UpdateProgrammingInfo(ISvt svt) { foreach (IEcuObj ecuObj in svt.Ecus) { EcuProgrammingInfo itemFromProgrammingInfos = this.GetItemFromProgrammingInfos((long)ecuObj.EcuIdentifier.DiagAddrAsInt); if (itemFromProgrammingInfos != null) { if (ecuObj.BnTnName == null && itemFromProgrammingInfos.Ecu.ProgrammingVariantName != null) { #if false Log.Info("EcuProgrammingInfos.SetSvkCurrentForEachEcu()", "Do not replace \"{0}\" with null for ECU: {1}.", new object[] { itemFromProgrammingInfos.Ecu.ProgrammingVariantName, itemFromProgrammingInfos.Ecu.LogEcu() }); #endif } else { itemFromProgrammingInfos.Ecu.ProgrammingVariantName = ecuObj.BnTnName; } itemFromProgrammingInfos.Ecu.StatusInfo = ecuObj.EcuStatusInfo; itemFromProgrammingInfos.SvkCurrent = ecuObj.StandardSvk; } } }
internal void SetSvkCurrentForEachEcu(ISvt svt) { if (svt == null) { this.SetSvkCurrentToNull(); return; } this.UpdateProgrammingInfo(svt); this.RefreshProgrammingInfoBeforeReplace(this.DataContext.List.ToList <IEcuProgrammingInfoData>()); }
public IPsdzSvt BuildSvt(ISvt svtInput, string vin17) { if (svtInput == null) { return(null); } return(new PsdzSvt { Vin = vin17, Version = svtInput.Version, HoSignature = svtInput.HoSignature, HoSignatureDate = svtInput.HoSignatureDate, Ecus = ((svtInput.Ecus != null) ? svtInput.Ecus.Select(new Func <IEcuObj, IPsdzEcu>(this.CreateEcu)) : Enumerable.Empty <IPsdzEcu>()), IsValid = true }); }