Пример #1
0
        public bool SetBookList(string html)
        {
            if (!string.IsNullOrEmpty(html))
            {
                ObservableCollection <BookEntity>[] arraryList = AnalysisSoduService.GetHomePageBookList(html);
                if (arraryList == null)
                {
                    return(false);
                }
                else
                {
                    if (arraryList[1] == null)
                    {
                        return(false);
                    }
                    this.RecommendBookList.Clear();
                    foreach (var item in arraryList[1])
                    {
                        this.RecommendBookList.Add(item);
                    }

                    this.HotBookList.Clear();
                    foreach (var item in arraryList[2])
                    {
                        this.HotBookList.Add(item);
                    }
                    return(true);
                }
            }
            return(false);
        }