/// <summary> /// Starts pull dialog /// </summary> /// <param name="owner">An implementation of IWin32Window that will own the modal dialog box.</param> /// <param name="pullOnShow"></param> /// <param name="pullCompleted">true if pull completed with no errors</param> /// <returns>if revision grid should be refreshed</returns> public bool StartPullDialog(IWin32Window owner, bool pullOnShow, string remoteBranch, string remote, out bool pullCompleted, bool fetchAll) { var pulled = false; Func<bool> action = () => { using (FormPull formPull = new FormPull(this, remoteBranch, remote)) { if (fetchAll) formPull.SetForFetchAll(); DialogResult dlgResult; if (pullOnShow) dlgResult = formPull.PullAndShowDialogWhenFailed(owner); else dlgResult = formPull.ShowDialog(owner); if (dlgResult == DialogResult.OK) { pulled = !formPull.ErrorOccurred; } return dlgResult == DialogResult.OK; } }; bool done = DoActionOnRepo(owner, true, true, PrePull, PostPull, action); pullCompleted = pulled; return done; }
public TestAccessor(FormPull form) { _form = form; }