private void PackageDeployment_FormClosing(object sender, FormClosingEventArgs e) { if (this.backgroundWorker.IsBusy) { "Please wait until the process completes and try again.".ShowUIInformation(); e.Cancel = true; } }