示例#1
0
 /// <summary>
 /// 追加节点
 /// </summary>
 /// <param name="Node">节点</param>
 public void Add(FCYResPackageNode Node)
 {
     if (Contains(Node.Name))
     {
         throw new FCYExcpNameErr("Name exsited.");
     }
     if (FCYResPackageDataNode.CheckName(Node.Name) == false)
     {
         throw new FCYExcpNameErr("Invalid Name.");
     }
     else
     {
         NodeList.Add(Node);
     }
 }
示例#2
0
 /// <summary>
 /// 追加节点
 /// </summary>
 /// <param name="Node">节点</param>
 public void Add(FCYResPackageNode Node)
 {
     if (Contains(Node.Name))
         throw new FCYExcpNameErr("Name exsited.");
     if (FCYResPackageDataNode.CheckName(Node.Name) == false)
         throw new FCYExcpNameErr("Invalid Name.");
     else
         NodeList.Add(Node);
 }
示例#3
0
        // --- 打开 ---
        private TreeNode readNodes(FCYResPackageNode Node)
        {
            TreeNode tRet = new TreeNode(Node.Name);
            tRet.Tag = Node;

            if (Node.IsFloder())
            {
                tRet.ImageIndex = 0;
                tRet.SelectedImageIndex = 0;

                foreach(FCYResPackageNode SubNode in ((FCYResPackageFloderNode)Node).NodeList)
                {
                    tRet.Nodes.Add(readNodes(SubNode));
                }
            }
            else
            {
                tRet.ImageIndex = 1;
                tRet.SelectedImageIndex = 1;
            }

            return tRet;
        }