/// <summary> /// /// </summary> /// <param name="htmlText"></param> /// <param name="searchText"></param> /// <param name="count">The current count the search has reached</param> /// <returns>Json with html and count</returns> public string HighlightHtml(string htmlText, string searchText, int count) { var config = new BgConfig(); var stemmer = new BgStemmer(); List <TextPosition> highlightPositions = this.GetHighlightPositions(htmlText, config, stemmer, searchText, false); string jsonHtmlAndCount = this.AppendHighlights(htmlText, highlightPositions, count); return(jsonHtmlAndCount); }
public bool LoadScene(string fileName, BgConfig config) { Clear(); if (string.IsNullOrEmpty(fileName) || config == null) { return(false); } m_ImgLib = new ImageLibrary(Is32BitPallet); if (!m_ImgLib.LoadScene(fileName, config)) { return(false); } LoadOk = true; return(true); }