private void Update() { Indices.Clear(); LoadedInstanceIds.Clear(); LoadedGroupIds.Clear(); LoadedFileTypeIds.Clear(); foreach (DatabasePackedFile packed in PackageFiles) { Indices.AddRange(packed.Indices); } foreach (DatabaseIndex index in Indices) { if (!LoadedInstanceIds.Contains(index.InstanceId)) { LoadedInstanceIds.Add(index.InstanceId); } if (!LoadedGroupIds.Contains(index.GroupId)) { LoadedGroupIds.Add(index.GroupId); } if (!LoadedFileTypeIds.Contains(index.TypeId)) { LoadedFileTypeIds.Add(index.TypeId); } } Indices.Changed(); PackageFiles.Changed(); }
private void InstanceRegistryChanged(object sender, TGIRecord record) { foreach (DatabaseIndex i in Indices) { if (record.Id == i.InstanceId) { i.InstanceName = record.DisplayName; } } Indices.Changed(); }