public void SetSong(SongImageInfo info) { Refresh(); if (info.IsNull) { return; } SongInfo = info; Audio = new AudioFileReader(SongInfo.GetSongPath()) { Volume = (float)SongVolume.Value }; SongPosition.Maximum = Audio.TotalTime.TotalSeconds; SongLength.Text = Audio.GetTotalTimeString(); SongName.Text = SongInfo.GetName(); Wave.Init(Audio); BitmapImage image = new BitmapImage(); image.BeginInit(); image.UriSource = new Uri(SongInfo.GetImagePath()); image.DecodePixelWidth = 60; image.EndInit(); Preview.Source = image; IsEnabled = true; PlayOrPause_Click(null, new RoutedEventArgs()); }
public static void SaveSong(SongImageInfo song) { Copy(song.GetSongPath(), DownloadSongPath, song.GetName()); }