Ejemplo n.º 1
0
        private async void GetBg()
        {
            try
            {
                wc = new WebClientClass();
                string results = await wc.GetResults(new Uri("http://space.bilibili.com/ajax/topphoto/getlist?mid=" + Uid));

                BGModel bgm = JsonConvert.DeserializeObject <BGModel>(results);
                if (bgm.status)
                {
                    var fist = bgm.data.First(x => x.is_disable == 0);
                    if (fist != null && fist.l_img.Length != 0)
                    {
                        img_bg.ImageSource = new BitmapImage(new Uri("http://i0.hdslb.com/" + fist.l_img));
                    }
                }
            }
            catch (Exception)
            {
                //throw;
            }
        }
Ejemplo n.º 2
0
 public void Init(BGModel model)
 {
     InitBGList();
 }