private void buttonGotoCommit_Click(object sender, EventArgs e) { using (var formGoToCommit = new FormGoToCommit(UICommands)) { if (formGoToCommit.ShowDialog(this) == DialogResult.OK) { string revisionGuid = formGoToCommit.GetRevision(); if (!string.IsNullOrEmpty(revisionGuid)) { revisionGrid.SetSelectedRevision(new GitRevision(Module, revisionGuid)); } else { MessageBox.Show(this, _noRevisionFoundError.Text); } } } }
public void GotoCommitExcecute() { using (FormGoToCommit formGoToCommit = new FormGoToCommit(_revisionGrid.UICommands)) { if (formGoToCommit.ShowDialog(_revisionGrid) != DialogResult.OK) return; string revisionGuid = formGoToCommit.ValidateAndGetSelectedRevision(); if (!string.IsNullOrEmpty(revisionGuid)) { _revisionGrid.SetSelectedRevision(new GitRevision(_revisionGrid.Module, revisionGuid)); } else { MessageBox.Show(_revisionGrid, _noRevisionFoundError.Text); } } }
private void goToToolStripMenuItem_Click(object sender, EventArgs e) { using (FormGoToCommit formGoToCommit = new FormGoToCommit(UICommands)) { if (formGoToCommit.ShowDialog(this) != DialogResult.OK) return; string revisionGuid = formGoToCommit.ValidateAndGetSelectedRevision(); if (!string.IsNullOrEmpty(revisionGuid)) { RevisionGrid.SetSelectedRevision(new GitRevision(Module, revisionGuid)); } else { MessageBox.Show(this, _noRevisionFoundError.Text); } } }