Example #1
0
        private void ButtonPlayNext_PreviewMouseUp(object sender, MouseButtonEventArgs e)
        {
            if (seekInProgress)
            {
                seekInProgress = false;
                dtSeek.Stop();
                ButtonPlayNext.ReleaseMouseCapture();
                e.Handled = true;
            }
            else
            {
                dtSeek.Stop();
                ButtonPlayNext.ReleaseMouseCapture();

                NextTrack();
            }
        }
Example #2
0
 void dtSeek_Tick(object sender, EventArgs e)
 {
     if (Mouse.LeftButton == MouseButtonState.Pressed)
     {
         if (DateTime.Now - dtPlayNextPressed > TimeSpan.FromMilliseconds(500))
         {
             if (seekInProgressForward)
             {
                 Playlist.CurrentTrackPlayPosition += 1000;
                 ButtonPlayNext.CaptureMouse();
             }
             else
             {
                 Playlist.CurrentTrackPlayPosition -= 1000;
                 ButtonPlayPrev.CaptureMouse();
             }
             seekInProgress = true;
         }
     }
 }