Пример #1
0
        static void Main(string[] args)
        { 
            var actualSkin = SkinsMaker();
            AudioPlayer audio = new AudioPlayer(); 
            PlayerProperties prop = new PlayerProperties();
            Visualizer visualizer = new Visualizer(actualSkin, audio, prop);

            List<Song> songs = new List<Song>();
            UploadSongs(songs);
            foreach (Song song in songs)
            {
                audio.UploadItems(song);    
            }
            audio.ShuffleItems();
            for (int i = 0; i < songs.Count; i++)
            {
                audio.Play(i);
                Thread.Sleep(1000);
            }
            //audio.SaveAs();
            audio.PlayNext();
            audio.SortItems();
            //audio.Load();
            audio.Clear();
            Console.ReadKey();
        }
Пример #2
0
 public Visualizer(ISkin actualSkin, AudioPlayer player, PlayerProperties properties)
 {
     this.actualSkin                  = actualSkin;
     this.player                      = player;
     this.properties                  = properties;
     player.actualSkin                = this.actualSkin;
     player.properties                = this.properties;
     player.playerStarted            += Messenger;
     player.songListChanged          += Messenger;
     player.songStarted              += Messenger;
     player.properties.playerLocked  += Messenger;
     player.properties.volumeChanged += Messenger;
 }