private void OkClick(object sender, EventArgs e)
{
Cursor.Current = Cursors.WaitCursor;
if (string.IsNullOrEmpty(Branches.Text))
{
MessageBox.Show(this, _noBranchSelectedText.Text);
return;
}
var rebaseCmd = GitCommandHelpers.RebaseCmd(Branches.Text, chkInteractive.Checked, chkPreserveMerges.Checked, chkAutosquash.Checked);
var dialogResult = FormProcess.ReadDialog(this, rebaseCmd);
if (dialogResult.Trim() == "Current branch a is up to date.")
{
MessageBox.Show(this, _branchUpToDateText.Text, _branchUpToDateCaption.Text);
}
if (!GitModule.Current.InTheMiddleOfConflictedMerge() &&
!GitModule.Current.InTheMiddleOfRebase() &&
!GitModule.Current.InTheMiddleOfPatch())
{
Close();
}
EnableButtons();
patchGrid1.Initialize();
Cursor.Current = Cursors.Default;
}