示例#1
0
 public LyricsUpdater(IITTrackCollection selectedTracks, org.lyricwiki.LyricWiki lyricsWiki, Boolean overwrite, frmResult form)
 {
     this.m_selectedTracks = selectedTracks;
     this.m_lyricsWiki = lyricsWiki;
     this.m_overwrite = overwrite;
     this.m_form = form;
 }
示例#2
0
        private void btnAlbums_Click(object sender, EventArgs e)
        {
            IITTrackCollection selectedTracks = iTunesApp.SelectedTracks;
            if ((selectedTracks == null))
            {
                MessageBox.Show("Nothing seems to be selected");
                return;
            }

            lyricsWiki = new org.lyricwiki.LyricWiki();

            if (chkAuto.Checked == true)
            {
                frmResult fr = new frmResult(selectedTracks, lyricsWiki, chkOverwrite.Checked);
                fr.ShowDialog();
            }
            else
            {
                int updatedSongsCount = 0;
                for (int i = 1; i <= selectedTracks.Count; i++)
                {
                    IITFileOrCDTrack currentTrack = (IITFileOrCDTrack)selectedTracks[i];
                    //if (currentTrack.Lyrics != null)
                    //    continue;

                    updatedSongsCount++;
                    ManualUpdate ab = new ManualUpdate();
                    ab.currentTrack = currentTrack;
                    ab.lyricsWiki = lyricsWiki;
                    DialogResult dr = ab.ShowDialog();
                    if (dr == DialogResult.Abort)
                        break;
                }
                if (updatedSongsCount == 0)
                    MessageBox.Show("All selected songs seems to have lyrics");
                else
                    MessageBox.Show("Update completed");
            }
        }