예제 #1
0
 private void Helper_LyricsNotFound(object sender, EventArgs e)
 {
     if (_files != null)
     {
         _val++;
         progressBar1.Value = _val;
         Registry.SetValue("LyricsSearcherForm.LastDone", Convert.ToInt32(_files.Tables[0].Rows[_val]["LibraryID"]));
         _helper.LoadLyrics(this.Library.GetSong(_files.Tables[0].Rows[_val]["Filename"].ToString()), false, OnlyLyricsFile, OnlyLyricsFile);
         lblStatus.Text = "Searching: " + _helper.Song.ToString();
     }
 }
예제 #2
0
 protected override void InitLibrary()
 {
     _helper = new LyricsHelper(this.Library);
     _files  = this.Library.GetDataSet("SELECT LibraryID, Filename FROM Library WHERE (Lyrics IS NULL OR Lyrics = '') AND LibraryID >= " + Registry.GetValue("LyricsSearcherForm.LastDone", 0) + " ORDER BY LibraryID");
     _count  = _files.Tables[0].Rows.Count;
     progressBar1.Maximum    = _count;
     _helper.LyricsFound    += new EventHandler <LyricsFoundEventArgs>(Helper_LyricsFound);
     _helper.LyricsNotFound += new EventHandler(Helper_LyricsNotFound);
     _val = 0;
     progressBar1.Value = _val;
     Registry.SetValue("LyricsSearcherForm.LastDone", Convert.ToInt32(_files.Tables[0].Rows[_val]["LibraryID"]));
     _helper.LoadLyrics(this.Library.GetSong(_files.Tables[0].Rows[_val]["Filename"].ToString()), false, OnlyLyricsFile, OnlyLyricsFile);
     lblStatus.Text = "Searching: " + _helper.Song.ToString();
 }