Пример #1
0
        private void GetLoggedInUserDetails(string userid)
        {
            //GET LOGGED IN USER DETAILS
            _flickr.PeopleGetInfoAsync(userid, new Action <FlickrResult <Person> >(p =>
            {
                if (!p.HasError)
                {
                    flickr_Person = p.Result;
                    Dispatcher.RunAsync(
                        Windows.UI.Core.CoreDispatcherPriority.High,
                        new Windows.UI.Core.DispatchedHandler(() =>
                    {
                        //imgUser.Source = new BitmapImage(new Uri(p.Result.BuddyIconUrl));
                        //brdAvatar.Opacity = 1;

                        //lblName.Text = p.Result.UserName;

                        //spLogin.Visibility = Visibility.Collapsed;
                        //spLoggedIn.Visibility = Visibility.Visible;

                        //lblProject.Visibility = Visibility.Visible;
                    })
                        );
                }
            }));


            //GET LOGGED IN USERS PUBLIC PICTURES
            _flickr.PeopleGetPublicPhotosAsync(userid, new Action <FlickrResult <PhotoCollection> >(pc =>
            {
                if (!pc.HasError)
                {
                    PersonPhotos = pc.Result;


                    Dispatcher.RunAsync(
                        Windows.UI.Core.CoreDispatcherPriority.High,
                        new Windows.UI.Core.DispatchedHandler(() =>
                    {
                        //lbPhotos.ItemsSource = PersonPhotos;
                    })
                        );
                }
            }));
        }