Пример #1
0
 private void pauseButton_Click(object sender, EventArgs e)
 {
     if (wp.IsPlaying())
     {
         wp.Pause();
         pauseButton.Text = "Resume";
     }
     else
     {
         wp.Resume();
         pauseButton.Text = "Pause";
     }
 }
Пример #2
0
        public void AdjustOffset()
        {
            if (GetCount() == 0)
            {
                return;
            }
            short[] data1;
            wp.Pause();
            int idx1 = GetThresholdIdx(0, out data1);

            Parallel.For(1, list.Count, i => SetBestOffset(idx1, i, data1));

            wp.Resume();
        }
Пример #3
0
        private void playButton_Click(object sender, EventArgs e)
        {
            bool successful = true;

            if (playButtonIsPlay)
            {
                successful = wp.Resume();
            }
            else
            {
                wp.Pause();
            }
            if (successful)
            {
                ChangePlayButton();
            }
        }
Пример #4
0
 void playButton_Clicked(object sender, EventArgs e)
 {
     if (playButton.Text == "Play")
     {
         playButton.Text = "Pause";
         Streamable stream = wp.GetCurrentStream();
         if (wd.Equals(stream))
         {
             wp.Resume();
         }
         else
         {
             Play();
         }
     }
     else if (playButton.Text == "Pause")
     {
         playButton.Text = "Play";
         wp.Pause();
     }
     titleText.Focus();
 }