Exemplo n.º 1
0
        public string GetTabText()
        {
            var revisions = _revisionGrid.GetSelectedRevisions();

            DiffText.SaveCurrentScrollPos();
            DiffFiles.SetDiffs(revisions);
            if (_oldDiffItem != null && revisions.Count > 0 && revisions[0].Guid == _oldRevision)
            {
                DiffFiles.SelectedItem = _oldDiffItem;
                _oldDiffItem           = null;
                _oldRevision           = null;
            }

            switch (revisions.Count)
            {
            case 0:
                return(_diffNoSelection.Text);

            case 1:     // diff "parent" --> "selected revision"
                return(_diffParentWithSelection.Text);

            case 2:     // diff "first clicked revision" --> "second clicked revision"
                return(_diffTwoSelected.Text);
            }
            return(_diffNotSupported.Text);
        }
Exemplo n.º 2
0
        public void DisplayDiffTab()
        {
            DiffText.SaveCurrentScrollPos();
            var revisions = _revisionGrid.GetSelectedRevisions();

            DiffFiles.SetDiffs(revisions);
            if (_oldDiffItem != null && DiffFiles.Revision?.Guid == _oldRevision)
            {
                DiffFiles.SelectedItem = _oldDiffItem;
                _oldDiffItem           = null;
                _oldRevision           = null;
            }
        }