public LyricsController(ILyricForm mainForm, ManualResetEvent eventStopThread, string[] lyricSites, bool allowAllToComplete, bool automaticUpdate, string find, string replace) { _mForm = mainForm; _mAllowAllToComplete = allowAllToComplete; _mAutomaticUpdate = automaticUpdate; _mNoOfLyricsToSearch = 1; _mNoOfLyricsSearched = 0; _mNoOfLyricsFound = 0; _mNoOfLyricsNotFound = 0; _mNoOfCurrentSearches = 0; _lyricsSites = lyricSites; LyricSearch.LyricsSites = _lyricsSites; _mEventStopLyricController = eventStopThread; _mEventStoppedLyricController = new ManualResetEvent(false); if (!string.IsNullOrEmpty(find) && !string.IsNullOrEmpty(replace)) { if (find != "") { _mFindArray = find.Split(','); _mReplaceArray = replace.Split(','); } } }
public LyricsController(ILyricForm mainForm, ManualResetEvent eventStopThread, string[] lyricSites, bool allowAllToComplete, bool automaticUpdate, string find, string replace) { m_Form = mainForm; m_allowAllToComplete = allowAllToComplete; m_automaticUpdate = automaticUpdate; m_noOfLyricsToSearch = 1; m_noOfLyricsSearched = 0; m_noOfLyricsFound = 0; m_noOfLyricsNotFound = 0; m_noOfCurrentSearches = 0; ArrayList sitesArrayList = new ArrayList(); // If search all, then include all foreach (string site in lyricSites) { if (Setup.IsMember(site)) { sitesArrayList.Add(site); } } lyricsSites = (string[])sitesArrayList.ToArray(typeof(string)); LyricSearch.LyricsSites = lyricsSites; m_EventStop_LyricController = eventStopThread; m_EventStopped_LyricController = new ManualResetEvent(false); if (!string.IsNullOrEmpty(find) && !string.IsNullOrEmpty(replace)) { if (find != "") { m_findArray = find.Split(','); m_replaceArray = replace.Split(','); } } }