Esempio n. 1
0
 public Facade(string path = @"D:\Music\Egypt Central - Discography\2008 - Egypt Central")
 {
     playlist  = new Playlist(path);
     iterator  = playlist.CreateIterator();
     singleton = SoundSingleton.GetInstance();
     command   = new PlayerCommand(singleton);
 }
Esempio n. 2
0
 public void Play()
 {
     if (singleton.SoundWaveOut.PlaybackState == PlaybackState.Paused)
     {
         command.Play();
     }
     else if (singleton.SoundWaveOut.PlaybackState == PlaybackState.Playing)
     {
         command.Pause();
     }
     else
     {
         SoundSingleton.GetInstance().StopWaveOut();
         if (File.Exists(iterator.CurrentItem().Path))
         {
             command.Init(iterator.CurrentItem().Path);
             command.Play();
             string name = Path.GetFileName(iterator.CurrentItem().Path).Split('.')[0];
         }
     }
 }
Esempio n. 3
0
 public void Prev()
 {
     SoundSingleton.GetInstance().StopWaveOut();
     command.Init(iterator.Prev().Path);
     command.Play();
 }