public void ClearMemory() { BookTitle = null; BookID = 0; if (TOCNodeList != null) { TOCNodeList.Clear(); } if (RootNodeList != null) { RootNodeList.Clear(); } CurrentLevel = 1; CurrentLeafNode = null; CurrentHighlight = 1; CurrentTocID = -1; StartTocID = 0; EndTocID = 0; if (SearchTermWordList != null) { SearchTermWordList.Clear(); } if (SearchKeyWordList != null) { SearchKeyWordList.Clear(); } CurrentSearchContent = null; CurrentSearchHeader = null; }
public void UpdateSearchMatchWordList(List <string> termList, List <string> keywordList, string searchContent, string searchHeader) { // if (SearchTermWordList == null) { SearchTermWordList = new List <string> (); } SearchTermWordList.Clear(); if (termList != null) { SearchTermWordList.AddRange(termList); } // if (SearchKeyWordList == null) { SearchKeyWordList = new List <string> (); } SearchKeyWordList.Clear(); if (keywordList != null) { SearchKeyWordList.AddRange(keywordList); } // string newString = string.Empty; char [] param = { '.' }; if (searchContent != null) { newString = searchContent.Trim(param); } this.CurrentSearchContent = newString; // string newTitle = string.Empty; if (searchHeader != null) { newTitle = searchHeader.Trim(param); } this.CurrentSearchHeader = newTitle.Trim(); }