Example #1
0
        private async Task <int> AddNewBangumiPage()
        {
            var            url = AcFunAPI.GetHomeBangumiUrl();
            NewBangumiData nbd = new NewBangumiData();
            await nbd.GetData(url);

            NewBangumiGridView.ItemsSource = nbd.ListOfACContent;
            return(0);
        }
Example #2
0
        private async void CategorySelec()
        {
            string         url;
            NewBangumiData nbd = new NewBangumiData();

            if (CateisTV)
            {
                url      = AcFunAPI.GetHomenominateUrl(GetWeekTime());
                nbd.isTV = true;
            }
            else
            {
                url = AcFunAPI.GetHomeBangumiUrl(GetWeekTime());
            }


            await nbd.GetData(url);

            NewBangumiGridView.ItemsSource = nbd.ListOfACContent;
        }
Example #3
0
        private async void Category_Tapped(object sender, TappedRoutedEventArgs e)
        {
            var    grid       = sender as Grid;
            string SelectText = "";

            if (grid != null)
            {
                foreach (Grid item in Category.Children)
                {
                    if (item != grid)
                    {
                        item.BorderThickness = new Thickness(0);
                        var temp = item.Children[0] as TextBlock;
                        temp.Foreground = ACCOLOR.colorWith(Colors.Black);
                    }
                    else
                    {
                        item.BorderThickness = new Thickness(1);
                        var temp = item.Children[0] as TextBlock;
                        temp.Foreground = ACCOLOR.ACDEEPBLU;
                        SelectText      = temp.Text;
                    }
                }
            }

            if (SelectText == "剧集")
            {
                CateisTV = true;
            }
            else
            {
                CateisTV = false;
                var            url = AcFunAPI.GetHomeBangumiUrl();
                NewBangumiData nbd = new NewBangumiData();
                await nbd.GetData(url);

                NewBangumiGridView.ItemsSource = nbd.ListOfACContent;
            }

            CategorySelec();
        }