private void _installerBGWorker_DoWork(object sender, DoWorkEventArgs e) { BackgroundWorker bgWorker = sender as BackgroundWorker; // 开始执行安装方法 _installer = new MyInstaller(); _installer.Install(bgWorker, _installPackager); }