Beispiel #1
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)
            {
                commit = blame.Headers[0].CommitGuid;
                var gitRevision = new GitRevision(Module, commit)
                {
                    ParentGuids = new[] { commit + "^" }
                };
                if (_revGrid != null)
                {
                    _revGrid.SetSelectedRevision(gitRevision);
                }
                else
                {
                    using (var frm = new FormDiffSmall(UICommands, gitRevision))
                        frm.ShowDialog(this);
                }
            }
        }
Beispiel #2
0
 private void ActiveTextAreaControlDoubleClick(object sender, EventArgs e)
 {
     if (_revGrid != null)
     {
         _revGrid.SetSelectedRevision(new GitRevision {
             Guid = _lastRevision, ParentGuids = new[] { _lastRevision + "^" }
         });
     }
     else
     {
         var frm = new FormDiffSmall();
         frm.SetRevision(_lastRevision);
         frm.ShowDialog();
     }
 }
Beispiel #3
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 FormDiffSmall(UICommands, gitRevision))
                frm.ShowDialog(this);
        }
Beispiel #4
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 FormDiffSmall(UICommands, gitRevision))
                    frm.ShowDialog(this);
            }
        }
Beispiel #5
0
 private void ActiveTextAreaControlDoubleClick(object sender, EventArgs e)
 {
     if (_revGrid != null)
     {
         _revGrid.SetSelectedRevision(new GitRevision { Guid = _lastRevision, ParentGuids = new[] { _lastRevision + "^" } });
     }
     else
     {
         var frm = new FormDiffSmall();
         frm.SetRevision(_lastRevision);
         frm.ShowDialog();
     }
 }
 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 FormDiffSmall(UICommands, gitRevision))
         frm.ShowDialog(this);
 }
 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)
     {
         commit = blame.Headers[0].CommitGuid;
         var gitRevision = new GitRevision(Module, commit) { ParentGuids = new[] { commit + "^" } };
         if (_revGrid != null)
         {
             _revGrid.SetSelectedRevision(gitRevision);
         }
         else
         {
             using (var frm = new FormDiffSmall(UICommands, gitRevision))
                 frm.ShowDialog(this);
         }
     }
 }
 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 FormDiffSmall(UICommands, gitRevision))
             frm.ShowDialog(this);
     }
 }
Beispiel #9
0
        private void ActiveTextAreaControlDoubleClick(object sender, EventArgs e)
        {
            if (_blameList == null || _blameList.Count < BlameFile.ActiveTextAreaControl.TextArea.Caret.Line)
                return;

            var frm = new FormDiffSmall();
            frm.SetRevision(_blameList[BlameFile.ActiveTextAreaControl.TextArea.Caret.Line].CommitGuid);
            frm.ShowDialog();
        }
Beispiel #10
0
 private void ActiveTextAreaControlDoubleClick(object sender, EventArgs e)
 {
     var frm = new FormDiffSmall();
     frm.SetRevision(_lastRevision);
     frm.ShowDialog();
 }