示例#1
0
        public void drawOnSongList()
        {
            lstSongs.Items.Clear();
            lstSongs.View = View.Details;

            for (int i = 0; i < Songs.getLength(); i++)
            {
                Song file = Songs.getValue(i);

                TagLib.File  data = TagLib.File.Create(file.getURL());
                ListViewItem song = new ListViewItem(file.getName());

                lstSongs.Items.Add(song);
                song.SubItems.Add(setTime(data.Properties.Duration.ToString()));
                song.SubItems.Add(file.getArtist().getName());
                song.SubItems.Add(file.getAlbum().getName());
                song.SubItems.Add(file.getYear().ToString());
                song.SubItems.Add(file.getRating());
            }
        }