/// <summary>
        /// 获取目录页数据入口方法
        /// </summary>
        /// <param name="catalog"></param>
        public void InitCatalogsData(BookCatalog catalog)
        {
            Task.Run(() =>
            {
                if (CurrentBook == null || catalog?.CatalogUrl == null)
                {
                    return;
                }

                if (CurrentBook.IsLocal || CurrentBook.IsTxt)
                {
                    SetLocalBookCatalogsData(catalog);
                }
                else
                {
                    SetOnlineBookCatalogsData(AnalisysSourceHelper.GetCatalogPageUrl(catalog.CatalogUrl));
                }
            });
        }
        public void CheckUpdate()
        {
            if (CurrentBook.IsTxt)
            {
                return;
            }

            if (CurrentBook.IsOnline)
            {
                Task.Run(async() =>
                {
                    try
                    {
                        var catalogPageUrl = AnalisysSourceHelper.GetCatalogPageUrl(CurrentBook.NewestChapterUrl);
                        var catalogData    = await AnalisysSourceHelper.GetCatalogPageData(catalogPageUrl, CurrentBook.BookId);

                        var lastWebCatalog = catalogData?.Item1?.LastOrDefault();

                        if (lastWebCatalog == null)
                        {
                            return;
                        }

                        if (lastWebCatalog.CatalogUrl == CurrentBook.NewestChapterUrl)
                        {
                            return;
                        }
                        DispatcherHelper.CheckBeginInvokeOnUI(() =>
                        {
                            CurrentBook.IsNew             = true;
                            CurrentBook.NewestChapterName = lastWebCatalog.CatalogName;
                            CurrentBook.NewestChapterUrl  = lastWebCatalog.CatalogUrl;
                            ViewModelInstance.Instance.LocalBookPage.InserOrUpdateBook(CurrentBook);
                        });
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine(e);
                    }
                }).ContinueWith((result) =>
                {
                    if (IsDeleted)
                    {
                        return;
                    }
                });
            }

            else if (CurrentBook.IsLocal)
            {
                Task.Run(async() =>
                {
                    try
                    {
                        var localCatalogs = DbLocalBook.SelectBookCatalogsByBookId(AppDataPath.GetLocalBookDbPath(),
                                                                                   CurrentBook.BookId);

                        var localLastCatalog = localCatalogs.LastOrDefault();

                        if (localLastCatalog != null)
                        {
                            DispatcherHelper.CheckBeginInvokeOnUI(() =>
                            {
                                CurrentBook.NewestChapterName = localLastCatalog.CatalogName;
                                CurrentBook.NewestChapterUrl  = localLastCatalog.CatalogUrl;
                            });
                        }

                        var catalogPageUrl = AnalisysSourceHelper.GetCatalogPageUrl(CurrentBook.NewestChapterUrl);
                        var catalogData    = await AnalisysSourceHelper.GetCatalogPageData(catalogPageUrl, CurrentBook.BookId);

                        var lastWebCatalog = catalogData?.Item1?.LastOrDefault();

                        if (lastWebCatalog == null)
                        {
                            return;
                        }

                        if (localCatalogs == null || localCatalogs.Count == 0)
                        {
                            NeedUpdateCatalogs = catalogData.Item1;
                        }

                        if (localLastCatalog == null)
                        {
                            return;
                        }

                        if (lastWebCatalog.CatalogUrl == localLastCatalog.CatalogUrl)
                        {
                            return;
                        }

                        var tempCatalog    = catalogData.Item1.LastOrDefault(p => p.CatalogUrl == localLastCatalog.CatalogUrl);
                        var tempList       = catalogData.Item1.Skip(tempCatalog.Index).ToList();
                        NeedUpdateCatalogs = tempList;
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine(e);
                    }
                    finally
                    {
                        DispatcherHelper.CheckBeginInvokeOnUI(() =>
                        {
                            NeedUpdateCount = NeedUpdateCatalogs == null ? "" : NeedUpdateCatalogs?.Count.ToString();
                        });
                    }
                }).ContinueWith((result) =>
                {
                    if (IsDeleted)
                    {
                        return;
                    }

                    if (NeedUpdateCatalogs == null || NeedUpdateCatalogs.Count == 0)
                    {
                        return;
                    }

                    DispatcherHelper.CheckBeginInvokeOnUI(() =>
                    {
                        NeedUpdateCount = NeedUpdateCatalogs.Count.ToString();

                        CurrentBook.IsNew             = true;
                        CurrentBook.NewestChapterName = NeedUpdateCatalogs.LastOrDefault()?.CatalogName;
                        CurrentBook.NewestChapterUrl  = NeedUpdateCatalogs.LastOrDefault()?.CatalogUrl;
                        DbLocalBook.InsertOrUpdatBook(AppDataPath.GetLocalBookDbPath(), CurrentBook);
                    });

                    StartUpdate();
                });
            }
        }