Esempio n. 1
0
        public async void Update(IAudio audio)
        {
            _currentAudio = audio;

            try
            {
                if (_currentAudio != null && _currentAudio.TrackData != null)
                {
                    AlbumCover.Source = await _currentAudio.GetAlbumCoverTaskAsync(_currentAudio.TrackData.AlbumCoverUrl);
                }
                else
                {
                    return;
                }
                Lyrics = await _currentAudio.GetLyricsTaskAsync(_currentAudio.TrackData.LyricsUrl);
            }
            catch (System.Exception)
            {
                return;
            }

            if (_currentAudio != null && Lyrics != null && !string.IsNullOrWhiteSpace(Lyrics))
            {
                LyricsPage.Update(Lyrics);
            }
            else
            {
                LyricsPage.Update("Couldn't find lyrics.");
            }

            MoreInfoPage.GetInstance().Update(_currentAudio);
        }
Esempio n. 2
0
 private void Button_ClickToInfo(object sender, RoutedEventArgs e)
 {
     MainWindow.GetInstance().MainFrame.Content = MoreInfoPage.GetInstance();
 }