コード例 #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();
         }
     }
 }
コード例 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (listView1.Items.Count != 0)
     {
         CommonInterface.ClearForm();
         while (CommonInterface.Files.Count > 0)
         {
             CommonInterface.CurrentTrackNumber = CommonInterface.Files.Count - 1;
             if (Audio.Play(CommonInterface.Files[CommonInterface.CurrentTrackNumber].Path, Audio.Volume))
             {
                 CommonInterface.RefreshForm(CommonInterface.CurrentTrackNumber);
                 return;
             }
             else
             {
                 CommonInterface.DeleteTrack(CommonInterface.CurrentTrackNumber);
             }
         }
     }
 }
コード例 #3
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     label1.Text        = TimeSpan.FromSeconds(Audio.GetPosOfStream(Audio.Stream)).ToString();
     colorSlider1.Value = Audio.GetPosOfStream(Audio.Stream);
     if (Audio.ToNextTrack())
     {
         CommonInterface.RefreshForm(CommonInterface.CurrentTrackNumber);
     }
     else if (Audio.Stream == 0)
     {
         CommonInterface.ClearForm();
     }
     if (Audio.EndPlaylist)
     {
         if (comboBox1.SelectedIndex == 0)
         {
             CommonInterface.ClearForm();
         }
         CommonInterface.CurrentTrackNumber = -1;
         Audio.EndPlaylist = false;
     }
     CommonInterface.Visualisation();
 }