Пример #1
0
        private async void LoadAlbum()
        {
            var data = await MusicLib.GetSingerAlbumById(Data.mSinger.Mid, AlbumIndex);

            foreach (var d in data)
            {
                var k = new FLGDIndexItem(d.ID, d.Name, d.Photo, 0)
                {
                    Margin = new Thickness(12, 0, 12, 20)
                };
                k.StarEvent += async(sx) =>
                {
                    await MusicLib.AddGDILikeAsync(sx.id);

                    Toast.Send("收藏成功");
                };
                k.Width        = 200;
                k.ImMouseDown += K_ImMouseDown;
                AlbumItemsList.Children.Add(k);
            }
            WidthUI(AlbumItemsList);
        }
Пример #2
0
        public async void Load()
        {
            mw.Cisv.ScrollChanged += Cisv_MusicListScrollChanged;
            LastPage        = TuiJianPage;
            SingerName.Text = Data.mSinger.Name;

            if (Data.HasBigPic)
            {
                mSingerBig.Background = new ImageBrush(await ImageCacheHelp.GetImageByUrl(Data.mSinger.Photo, new int[2] {
                    469, 1000
                }))
                {
                    Stretch = Stretch.UniformToFill
                }
            }
            ;
            else
            {
                TX.Background = new ImageBrush(await ImageCacheHelp.GetImageByUrl(Data.mSinger.Photo, new int[2] {
                    300, 300
                }));
            }

            FansCount.Text = "粉丝数:" + Data.FansCount;
            if (Data.HasGJ)
            {
                if (Data.HasBigPic)
                {
                    FanBt.Theme = 1;
                }
                else
                {
                    FanBt.Theme = 0;
                }
                FanBt.TName     = "已关注";
                FanBt.p.Stretch = Stretch.Uniform;
                FanBt.pData     = Geometry.Parse("M825.742222 376.035556l-349.866666 355.612444a45.169778 45.169778 0 0 1-64.568889 0L213.560889 530.602667a46.478222 46.478222 0 0 1-13.368889-32.768c0-25.6 20.48-46.364444 45.624889-46.364445 12.629333 0 24.064 5.233778 32.312889 13.653334l165.489778 168.106666 317.610666-322.844444a45.283556 45.283556 0 0 1 32.312889-13.539556 46.08 46.08 0 0 1 45.624889 46.364445 46.648889 46.648889 0 0 1-13.425778 32.824889z");
            }

            if (Data.liangxia.Count >= 1)
            {
                Lx_Img_1.Background = new ImageBrush(await ImageCacheHelp.GetImageByUrl(Data.liangxia[0].img, new int[2] {
                    60, 60
                }));
                Lx_Tit_1.Text = Data.liangxia[0].name;
                Lx_dat_1.Text = Data.liangxia[0].lstCount;
            }
            else
            {
                lx1.Visibility = Visibility.Hidden;
            }
            if (Data.liangxia.Count >= 2)
            {
                Lx_Img_2.Background = new ImageBrush(await ImageCacheHelp.GetImageByUrl(Data.liangxia[1].img, new int[2] {
                    60, 60
                }));
                Lx_Tit_2.Text = Data.liangxia[1].name;
                Lx_dat_2.Text = Data.liangxia[1].lstCount;
            }
            else
            {
                LiangxiaPi.Visibility = Visibility.Collapsed;
            }

            foreach (var c in Data.HotSongs)
            {
                mw.np = NowPage.SingerItem;
                var k = new DataItem(c, mw)
                {
                    Width = ActualWidth
                };
                if (k.music.MusicID == mw.MusicData.Data.MusicID)
                {
                    k.ShowDx();
                }
                k.GetToSingerPage += mw.K_GetToSingerPage;
                k.Play            += K_Play;
                k.Download        += mw.K_Download;
                HotMusicList.Items.Add(k);
            }

            int i = 0;

            NewAlbumList.Children.Clear();
            foreach (var c in Data.Album)
            {
                FLGDIndexItem f = new FLGDIndexItem(c.ID, c.Name, c.Photo, 0);
                f.Margin       = new Thickness(5, 0, 5, 0);
                f.ImMouseDown += F_MouseDown;
                Grid.SetColumn(f, i);
                i++;
                NewAlbumList.Children.Add(f);
            }

            NewMVList.Children.Clear();
            int ix = 0;

            foreach (var c in Data.mVDatas)
            {
                MVItem m = new MVItem();
                m.Margin = new Thickness(5, 0, 5, 0);
                Grid.SetColumn(m, ix);
                m.MouseDown += M_MouseDown;
                ix++;
                NewMVList.Children.Add(m);
                m.Data = c;
            }

            SimilarSingerList.Children.Clear();
            foreach (var c in Data.ssMs)
            {
                SingerItem m = new SingerItem(c)
                {
                    Height = 200,
                    Width  = 150,
                    Margin = new Thickness(20, 0, 0, 0)
                };
                m.MouseDown += mw.GetSinger;
                SimilarSingerList.Children.Add(m);
            }
            Finished();
        }