Ejemplo n.º 1
0
        public void SetUp(List <VariableViewerNetworking.NetFriendlyHierarchyBookShelf> CompressedHierarchy)
        {
            Roots.Clear();
            IDtoBookShelves.Clear();
            THisCompressedHierarchy.Clear();
            THisCompressedHierarchy.AddRange(CompressedHierarchy);
            //Logger.Log("CompressedHierarchy Count > " + CompressedHierarchy.Count);
            foreach (var Compressed in CompressedHierarchy)
            {
                IDtoBookShelves[Compressed.ID] = Compressed;
            }

            foreach (var Compressed in CompressedHierarchy)
            {
                if (Compressed.PID == 0)
                {
                    Roots.Add(Compressed);
                }
                else
                {
                    Compressed.SetParent(IDtoBookShelves[Compressed.PID]);
                    IDtoBookShelves[Compressed.PID].GetChildrenList().Add(Compressed);
                }
            }



            Refresh();
        }