Пример #1
0
        public async static Task<List<SkyDriveEntity>> GetFolderContents(LiveConnectSession session, string folderId)
        {
            try
            {
                LiveConnectClient client = new LiveConnectClient(session);
                LiveOperationResult result = await client.GetAsync(folderId + "/files");

                //clear entries in data
                data.Clear();

                List<object> container = (List<object>)result.Result["data"];
                foreach (var item in container)
                {
                    SkyDriveEntity entity = new SkyDriveEntity();

                    IDictionary<string, object> dictItem = (IDictionary<string, object>)item;
                    string type = dictItem["type"].ToString();
                    entity.IsFolder = type == "folder" || type == "album" ? true : false;
                    entity.ID = dictItem["id"].ToString();
                    entity.Name = dictItem["name"].ToString();
                    data.Add(entity);
                }
                return null;
            }
            catch
            {
                return null;
            }
        }
Пример #2
0
        private void PlaylistSelector_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            selectedItem = (SkyDriveEntity)(this.PlaylistSelector.SelectedItem);
            bool ans = NavigationService.Navigate(new Uri("/Page1.xaml", UriKind.Relative));
            

        }