public override IList <ModelTreeNode> CreateTree()
        {
            var nodes = new List <ModelTreeNode>(1);
            var item  = new NpcShop();
            var node  = new NpcShopTreeNode(item);

            nodes.Add(node);

            return(nodes);
        }
예제 #2
0
        public NpcShopTreeNode(NpcShop model) : this()
        {
            Model = model;

            var commandsNode = new CommandsContainerTreeNode();
            var itemsNode    = new ItemsContainerTreeNode();

            //NpcShopCommandsContainerNode.Model = model.ShopCommands;
            //NpcShopItemsContainerNode.Model = model.ShopItems;
            Nodes.Add(commandsNode);
            Nodes.Add(itemsNode);

            commandsNode.AddChildModels(model.ShopCommands.Cast <IModel>().ToList());
            itemsNode.AddChildModels(model.ShopItems.Cast <IModel>().ToList());
        }
        public override ModelTreeNode CreateDefaultItem()
        {
            var item = new NpcShop();

            return(new NpcShopTreeNode(item));
        }