Пример #1
0
 public void GetTitleTest()
 {
     Assert.AreEqual("Yo Sin Ti Official Audio", SongInfo.GetTitle(path));
     Assert.AreEqual("Margaret  Heartbeat", SongInfo.GetTitle(path4));
     Assert.AreEqual("Yo Sin Ti Official Audio", SongInfo.GetTitleSong(path));
     Assert.IsNull(SongInfo.GetTitleSong(path2));
     Assert.IsNull(SongInfo.GetTitle(path2));
 }
        public PlayListModel GetSongInfo(string path)
        {
            var song = new PlayListModel();

            song.FirstPerformerAndAlbum = SongInfo.GetArtistsSong(path);
            song.SongPath      = path;
            song.Duration      = SongInfo.GetDurationSong(path);
            song.Title         = SongInfo.GetTitleSong(path);
            song.PlayListIndex = listBoxItems.Count + 1;
            return(song);
        }
Пример #3
0
        void playlistLstBox_Drop(object sender, DragEventArgs e)
        {
            string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);

            foreach (string file in files)
            {
                PlayListModel newSong = new PlayListModel();
                newSong.FirstPerformerAndAlbum = SongInfo.GetArtistsSong(file);
                newSong.SongPath      = file;
                newSong.Duration      = SongInfo.GetDurationSong(file);
                newSong.Title         = SongInfo.GetTitleSong(file);
                newSong.PlayListIndex = PlayListViewModel.ListBoxItems.Count + 1;
                PlayListViewModel.ListBoxItems.Add(newSong);
            }
        }