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 AddSubNodesForTypes(ResourceTreeNodeExt node, ResourceViewManager.ResourceNameList resources)
        {
            ResourceMaps.IntMap map = new ResourceMaps.IntMap();
            foreach (NamedPackedFileDescriptor pfd in resources)
            {
                ResourceViewManager.ResourceNameList list;
                if (!map.ContainsKey(pfd.Descriptor.Type))
                {
                    list = new ResourceViewManager.ResourceNameList();
                    map.Add(pfd.Descriptor.Type, list);
                }
                else
                {
                    list = map[pfd.Descriptor.Type];
                }

                list.Add(pfd);
            }

            ResourceTreeNodesByType.AddType(map, node);
        }