コード例 #1
0
 // App42 callback when Object is successfully loded.
 void App42Callback.OnSuccess(object response)
 {
     // App42Callback if social
     if (response is Social)
     {
         Social social = (Social)response;
         // Get All friends from social object.
         IList<Social.Friends> fbList = social.GetFriendList();
         for (int i = 0; i < fbList.Count; i++)
         {
             String id = fbList[i].GetId(); ;
             String name = fbList[i].GetName();
             String picture = fbList[i].GetPicture();
             Deployment.Current.Dispatcher.BeginInvoke(() =>
             {
                 FriendsList row = new FriendsList();
                 row.userName.Text = name;
                 row.userId.Text = id;
                 row.myimage.Source = (ImageSource)new ImageSourceConverter().ConvertFromString(picture);
                 // friend added in to list.
                 L1.Items.Add(row);
             });
         }
         Deployment.Current.Dispatcher.BeginInvoke(() =>
         {
             indicator.IsVisible = false;
         });
     }
 }
コード例 #2
0
 public App42Share(FriendsList fl)
 {
    uName = fl.userName.Text;
    uId = fl.userId.Text;
    currentPage = ((App)Application.Current).RootFrame.Content as PhoneApplicationPage;
 }