Exemplo n.º 1
0
        /// <summary>
        /// Adds a PiggLeaf object to the tree at the specified path.
        /// </summary>
        /// <param name="Leaf">Leaf to add to the PiggNode tree.</param>
        /// <param name="Path">Path to the PiggNode object to which the PiggLeaf
        /// should be added.</param>
        /// <returns>The PiggLeaf object added.</returns>
        public PiggLeaf AddLeaf(PiggLeaf Leaf, string Path)
        {
            PiggNode parent = this.AddPath(Path);

            return(parent.AddLeaf(Leaf));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Adds a PiggLeaf object to the tree.
 /// </summary>
 /// <param name="Leaf">Leaf to add to the PiggNode tree.</param>
 /// <remarks>If you try to add two files with the same name, only the
 /// second one will be set and the first one tossed.  Name collisions
 /// might be an error, but I'm not sure, so for now, I'll give it the
 /// benefit of a doubt and assume that they're legal.</remarks>
 /// <returns>The PiggLeaf object added.</returns>
 public PiggLeaf AddLeaf(PiggLeaf Leaf)
 {
     Leaf.Parent             = this;
     this.LeafMap[Leaf.Name] = Leaf;
     return(this.LeafMap[Leaf.Name]);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initialize an instance of a PiggOgg object.
 /// </summary>
 /// <param name="Leaf">PiggLeaf object to use as the source for the Ogg
 /// stream.</param>
 /// <param name="SoundFile"></param>
 public PiggOgg(PiggLeaf Leaf, byte[] SoundFile)
 {
     m_leaf       = Leaf;
     m_sound_file = SoundFile;
     m_duration   = 0;
 }
Exemplo n.º 4
0
 private void Initialize(PiggLeaf Leaf, byte[] SoundFile)
 {
     m_leaf       = Leaf;
     m_sound_file = SoundFile;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Initialize an instance of a PiggOgg object.
 /// </summary>
 /// <param name="Leaf">PiggLeaf object to use as the source for the Ogg
 /// stream.</param>
 public PiggOgg(PiggLeaf Leaf)
 {
     Initialize(Leaf, null);
 }