private void updateText() { if (_sortedRefs != null) { if (_tags != null && string.IsNullOrEmpty(_tagInfo)) { _tags.Sort(new ItemTpComparer(_sortedRefs, "refs/tags/")); if (_tags.Count > MaximumDisplayedRefs) { _tags[MaximumDisplayedRefs - 2] = "…"; _tags[MaximumDisplayedRefs - 1] = _tags[_tags.Count - 1]; _tags.RemoveRange(MaximumDisplayedRefs, _tags.Count - MaximumDisplayedRefs); } _tagInfo = GetTagsWhichContainsThisCommit(_tags, ShowBranchesAsLinks); } if (_branches != null && string.IsNullOrEmpty(_branchInfo)) { _branches.Sort(new ItemTpComparer(_sortedRefs, "refs/heads/")); if (_branches.Count > MaximumDisplayedRefs) { _branches[MaximumDisplayedRefs - 2] = "…"; _branches[MaximumDisplayedRefs - 1] = _branches[_branches.Count - 1]; _branches.RemoveRange(MaximumDisplayedRefs, _branches.Count - MaximumDisplayedRefs); } _branchInfo = GetBranchesWhichContainsThisCommit(_branches, ShowBranchesAsLinks); } } RevisionInfo.SuspendLayout(); RevisionInfo.SetXHTMLText(_revisionInfo + "\n\n" + _linksInfo + _branchInfo + _tagInfo); RevisionInfo.SelectionStart = 0; //scroll up RevisionInfo.ScrollToCaret(); //scroll up RevisionInfo.ResumeLayout(true); }
private void updateText() { RevisionInfo.SuspendLayout(); RevisionInfo.SetXHTMLText(_revisionInfo + _branchInfo + _tagInfo); RevisionInfo.SelectionStart = 0; //scroll up RevisionInfo.ScrollToCaret(); //scroll up RevisionInfo.ResumeLayout(true); }
private void UpdateRevisionInfo() { if (_sortedRefs != null) { if (_annotatedTagsMessages != null && _annotatedTagsMessages.Count() > 0 && string.IsNullOrEmpty(_annotatedTagsInfo) && Revision != null) { // having both lightweight & annotated tags in thisRevisionTagNames, // but GetAnnotatedTagsInfo will process annotated only: List <string> thisRevisionTagNames = Revision .Refs .Where(r => r.IsTag) .Select(r => r.LocalName) .ToList(); thisRevisionTagNames.Sort(new ItemTpComparer(_sortedRefs, "refs/tags/")); _annotatedTagsInfo = GetAnnotatedTagsInfo(Revision, thisRevisionTagNames, _annotatedTagsMessages); } if (_tags != null && string.IsNullOrEmpty(_tagInfo)) { _tags.Sort(new ItemTpComparer(_sortedRefs, "refs/tags/")); if (_tags.Count > MaximumDisplayedRefs) { _tags[MaximumDisplayedRefs - 2] = "…"; _tags[MaximumDisplayedRefs - 1] = _tags[_tags.Count - 1]; _tags.RemoveRange(MaximumDisplayedRefs, _tags.Count - MaximumDisplayedRefs); } _tagInfo = GetTagsWhichContainsThisCommit(_tags, ShowBranchesAsLinks); } if (_branches != null && string.IsNullOrEmpty(_branchInfo)) { _branches.Sort(new ItemTpComparer(_sortedRefs, "refs/heads/")); if (_branches.Count > MaximumDisplayedRefs) { _branches[MaximumDisplayedRefs - 2] = "…"; _branches[MaximumDisplayedRefs - 1] = _branches[_branches.Count - 1]; _branches.RemoveRange(MaximumDisplayedRefs, _branches.Count - MaximumDisplayedRefs); } _branchInfo = GetBranchesWhichContainsThisCommit(_branches, ShowBranchesAsLinks); } } string body = _revisionInfo; if (Revision != null && !Revision.IsArtificial()) { body += "\n" + _annotatedTagsInfo + _linksInfo + _branchInfo + _tagInfo; } RevisionInfo.SuspendLayout(); RevisionInfo.SetXHTMLText(body); RevisionInfo.SelectionStart = 0; //scroll up RevisionInfo.ScrollToCaret(); //scroll up RevisionInfo.ResumeLayout(true); }