Beispiel #1
0
        public async Task <driveList> getFileInfo(drive thisDrive)
        {
            driveList resultList = null;

            try
            {
                LiveOperationResult result = await this.liveConnectClient.GetAsync(string.Concat(thisDrive.id, "/files"));

                JavaScriptSerializer ser = new JavaScriptSerializer();
                resultList = ser.Deserialize <driveList>(result.RawResult);
                return(resultList);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return(resultList);
            }
        }
Beispiel #2
0
        public async void updateTree()
        {
            try
            {
                LiveOperationResult res = await this.liveConnectClient.GetAsync("me/skydrive/files");

                JavaScriptSerializer ser           = new JavaScriptSerializer();
                driveList            rootDriveList = ser.Deserialize <driveList>(res.RawResult);
                drive Rootdrive = new drive();
                Rootdrive.name = "root";
                Rootdrive.id   = "me/skydrive";

                treeView1.TopNode = new TreeNode();

                recursiveExplorer(this.treeView1.TopNode, Rootdrive);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }