Exemple #1
0
        public ResourceTreeViewExt()
        {
            allowselectevent = true;
            InitializeComponent();

            typebuilder  = new ResourceTreeNodesByType();
            groupbuilder = new ResourceTreeNodesByGroup();
            instbuilder  = new ResourceTreeNodesByInstance();

            SimPe.ThemeManager.Global.AddControl(this.toolStrip1);
            builder        = typebuilder;
            tbType.Checked = true;
            last           = null;
        }
Exemple #2
0
        public static void AddSubNodesForInstances(ResourceTreeNodeExt node, ResourceViewManager.ResourceNameList resources)
        {
            ResourceMaps.LongMap map = new ResourceMaps.LongMap();
            foreach (NamedPackedFileDescriptor pfd in resources)
            {
                ResourceViewManager.ResourceNameList list;
                if (!map.ContainsKey(pfd.Descriptor.LongInstance))
                {
                    list = new ResourceViewManager.ResourceNameList();
                    map.Add(pfd.Descriptor.LongInstance, list);
                }
                else
                {
                    list = map[pfd.Descriptor.LongInstance];
                }

                list.Add(pfd);
            }

            ResourceTreeNodesByInstance.AddInstances(map, node, false, false);
        }