Skip to content

Instantly share code, notes, and snippets.

@eternaltung
Created February 8, 2014 05:52
Show Gist options
  • Save eternaltung/8877218 to your computer and use it in GitHub Desktop.
Save eternaltung/8877218 to your computer and use it in GitHub Desktop.
private async void CreateButton_Click(object sender, RoutedEventArgs e)
{
try
{
Dictionary<string, object> newfolder = new Dictionary<string, object>();
newfolder.Add("name", "testfolder"); //testfolder是要建立的資料夾名稱
LiveOperationResult operationresult = await liveClient.PostAsync("me/skydrive", newfolder);
MessageDialog msg = new MessageDialog(string.Format("FolderName:{0}\nID:{1}",
operationresult.Result["name"],
operationresult.Result["id"]
));
await msg.ShowAsync();
}
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