Exemple #1
0
 private void Delete_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show(this, "Are you sure to delete the selected branches?" + Environment.NewLine + "Only branches that are fully merged in '" + referenceBranch + "' will be deleted.", "Delete", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         foreach (Branch branch in branches.Where(branch => branch.Delete))
         {
             branch.Result = gitCommands.RunGit("branch -d " + branch.Name).Trim();
         }
         BranchesGrid.Refresh();
     }
 }
 private void Delete_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Are you sure to delete the selected branches?" + Environment.NewLine + "Only branches that are not fully merged will be deleted.", "Delete", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         foreach (Branch branch in Branches)
         {
             if (branch.Delete)
             {
                 branch.Result = GitCommands.RunGit(string.Concat("branch -d " + branch.Name)).Trim();
                 BranchesGrid.Refresh();
             }
         }
     }
 }