public DirectoryStreamViewModel(DirectoryImageStream model)
 {
     _model = model;
     _childNodes = new ObservableCollection<NavigationItem>();
     _childNodes.Add(_staticDummyNode);
     _hasDummyChild = true;
 }
 protected override void LoadItems(ICollection<IHostableImageStream> hostedItems)
 {
     var drives = System.IO.DriveInfo.GetDrives();
     foreach (var drive in drives)
     {
         if (drive.IsReady)
         {
             try
             {
                 var driveModel = new DirectoryImageStream(drive.Name, "*.jpg", null);
                 hostedItems.Add(driveModel);
             }
             catch (System.IO.IOException)
             {
             }
         }
     }
 }
 private void FillDrivesCollection()
 {
     var drives = DriveInfo.GetDrives();
     foreach (var drive in drives)
     {
         if (drive.IsReady)
         {
             var dirModel = new DirectoryImageStream(drive.Name, null);
             var sb = new StringBuilder(drive.Name);
             if (!String.IsNullOrWhiteSpace(drive.VolumeLabel))
             {
                 sb.AppendFormat(" [{0}]", drive.VolumeLabel);
             }
             dirModel.Name = sb.ToString();
             _drives.Add(new DirectoryStreamViewModel(dirModel));
         }
     }
 }
        protected override void LoadItems(ICollection <IHostableImageStream> hostedItems)
        {
            var drives = System.IO.DriveInfo.GetDrives();

            foreach (var drive in drives)
            {
                if (drive.IsReady)
                {
                    try
                    {
                        var driveModel = new DirectoryImageStream(drive.Name, "*.jpg", null);
                        hostedItems.Add(driveModel);
                    }
                    catch (System.IO.IOException)
                    {
                    }
                }
            }
        }