Exemplo n.º 1
0
        private async void LoadProfile()
        {
            LiveConnectClient client = new LiveConnectClient(App.Session);
            LiveOperationResult liveOpResult = await client.Get("me");
            dynamic dynResult = liveOpResult.Result;
            this.txtUserName.Text = dynResult.name;

            liveOpResult = await client.Get("me/picture");
            dynResult = liveOpResult.Result;
            this.imgProfile.Source = new BitmapImage(new Uri(dynResult.location)); 
        }
Exemplo n.º 2
0
        private async Task<IEnumerable<LiveFileOrFolder>> GetFilesOrFolders(LiveConnectClient client, string queryUrl)
        {
            var queryResult = await client.Get(queryUrl);

            var folders = JsonConvert.DeserializeObject<LiveFileResult>(queryResult.RawResult);

            return folders.data;
        }
Exemplo n.º 3
0
        internal async void LoadData()
        {
            LiveConnectClient client = new LiveConnectClient(App.Session);
            LiveOperationResult albumOperationResult = await client.Get("me/albums");
            dynamic albumResult = albumOperationResult.Result;
            foreach (dynamic album in albumResult.data)
            {
                var group = new SkyDriveAlbum(album.id, album.name, album.name, @"ms-appx:///Assets/DarkGray.png", album.description);
                LiveOperationResult pictureOperationResult = await client.Get(album.id + "/files");
                dynamic pictureResult = pictureOperationResult.Result;
                foreach (dynamic picture in pictureResult.data)
                {
                    var pictureItem = new SkyDriveFileItem(picture.id, picture.name, picture.name, picture.source, picture.description, picture.description, group);
                    group.Items.Add(pictureItem);
                }
                this.ItemGroups.Add(group);
            }

        }