Пример #1
0
        private void tagFromFilenameToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var tagfilewin = new FRMtagfile();

            ListView.SelectedListViewItemCollection filename = this.musicListStore.SelectedItems;

            foreach (ListViewItem item in filename)
            {
                tagfilewin.Addtrack(item.SubItems[1].Text + "\\" + item.SubItems[0].Text);
            }
            if (tagfilewin.ShowDialog(this) == DialogResult.OK)
            {
                for (int x = 0; x <= tagfilewin.Gettrack_Count() - 1; x++)
                {
                    var mytrack = new Track(tagfilewin.getartist(x), tagfilewin.gettitle(x), tagfilewin.getalbum(x), tagfilewin.getyear(x), tagfilewin.gettracknumber(x), tagfilewin.getgenre(x), tagfilewin.getfilename(x), "V1/V2");
                    Miscutils.Savev1tag(mytrack);
                    Miscutils.Savev2tag(mytrack);
                    // Miscutils.Updaterecord(tagfilewin.getfilename(x), tagfilewin.getalbum(x), tagfilewin.getartist(x), tagfilewin.getgenre(x), tagfilewin.gettitle(x), tagfilewin.gettracknumber(x), tagfilewin.getyear(x));
                }
            }
            foreach (ListViewItem item in filename)
            {
                ReloadlistviewV1(item);
            }
        }
Пример #2
0
        private void tagFromFilenameToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var tagfilewin = new FRMtagfile();
            ListView.SelectedListViewItemCollection filename = this.musicListStore.SelectedItems;

            foreach (ListViewItem item in filename)
            {
                tagfilewin.Addtrack(item.SubItems[1].Text + "\\" + item.SubItems[0].Text);
            }
            if (tagfilewin.ShowDialog(this) == DialogResult.OK)
            {
                for (int x = 0; x <= tagfilewin.Gettrack_Count() - 1; x++)
                {
                    var mytrack = new Track(tagfilewin.getartist(x), tagfilewin.gettitle(x), tagfilewin.getalbum(x), tagfilewin.getyear(x), tagfilewin.gettracknumber(x), tagfilewin.getgenre(x), tagfilewin.getfilename(x), "V1/V2");
                    Miscutils.Savev1tag(mytrack);
                    Miscutils.Savev2tag(mytrack);
                    // Miscutils.Updaterecord(tagfilewin.getfilename(x), tagfilewin.getalbum(x), tagfilewin.getartist(x), tagfilewin.getgenre(x), tagfilewin.gettitle(x), tagfilewin.gettracknumber(x), tagfilewin.getyear(x));
                }
            }
            foreach (ListViewItem item in filename)
            {
                ReloadlistviewV1(item);
            }
        }