private void EmulatorTreeView_CustomRemovalRequested(Emulators.Interfaces.IReadOnlyEmulator emulator) { backgroundWorker1.DoWork += (sender, e) => { IReadOnlyEmulator emu = (IReadOnlyEmulator)e.Argument; emuMgr.DeleteEmulator(emu); }; backgroundWorker1.RunWorkerCompleted += (sender, e) => { UpdateEmulatorList(); }; backgroundWorker1.RunWorkerAsync(emulator); }