Exemplo n.º 1
0
        /// <summary>
        /// Adds a playlist to this.
        /// </summary>
        public static void Add(string filepath)
        {
            JPla playlist = XMLSerializer.Deserialize <JPla>(filepath, ".JPLA");

            playlist.OnVolumeChanged += new VolumeChanged(OnVolumeChanged);

            playlists.Add(playlist);
        }
Exemplo n.º 2
0
        static void OnVolumeChanged(JPla playlist)
        {
            playlist.UseGlobalVolume = true;

            string[] keys = new string[playlist.Music.Keys.Count];
            playlist.Music.Keys.CopyTo(keys, 0);

            for (int i = 0; i < keys.Count(); i++)
            {
                for (int j = 0; j < currentlyPlaying.Count; j++)
                {
                    if (keys[i] == currentlyPlaying[j].Name)
                    {
                        currentlyPlaying[j].Volume = playlist.GlobalVolume;
                    }
                }
            }
        }