private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { PublishOutputText.AppendText(e.Error != null ? $"An error occurred: {e.Error.Message}" : "Finished"); InstallServices.Enabled = true; UninstallServices.Enabled = true; }
private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e) { if (e.ProgressPercentage != 0) { PublishProgress.Value += 1; } if (e.UserState != null && !string.IsNullOrWhiteSpace(e.UserState.ToString())) { PublishOutputText.AppendText(e.UserState + Environment.NewLine); } }