Exemplo n.º 1
0
        /// <summary>
        /// Adds an music element to the specified location (only used to restore old music data)
        /// </summary>
        /// <param name="musicPath">The path to the music track</param>
        public void AddMusicElement(string musicPath, double startTime, double endTime)
        {
            TimelineMusicElementControl element    = new TimelineMusicElementControl(this, startTime, endTime, musicPath);
            TlMusikElementEnde          endElement = new TlMusikElementEnde(this, element);

            MusicElements.Add(element);
            EndElements.Add(endElement);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Adds an music element to the next possible part of the slideshow (concating all audios together)
        /// </summary>
        /// <param name="musicPath">The path to the music track</param>
        public void AddMusicElement(string musicPath)
        {
            TagLib.File file = TagLib.File.Create(musicPath);

            TimelineMusicElementControl element = new TimelineMusicElementControl(this, GetLastMusicElementEndtime(), GetLastMusicElementEndtime() + Convert.ToDouble(file.Properties.Duration.TotalMilliseconds / 10), musicPath);
            TlMusikElementEnde          Ende    = new TlMusikElementEnde(this, element);

            MusicElements.Add(element);
            EndElements.Add(Ende);
        }