private async Task UpdateSubmodules() { if (SubmoduleCheckList.CheckedItems.Count > 0) { LOG.Debug(nameof(UpdateSubmodules)); this.Hide(); bool init = InitCheck.Checked; bool recursive = RecursiveCheck.Checked; bool force = ForceCheck.Checked; int maxProcesses = (int)MaxProcessCountNumeric.Value; List <String> checkedSubmodules = SubmoduleCheckList.CheckedItems.Cast <String>().ToList(); IEnumerable <ProcessProgressTask> tasks = checkedSubmodules.Select(submodule => Git.CreateSubmoduleUpdateTask(Repo, submodule, init, recursive, force)); ProgressDialog dialog = new ProgressDialog() { Title = this.Text, CompletedText = "Submodule Update Completed", MaxTasks = maxProcesses }; dialog.AddTasks(tasks); dialog.Show(); dialog.DoProgress(); await dialog.WaitForClose(); this.DialogResult = DialogResult.OK; this.Close(); } else { LOG.Debug($"{nameof( UpdateSubmodules )} - No Submodules Selected"); MessageBox.Show("No submodules selected"); } }