public void Reset() { using (var form = new FormResetCurrentBranch(UICommands, new GitRevision(Module, FullPath))) { form.ShowDialog(TreeViewNode.TreeView); } }
private void resetCurrentBranchOnThisCommitToolStripMenuItem_Click(object sender, EventArgs e) { if (_isDirtyDir) { if (MessageBox.Show(this, _continueResetCurrentBranchEvenWithChangesText.Text, _continueResetCurrentBranchCaptionText.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No) { return; } } var gitRevision = UICommands.Module.GetRevision(GetShaOfRefLine()); var resetType = _isDirtyDir ? FormResetCurrentBranch.ResetType.Soft : FormResetCurrentBranch.ResetType.Hard; var formResetCurrentBranch = new FormResetCurrentBranch(UICommands, gitRevision, resetType); var result = formResetCurrentBranch.ShowDialog(this); ShouldRefresh = result == DialogResult.OK; }