示例#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);
                }
            }
        }
示例#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();
     }
 }
示例#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);
        }
示例#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);
            }
        }
示例#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();
     }
 }
示例#6
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);
 }
示例#7
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);
         }
     }
 }
示例#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 FormDiffSmall(UICommands, gitRevision))
             frm.ShowDialog(this);
     }
 }
示例#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();
        }
示例#10
0
 private void ActiveTextAreaControlDoubleClick(object sender, EventArgs e)
 {
     var frm = new FormDiffSmall();
     frm.SetRevision(_lastRevision);
     frm.ShowDialog();
 }