private bool AddS88(IBlock block) { if (block == null) { return(false); } foreach (var e in block.ListEntries) { if (e == null) { continue; } string sid = $"{e.ObjectId}"; if (sid.StartsWith("10", StringComparison.OrdinalIgnoreCase)) { int n = _objects.Count(x => x is S88); var s88 = GetObjectBy(e.ObjectId) as S88; if (s88 == null) { s88 = new S88 { ObjectId = e.ObjectId, Index = n }; s88.Parse(e.Arguments); s88.CommandsReady += CommandsReady; _objects.Add(s88); DataChanged?.Invoke(this); s88.EnableView(); } else { s88.Parse(e.Arguments); s88.CommandsReady -= CommandsReady; s88.CommandsReady += CommandsReady; if (!s88.HasView) { s88.EnableView(); } DataChanged?.Invoke(this); } } } return(true); }