Example #1
0
 private void Pause()
 {
     ControlLabel.Text = "Pause";
     MyMediaPlayer.Pause();
     StatusButton.Icon = new SymbolIcon(Symbol.Play);
     _isPlaying        = false;
 }
Example #2
0
        private void ListViewSong_OnDoubleTapped(object sender, DoubleTappedRoutedEventArgs e)
        {
            var selectItem = ListViewSong.SelectedItem as Song;

            MyMediaPlayer.Pause();
            if (selectItem != null)
            {
                _currentIndex             = _songs.IndexOf(selectItem);
                MyMediaPlayer.Source      = new Uri(selectItem.link);
                SongThumbnail.ImageSource = new BitmapImage(new Uri(selectItem.thumbnail));
                Play();
            }
        }
Example #3
0
        private void SelectSong(object sender, TappedRoutedEventArgs e)
        {
            var selectItem = sender as StackPanel;

            MyMediaPlayer.Pause();
            {
                if (selectItem.Tag is Song currentSong)
                {
                    _currentIndex        = _mysongs.IndexOf(currentSong);
                    MyMediaPlayer.Source = new Uri(currentSong.link);
                    Play();
                }
            }
        }
Example #4
0
        private void SelectSong(object sender, TappedRoutedEventArgs e)
        {
            var selectItem = sender as TextBlock;

            MyMediaPlayer.Pause();
            if (selectItem != null)
            {
                if (selectItem.Tag is Song currentSong)
                {
                    _currentIndex        = _songs.IndexOf(currentSong);
                    MyMediaPlayer.Source = new Uri(currentSong.link);
                    Play();
                }
            }
        }
Example #5
0
        private void SelectSong(object sender, TappedRoutedEventArgs e)
        {
            var selectItem = sender as StackPanel;

            MyMediaPlayer.Pause();
            if (selectItem != null)
            {
                if (selectItem.Tag is Music currentSong)
                {
                    Debug.WriteLine("Tag of selectItem: " + selectItem.Tag);

                    _currentIndex        = listMusic.IndexOf(currentSong);
                    MyMediaPlayer.Source = new Uri(currentSong.link);
                    Play();
                }
            }
        }
 protected override void OnNavigatedFrom(NavigationEventArgs e)
 {
     MyMediaPlayer.Pause();
 }