Exemple #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (listView1.Items.Count != 0 && CommonInterface.CurrentTrackNumber >= 0)
     {
         if (!Audio.Random && CommonInterface.CurrentTrackNumber > 0)
         {
             CommonInterface.ClearForm();
             while (CommonInterface.CurrentTrackNumber > 0)
             {
                 CommonInterface.CurrentTrackNumber--;
                 if (Audio.Play(CommonInterface.Files[CommonInterface.CurrentTrackNumber].Path, Audio.Volume))
                 {
                     CommonInterface.RefreshForm(CommonInterface.CurrentTrackNumber);
                     return;
                 }
                 else
                 {
                     CommonInterface.DeleteTrack(CommonInterface.CurrentTrackNumber);
                 }
             }
             if (Audio.Play(CommonInterface.Files[CommonInterface.CurrentTrackNumber].Path, Audio.Volume))
             {
                 CommonInterface.RefreshForm(CommonInterface.CurrentTrackNumber);
             }
         }
         else if (Audio.Random)
         {
             CommonInterface.RandomTrack();
         }
     }
 }
Exemple #2
0
        private void button5_Click(object sender, EventArgs e)
        {
            CommonInterface.ClearForm();
            Form2 form2 = new Form2(Audio.Volume, checkBox2.Checked);

            form2.ShowDialog();
            colorSlider2.Value = Audio.Volume;
        }
Exemple #3
0
 private void button6_Click(object sender, EventArgs e)
 {
     if (listView1.Items.Count != 0 && listView1.SelectedItems.Count != 0)
     {
         if (listView1.SelectedItems[0].Index == CommonInterface.CurrentTrackNumber)
         {
             CommonInterface.ClearForm();
             CommonInterface.CurrentTrackNumber = -1;
         }
         else if (listView1.SelectedItems[0].Index < CommonInterface.CurrentTrackNumber)
         {
             CommonInterface.CurrentTrackNumber--;
         }
         CommonInterface.DeleteTrack(listView1.SelectedItems[0].Index);
     }
 }
Exemple #4
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();
 }
Exemple #5
0
 private void button_Stop_Click(object sender, EventArgs e)
 {
     CommonInterface.ClearForm();
 }