void GetDrivers()
 {
     foreach (var item in DriveInfo.GetDrives())
     {
         DriveItems.Add(new DriveModel {
             Title = item.Name
         });
     }
 }
Beispiel #2
0
        private async void LoadChildren(IList <DriveItem> items)
        {
            DriveItems.Clear();
            // Load the children
            foreach (var obj in items)
            {
                MyDriveItem myDriveItem = new MyDriveItem
                {
                    DriveItem = obj
                };
                try
                {
                    var thumb = await graphClient.Drive.Items[obj.Id].Thumbnails["0"]["large"].Request().GetAsync();
                    myDriveItem.ThumbnailUrl = thumb.Url;
                }
                catch
                {
                }

                DriveItems.Add(myDriveItem);
            }
        }