Example #1
0
        private void Slider_LostMouseCapture(object sender, MouseEventArgs e)
        {
            PausePlayMusic = false;
            PlayerMusic.Play();
            timerr.Start();
            TimeSpan time = new TimeSpan(0, 0, Convert.ToInt32(Math.Round(Slider.Value)));

            PlayerMusic.Position = time;
            TimerString.Content  = String.Format(PlayerMusic.Position.Minutes.ToString(@"00") + ":" + PlayerMusic.Position.Seconds.ToString(@"00"));
        }
Example #2
0
 private void Play_Click(object sender, RoutedEventArgs e) //PLay Pause на одні кнопці
 {
     if (PausePlayMusic)
     {
         timerr.Start();
         Play.BeginAnimation(Button.WidthProperty, animation);
         Gif.Play();
         PlayerMusic.Play();
         PausePlayMusic = false;
         return;
     }
     if (!PausePlayMusic)
     {
         timerr.Stop();
         PlayerMusic.Pause();
         Play.BeginAnimation(Button.HeightProperty, animation);
         PausePlayMusic = true;
         return;
     }
 }