Beispiel #1
0
        private object DoNode(TreeNode node)
        {
            if (node.Tag == null)
            {
                var cat = new GenericNode(node.Text);

                foreach (TreeNode child in node.Nodes)
                {
                    cat.Elements.Add(DoNode(child));
                }

                return(cat);
            }
            var snd = new UOSound(node.Text, (int)node.Tag);

            return(snd);
        }
Beispiel #2
0
        private TreeNode GetNode(GenericNode gNode)
        {
            TreeNode node = new TreeNode(gNode.Name);

            foreach (object o in gNode.Elements)
            {
                GenericNode child = o as GenericNode;
                UOSound     item  = o as UOSound;

                if (child != null)
                {
                    node.Nodes.Add(GetNode(child));
                }
                else if (item != null)
                {
                    TreeNode itemNode = new TreeNode(item.Name);
                    itemNode.Tag = item.Index;
                    node.Nodes.Add(itemNode);
                }
            }

            return(node);
        }
Beispiel #3
0
		private object DoNode( TreeNode node )
		{
			if ( node.Tag == null )
			{
				GenericNode cat = new GenericNode( node.Text );

				foreach ( TreeNode child in node.Nodes )
				{
					cat.Elements.Add( DoNode ( child ) );
				}

				return cat;
			}
			else
			{
				UOSound snd = new UOSound( node.Text, (int) node.Tag );

				return snd;
			}
		}