public DialogResult PullChanges(IWin32Window owner) { if (!ShouldPullChanges()) { return(DialogResult.No); } UpdateSettingsDuringPull(); DialogResult dr = ShouldRebaseMergeCommit(); if (dr != DialogResult.Yes) { return(dr); } if (!Fetch.Checked && Branches.Text.IsNullOrWhiteSpace() && Module.IsDetachedHead()) { int idx = PSTaskDialog.cTaskDialog.ShowCommandBox(owner, _notOnBranchCaption.Text, _notOnBranchMainInstruction.Text, _notOnBranch.Text, _notOnBranchButtons.Text, true); switch (idx) { case 0: if (!UICommands.StartCheckoutBranchDialog(owner, "")) { return(DialogResult.Cancel); } break; case -1: return(DialogResult.Cancel); } } if (PullFromUrl.Checked) { Repositories.RepositoryHistory.AddMostRecentRepository(comboBoxPullSource.Text); } var source = CalculateSource(); ScriptManager.RunEventScripts(Module, ScriptEvent.BeforePull); var stashed = CalculateStashedValue(owner); using (FormProcess process = CreateFormProcess(source)) { ShowProcessDialogBox(owner, source, process); return(EvaluateProcessDialogResults(owner, process, stashed)); } }
private void Checkout_Click(object sender, EventArgs e) { UICommands.StartCheckoutBranchDialog(this); RevisionGrid.RefreshRevisions(); }