0
개인 무효 라인 아래이에서 (개체를 보낸 사람, RoutedEventArgs e)에 {데이터베이스 파일 스카이 드라이브에서 오류를 복원
string id = string.Empty;
client.GetCompleted += (obj, args) =>
{
List<object> items = args.Result["data"] as List<object>;
foreach (object item in items)
{
Dictionary<string, object> file = item as Dictionary<string, object>;
if (file["name"].ToString() == "Expensemanager.bak")
{
id = file["id"].ToString();
}
}
client.DownloadCompleted += (o, a) =>
{
Stream stream = a.Result;
using (IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForApplication())
{
var fileToSave = new IsolatedStorageFileStream("expanseManager.sdf", FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None, storage);
stream.CopyTo(fileToSave);
stream.Flush();
stream.Close();
}
};
client.DownloadAsync(string.Format("{0}/content", id));
};
client.GetAsync("me/skydrive/files");
}
오류 ... 작동하지 OnRestoreClicked 격리 된 저장소에서 허용됩니다.
var fileToSave = new IsolatedStorageFileStream ("expanseManager.sdf", FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None, storage);
감사합니다. Alaa :) –