Пример #1
0
        private void LyricNotFoundMethod(String artist, String title, String message, String site, int row)
        {
            foreach (ListViewItem lvi in lvSelectedSongs.Items)
            {
                if (lvi.Text.Equals(artist) && lvi.SubItems[1].Text.Equals(title) && !lvi.SubItems[3].Text.Equals("OK"))
                {
                    lvi.SubItems[2].Text = "MarkedDB";
                    lvi.SubItems[3].Text = "miss";
                    lvi.EnsureVisible();

                    var capArtist = LyricUtil.CapatalizeString(artist);
                    var capTitle  = LyricUtil.CapatalizeString(title);

                    if (
                        DatabaseUtil.IsSongInLyricsMarkedDatabase(MyLyricsUtils.LyricsMarkedDB, capArtist, capTitle).Equals(DatabaseUtil.LyricNotFound))
                    {
                        MyLyricsUtils.LyricsMarkedDB.Add(DatabaseUtil.CorrectKeyFormat(capArtist, capTitle), new LyricsItem(capArtist, capTitle, "", ""));
                    }

                    DatabaseUtil.SerializeLyricMarkedDB();
                    _mNoOfCurrentlySearches -= 1;
                    ++_mNoOfSearchesCompleted;

                    break;
                }
            }

            //lvSelectedSongs.Update();
        }