Esempio n. 1
0
 public override void Pause(Player player)
 {
     if (player.Thread != null)
     {
         player.SetState(PlayerPause.Instance);
         player.Thread.Suspend();
     }
 }
Esempio n. 2
0
 public override void Play(Player player)
 {
     if (player.Thread != null)
     {
         player.SetState(PlayerPlay.Instance);
         player.Thread.Resume();
     }
 }
Esempio n. 3
0
 public override void Play(Player player)
 {
     player.SetState(PlayerPlay.Instance);
     if (player.Thread == null)
     {
         player.Thread = new Thread(player.PlayPlaylist);
         player.Thread.Start();
     }
 }
Esempio n. 4
0
 public override void Stop(Player player)
 {
     if (player.Thread != null)
     {
         try
         {
             player.SetState(PlayerStop.Instance);
             player.Thread.Abort();
         }
         catch (ThreadAbortException)
         {
             Thread.ResetAbort();
             player.Thread = null;
         }
     }
 }