Example #1
0
        private void CategoryPart_Tapped(object sender, TappedRoutedEventArgs e)
        {
            var grid = sender as Grid;

            if (grid != null)
            {
                foreach (Grid item in CategoryPart.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;
                        CateTimeSelect  = temp.Text;
                    }
                }
            }
            CategorySelec();
        }
Example #2
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();
        }
Example #3
0
        private async Task <bool> AddComment()
        {
            try
            {
                ACCommentData accd = new ACCommentData();
                await accd.GetData(AcFunAPI.GetCommentUrl(_SeleCContent.ContentId, 1));

                var sp = accd.GetCommentView(0);
                CommentPivot.Content = sp;
            }
            catch (Exception)
            {
                //todo
                var tb = new TextBlock();
                tb.Text              = "评论获取失败!";
                tb.Foreground        = ACCOLOR.colorWith(Colors.Black);
                tb.FontSize          = 20;
                CommentPivot.Content = tb;
                //  CommentPivot.Visibility = Visibility.Collapsed;
                return(false);
            }
            return(true);
        }