private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { Action <string> callback = (file => { this.Invoke((MethodInvoker) delegate() { lblCurrentFile.Text = file; }); }); _ribbonItemHelper.FetchRibbonItems(_itemsToDL, _downloadDir, backgroundWorker1, callback); }
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { Action <string> callback = (file => { this.Invoke((MethodInvoker) delegate() { MainView myParent = this.MdiParent as MainView; myParent.UpdateStatusLabel(file); //lblCurrentFile.Text = file; }); }); _ribbonItemHelper.FetchRibbonItems(_itemsToDL, _downloadDir, backgroundWorker1, callback); }