private void StartScraper() { try { UpdateSettings(); button6.Enabled = false; Utils.TotArtistsBeingScraped = 0.0; Utils.CurrArtistsBeingScraped = 0.0; myScraperWorker = new ScraperWorker(); myScraperWorker.ProgressChanged += new ProgressChangedEventHandler(myScraperWorker.OnProgressChanged); myScraperWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(myScraperWorker.OnRunWorkerCompleted); myScraperWorker.RunWorkerAsync(); button6.Enabled = true; } catch (Exception ex) { logger.Error("startScraper: " + ex); } }
private void StartScraper() { try { if (Utils.GetIsStopping()) return; Utils.GetDbm().TotArtistsBeingScraped = 0.0; Utils.GetDbm().CurrArtistsBeingScraped = 0.0; Utils.AllocateDelayStop("FanartHandlerSetup-StartScraper"); if (MyScraperWorker == null) { MyScraperWorker = new ScraperWorker(); MyScraperWorker.ProgressChanged += new ProgressChangedEventHandler(MyScraperWorker.OnProgressChanged); MyScraperWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(MyScraperWorker.OnRunWorkerCompleted); } if (MyScraperWorker.IsBusy) return; MyScraperWorker.RunWorkerAsync(); } catch (Exception ex) { Utils.ReleaseDelayStop("FanartHandlerSetup-StartScraper"); logger.Error("startScraper: " + ex); } }
private void StartScraper() { try { if (Utils.GetIsStopping()) return; if (MyScraperWorker == null) { MyScraperWorker = new ScraperWorker(); MyScraperWorker.ProgressChanged += new ProgressChangedEventHandler(MyScraperWorker.OnProgressChanged); MyScraperWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(MyScraperWorker.OnRunWorkerCompleted); } if (MyScraperWorker.IsBusy) return; MyScraperWorker.RunWorkerAsync(); } catch (Exception ex) { logger.Error("StartScraper: " + ex); } }