Esempio n. 1
0
 async void load(string mid)
 {
     if (mid.Length == 0)
     {
         foreach (var item in await ContentServ.GetConAsync(1))
         {
             conlist.Items.Add(item);
             conlist2.Items.Add(item);
         }
     }
     else
     {
         foreach (var item in await ContentServ.GetFriendsCons(mid, 1))
         {
             conlist.Items.Add(item);
             conlist2.Items.Add(item);
         }
     }
     if (conlist.Items.Count < 20)
     {
         var text1 = Load.FindChildOfType <TextBlock>(conlist);
         text1.Text = "加载完毕!";
     }
     con.Text     += conlist.Items.Count == 0 ? "(暂无订阅)" : "";
     isConcernLoad = true;
 }
Esempio n. 2
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            mid  = e.Parameter.ToString();
            user = await ContentServ.GetUserinfoAsync(mid);

            Face.ImageSource = new BitmapImage {
                UriSource = new Uri(user.Face)
            };
            level.Source = new BitmapImage {
                UriSource = new Uri("ms-appx:///Assets//Others//lv" + user.Current_level + ".png", UriKind.Absolute)
            };
            exp_current.Text = user.Current_exp;
            toutu.Source     = new BitmapImage(new Uri("http://i0.hdslb.com/" + user.Toutu));
            birth.Text      += user.BirthDay;
            regdate.Text    += user.RegTime;
            sex.Text        += user.Sex;
            addr.Text       += user.Place.Length > 0 ? user.Place : "未知";
            if (user.Current_level == "6")
            {
                bar.Value = 100;
            }
            else
            {
                bar.Value      = int.Parse(user.Current_exp);
                bar.Maximum    = int.Parse(user.Next_exp);
                exp_total.Text = user.Next_exp;
            }
            userName.Text            = user.Name;
            user.Sign                = user.Sign;
            list_concern.ItemsSource = await ContentServ.GetFriendsAsync(mid);//以后得改

            list_videos.ItemsSource = await ContentServ.GetMyVideoAsync(mid, 1);

            conlist.ItemsSource = await ContentServ.GetFriendsCons(mid, 1);
        }