private void StoppedPlayerHandler(object sender, StoppedPlayerEventArgs e)
 {
     if (e.type.Equals("EOF"))
     {
         if (e.nextSongType.Equals("NEXT"))
         {
             listBoxSongs.SelectedIndex = ourMusicPlayer.getCurrentSong();
             lblCurrentlyPlaying.Text   = "Currently playing" + listBoxSongs.SelectedItem.ToString();
         }
         else if (e.nextSongType.Equals("PREV"))
         {
             listBoxSongs.SelectedIndex = ourMusicPlayer.getCurrentSong();
             lblCurrentlyPlaying.Text   = "Currently playing" + listBoxSongs.SelectedItem.ToString();
         }
         else
         {
         }
     }
     else if (e.type.Equals("USR"))
     {
         this.btnPlay.Enabled     = true;
         this.btnStop.Enabled     = false;
         this.btnPause.Enabled    = false;
         this.btnPrevSong.Enabled = false;
         this.btnNext.Enabled     = false;
     }
 }
 private void StoppedPlayerEventHandler(object sender, StoppedPlayerEventArgs e)
 {
     if (e.type.Equals("EOF"))
     {
         log("Eof Stopped Occured");
         if (e.nextSongType.Equals("NEXT") && cnt < listBox_playlist.Items.Count - 1)
         {
             ++cnt;
             currentAudioFile = new AudioFile(listBox_playlist.Items[cnt].ToString());
             audioPlayer.PlaySong(currentAudioFile);
             listBox_playlist.SelectedIndex = cnt;
         }
         else if (e.nextSongType.Equals("PREV") && cnt > 0)
         {
             --cnt;
             currentAudioFile = new AudioFile(listBox_playlist.Items[cnt].ToString());
             audioPlayer.PlaySong(currentAudioFile);
             listBox_playlist.SelectedIndex = cnt;
         }
         else
         {
             cnt = 0;
             listBox_playlist.SelectedIndex = cnt;
             SetButtonsInitialStates();
             currentAudioFile = new AudioFile(listBox_playlist.Items[cnt].ToString());
             audioPlayer.PlaySong(currentAudioFile);
         }
     }
     else if (e.type.Equals("USR"))
     {
         log("Usr Stopped Occured");
         button_Play.Enabled     = true;
         button_Pause.Enabled    = false;
         button_Stop.Enabled     = false;
         button_Next.Enabled     = false;
         button_Previous.Enabled = false;
     }
 }
 private void StoppedPlayerEventHandler(object sender, StoppedPlayerEventArgs e)
 {
     _playerState = AudioPlayer.AudioPlayerState.Stopped;
     if (e.type.Equals("EOF"))
     {
         if (e.nextSongType.Equals("NEXT"))
         {
             songStoppedArgs = "EOF_NEXT";
         }
         else if (e.nextSongType.Equals("PREV"))
         {
             songStoppedArgs = "EOF_NEXT";
         }
         else
         {
             songStoppedArgs = "EOF_PREV";
         }
     }
     else if (e.type.Equals("USR"))
     {
         songStoppedArgs = "USR";
     }
 }