예제 #1
0
 private void btStop_Click(object sender, EventArgs e)
 {
     BassAudio.Stop();
     timer1.Enabled        = false;
     timeSlider.Value      = 0;
     currentTimeLabel.Text = "00:00:00";
     lengthTimeLabel.Text  = "00:00:00";
 }
예제 #2
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     currentTimeLabel.Text = TimeSpan.FromSeconds(BassAudio.GetPositionOfStream(BassAudio.Stream)).ToString();
     timeSlider.Value      = BassAudio.GetPositionOfStream(BassAudio.Stream);
     if (currentTimeLabel.Text == lengthTimeLabel.Text)
     {
         btNext_Click(sender, e);
     }
 }
예제 #3
0
 private void btPlay_Click(object sender, EventArgs e)
 {
     if (playlistListBox.Items.Count == 0 || playlistListBox.SelectedIndex == -1)
     {
         return;
     }
     current = Variables.Files[playlistListBox.SelectedIndex];
     BassAudio.Play(current, BassAudio.Volume);
     currentTimeLabel.Text = TimeSpan.FromSeconds(BassAudio.GetPositionOfStream(BassAudio.Stream)).ToString();
     lengthTimeLabel.Text  = TimeSpan.FromSeconds(BassAudio.GetTimeOfStream(BassAudio.Stream)).ToString();
     timeSlider.Maximum    = BassAudio.GetTimeOfStream(BassAudio.Stream);
     timeSlider.Value      = BassAudio.GetPositionOfStream(BassAudio.Stream);
     BassAudio.SetVolumeToStream(BassAudio.Stream, volumeSlider.Value);
     timer1.Enabled = true;
 }
예제 #4
0
 private void btPause_Click(object sender, EventArgs e) => BassAudio.Pause();
예제 #5
0
 private void slVolume_Scroll(object sender, ScrollEventArgs e) => BassAudio.SetVolumeToStream(BassAudio.Stream, volumeSlider.Value);
예제 #6
0
 private void slTime_Scroll(object sender, ScrollEventArgs e) => BassAudio.SetPositionOfScroll(BassAudio.Stream, timeSlider.Value);