Created
February 8, 2014 05:53
-
-
Save eternaltung/8877222 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async void GetButton_Click(object sender, RoutedEventArgs e) | |
{ | |
try | |
{ | |
LiveOperationResult operationResult = await liveClient.GetAsync("me/skydrive/files"); | |
List<object> data = (List<object>)operationResult.Result["data"]; | |
FolderBox.Items.Clear(); | |
foreach (dynamic item in data) | |
{ | |
//將資料夾的ID記在Tag中方便做update和delete | |
FolderBox.Items.Add(new ListBoxItem() | |
{ | |
Content = item.name, | |
Tag = item.id | |
}); | |
} | |
} | |
catch (LiveConnectException ex) | |
{ | |
MessageDialog msg = new MessageDialog(ex.Message); | |
msg.ShowAsync(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment