private void RefreshData(IInfernoData infernoDataSource) { BackgroundWorker worker = new BackgroundWorker(); worker.DoWork += new DoWorkEventHandler((sender, e) => GetData(sender, e, infernoDataSource)); worker.RunWorkerCompleted += ShowData; worker.RunWorkerAsync(); }
private void GetData(object sender, DoWorkEventArgs e, IInfernoData infernoDataSource) { e.Result = infernoDataSource.GetRows(GetNumberOfRows()); }