public void CleanChildren() { for (int i = CollectionWj1090.Count - 1; i > -1; i--) { CollectionWj1090.RemoveAt(i); } }
public void UpdateNoUsedShow() { //foreach (var t in lst) //{ // if(NodeId==t.Item1) // { if (CollectionWj1090.Count > 0) { CollectionWj1090.Clear(); } ThisNodeAddPartsNode(); GetNoUsedCount(); // } //} }
public override void OnNodeSelectActive() { if (CollectionWj1090.Count > 0) { CollectionWj1090.Clear(); } ThisNodeAddPartsNode(); IsExpanded = true; CurrentSelectNode = this; var args = new PublishEventArgs { EventType = PublishEventType.Core, EventId = Sr.EquipmentInfoHolding.Services.EventIdAssign.EquipmentSelected, }; args.AddParams(NodeId); EventPublisher.EventPublish(args); }
private void ThisNodeAddPartsNode() { var info = Sr.EquipmentInfoHolding.Services.ServicesEquipemntInfoHold.GetEquipmentInfo(this.NodeId); if (info == null) { return; } var lines = info as Wlst.Cr.WjEquipmentBaseModels.TerminalInfomationInterface.IILduConcentrator; if (lines == null) { return; } if (lines.LduLines == null) { return; } var errors = Wlst.Sr.EquipemntLightFault.Services.TmlExistFaultsInfoServices.GetLstInfoByRtuId(this.NodeId); var lineerrs = new List <Tuple <int, int> >(); foreach (var t in errors) { var errorinfo = Wlst.Sr.EquipemntLightFault.Services.TmlExistFaultsInfoServices.GetShowInfoById(t); if (errorinfo == null) { continue; } if (Wlst.Sr.EquipemntLightFault.Services.TmlExistFaultsInfoServices.InfoDictionary.ContainsKey(t)) { var infogggg = Wlst.Sr.EquipemntLightFault.Services.TmlExistFaultsInfoServices.InfoDictionary[t]; lineerrs.Add(new Tuple <int, int>(infogggg.LoopId, infogggg.FaultCodeId)); //41 被盗 42 短路 } } foreach (var t in lines.LduLines) { var str = ""; var strForeGround = "Black"; if (t.IsUsed) { strForeGround = "Black"; if (lineerrs.Contains(new Tuple <int, int>(t.LduLineID, 42))) { str = " -短路"; strForeGround = "Red"; } if (lineerrs.Contains(new Tuple <int, int>(t.LduLineID, 41))) { str = " -被盗"; strForeGround = "Red"; } } var infos = new TreeNodeLineViewModel(t.LduLineName + str, t.LduLineID, t.IsUsed, this.NodeId); infos.ForeGround = strForeGround; CollectionWj1090.Add(infos); } }