Beispiel #1
0
 private void button3_Click(object sender, EventArgs e)
 {
     if (listView1.Items.Count != 0 && CommonInterface.CurrentTrackNumber >= 0)
     {
         if (!Audio.Random && CommonInterface.CurrentTrackNumber < CommonInterface.Files.Count - 1)
         {
             while (CommonInterface.CurrentTrackNumber < CommonInterface.Files.Count - 1)
             {
                 CommonInterface.CurrentTrackNumber++;
                 if (Audio.Play(CommonInterface.Files[CommonInterface.CurrentTrackNumber].Path, Audio.Volume))
                 {
                     CommonInterface.RefreshForm(CommonInterface.CurrentTrackNumber);
                     return;
                 }
                 else
                 {
                     CommonInterface.DeleteTrack(CommonInterface.CurrentTrackNumber);
                     CommonInterface.CurrentTrackNumber--;
                 }
             }
             if (Audio.Play(CommonInterface.Files[CommonInterface.CurrentTrackNumber].Path, Audio.Volume))
             {
                 CommonInterface.RefreshForm(CommonInterface.CurrentTrackNumber);
             }
         }
         else if (Audio.Random)
         {
             CommonInterface.RandomTrack();
         }
     }
 }