示例#1
0
        public void CreateHyperlink(HyperlinkType linkType, int startIndex, int endIndex)
        {
            List <TextSegment> segmentList = new List <TextSegment>();
            String             linkText    = tweetBlob.RawText.Substring(startIndex, endIndex - startIndex);

            tweetBlob.CreateSubstringSegments(startIndex, endIndex, ref segmentList);

            if (segmentList.Count > 0)
            {
                Hyperlink newLink = new Hyperlink(linkText, segmentList, linkType, startIndex, endIndex);
                hyperlinkList.Add(newLink);
            }

            // Sort the list after the new entry
            hyperlinkList.Sort(CompareLinksbyStartIndex);
        }