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; } }
public void Init(BGModel model) { InitBGList(); }