예제 #1
0
        public void SetTags(AudioFile file, ShowTags frm)
        {
            File tags = File.Create(file.Url);

            string[] arists = { frm.Atlikejas.Text };
            tags.Tag.Artists    = arists;
            file.Artist         = frm.Atlikejas.Text;
            file.Title          = frm.DainosPavadinimas.Text;
            file.AlbumTitle     = frm.AlbumoPavadinimas.Text;
            tags.Tag.Album      = frm.AlbumoPavadinimas.Text;
            tags.Tag.Track      = Convert.ToUInt32(frm.DainosNumeris.Text);
            tags.Tag.Title      = frm.DainosPavadinimas.Text;
            tags.Tag.TrackCount = Convert.ToUInt32(frm.DainuKiekis.Text);
            tags.Tag.Comment    = frm.Komentaras.Text;
            string[] genres = { frm.Zanras.Text };
            tags.Tag.Genres = genres;
            tags.Tag.Year   = Convert.ToUInt32(frm.IsleidimoMetai.Text);

            file.Track      = Convert.ToInt32(frm.DainosNumeris.Text);
            file.TrackCount = Convert.ToInt32(frm.DainuKiekis.Text);
            file.Comment    = frm.Komentaras.Text;
            file.Genres     = frm.Zanras.Text;
            file.Year       = Convert.ToInt32(frm.IsleidimoMetai.Text);
            try
            {
                tags.Save();
            }
            catch (IOException)
            {
                throw;
            }
        }
예제 #2
0
        private void showTagsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int       index    = listBox1.SelectedIndex;
            AudioFile file     = activePL.Songs.ElementAt(index);
            ShowTags  showTags = new ShowTags(file, this, index);

            showTags.Show();
        }