Esempio n. 1
0
        private void AppendNewWord(ref HtmlAgilityPack.HtmlDocument newDoc, string word, WordMatcher matcher, StatisticsDataSet.HighlightStatisticsRow statisticsRow = null)
        {
            HighlightWord matchedWord = null;
            if (matcher.Match(word, out matchedWord))
            {
                HtmlNode span = newDoc.CreateElement("span");
                span.SetAttributeValue("style", matchedWord.Style);
                span.InnerHtml = word;
                newDoc.DocumentNode.ChildNodes.Append(span);

                //if (statisticsRow != null)
                //{
                //    frmStatistics.HighlightStaticsticIncrease(statisticsRow, matchedWord);
                //}
            }
            else
            {
                AppendSimpleWord(ref newDoc, word);
            }
        }