Exemplo n.º 1
0
        public void ViewSelectedRevisions()
        {
            var selectedRevisions = GetSelectedRevisions();
            if (selectedRevisions.Any(rev => !GitRevision.IsArtificial(rev.Guid)))
            {
                var form = new FormCommitDiff(UICommands, selectedRevisions[0].Guid);

                form.ShowDialog(this);
            }
            else if (!selectedRevisions.Any())
            {
                UICommands.StartCompareRevisionsDialog(this);
            }
        }
Exemplo n.º 2
0
 private void showChangesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     string commit = GetBlameCommit();
     if (commit == null)
         return;
     using (var frm = new FormCommitDiff(UICommands, GetRevision(commit)))
         frm.ShowDialog(this);
 }
Exemplo n.º 3
0
 private void ActiveTextAreaControlDoubleClick(object sender, EventArgs e)
 {
     if (_lastRevision == null)
         return;
     var gitRevision = GetRevision(_lastRevision);
     if (_revGrid != null)
     {
         _revGrid.SetSelectedRevision(gitRevision);
     }
     else
     {
         using (var frm = new FormCommitDiff(UICommands, gitRevision))
             frm.ShowDialog(this);
     }
 }
Exemplo n.º 4
0
 private void blamePreviousRevisionToolStripMenuItem_Click(object sender, EventArgs e)
 {
     int line = (int?)contextMenu.Tag ?? -1;
     if (line < 0)
         return;
     string commit = _blame.Lines[line].CommitGuid;
     GitBlame blame = Module.Blame(_fileName, commit + "^", line + ",+1", _encoding);
     if (blame.Headers.Count > 0)
     {
         var gitRevision = GetRevision(blame.Headers[0].CommitGuid);
         if (_revGrid != null)
         {
             _revGrid.SetSelectedRevision(gitRevision);
         }
         else
         {
             using (var frm = new FormCommitDiff(UICommands, gitRevision))
                 frm.ShowDialog(this);
         }
     }
 }
Exemplo n.º 5
0
 public void ViewSelectedRevisions()
 {
     var selectedRevisions = GetSelectedRevisions();
     if (selectedRevisions.Count > 0)
     {
         var form = new FormCommitDiff(UICommands, selectedRevisions[0]);
         form.ShowDialog(this);
     }
     else
         UICommands.StartCompareRevisionsDialog(this);
 }
Exemplo n.º 6
0
 private void ActiveTextAreaControlDoubleClick(object sender, EventArgs e)
 {
     if (_lastBlameLine.CommitGuid == null)
         return;
     if (_revGrid != null)
     {
         _clickedBlameLine = _lastBlameLine;
         _revGrid.SetSelectedRevision(_lastBlameLine.CommitGuid);
     }
     else
     {
         using (var frm = new FormCommitDiff(UICommands, _lastBlameLine.CommitGuid))
             frm.ShowDialog(this);
     }
 }
Exemplo n.º 7
0
 private void showChangesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     string commit = GetBlameCommit();
     if (commit == null)
         return;
     var gitRevision = new GitRevision(Module, commit) { ParentGuids = new[] { commit + "^" } };
     using (var frm = new FormCommitDiff(UICommands, gitRevision.Guid))
         frm.ShowDialog(this);
 }
Exemplo n.º 8
0
 private void ActiveTextAreaControlDoubleClick(object sender, EventArgs e)
 {
     if (_lastRevision == null)
         return;
     var gitRevision = new GitRevision(Module, _lastRevision) { ParentGuids = new[] { _lastRevision + "^" } };
     if (_revGrid != null)
     {
         _revGrid.SetSelectedRevision(gitRevision);
     }
     else
     {
         using (var frm = new FormCommitDiff(UICommands, gitRevision.Guid))
             frm.ShowDialog(this);
     }
 }