private void _pullRequestsList_SelectedIndexChanged(object sender, EventArgs e)
        {
            var prevPri = _currentPullRequestInfo;

            if (_pullRequestsList.SelectedItems.Count != 1)
            {
                _currentPullRequestInfo    = null;
                _discussionWB.DocumentText = "";
                _diffViewer.ViewText("", "");
                return;
            }

            _currentPullRequestInfo = _pullRequestsList.SelectedItems[0].Tag as IPullRequestInformation;
            if (prevPri != null && prevPri.Equals(_currentPullRequestInfo))
            {
                return;
            }

            if (_currentPullRequestInfo == null)
            {
                return;
            }
            _discussionWB.DocumentText = DiscussionHtmlCreator.CreateFor(_currentPullRequestInfo);
            _diffViewer.ViewPatch("");
            _fileStatusList.GitItemStatuses = new List <GitItemStatus>();

            LoadDiffPatch();
            LoadDiscussion();
        }
Ejemplo n.º 2
0
        private void LoadDiscussion(IPullRequestDiscussion discussion)
        {
            var t = DiscussionHtmlCreator.CreateFor(_currentPullRequestInfo, discussion != null ? discussion.Entries : null);

            _discussionWB.DocumentText = t;
        }