public async Task <bool> CreateTree(TreeView treeView) { bool returnValue = false; try { foreach (var drv in await _filesystem.GetDrives()) { var fChild = new TreeNode(); if (drv.Value == DriveType.CDRom) { fChild.ImageIndex = 1; fChild.SelectedImageIndex = 1; fChild.Tag = drv.Key; } else if (drv.Value == DriveType.Fixed) { fChild.ImageIndex = 0; fChild.SelectedImageIndex = 0; fChild.Tag = drv.Key; } fChild.Text = drv.Key; fChild.Nodes.Add(""); treeView.Nodes.Add(fChild); returnValue = true; } } catch (Exception e) { returnValue = false; } return(returnValue); }