/// <inheritdoc/>
        public virtual void SetCDRomDrivesDisabled()
        {
            ActivatableDriveType driveTypeCDRom = this.GetActivatableDriveTypeByDriveType(DriveType.CDRom);

            driveTypeCDRom.IsActive = false;
            this.UpdateDrivesVisibility(DriveType.CDRom, driveTypeCDRom);
        }
        /// <inheritdoc/>
        public virtual void SetFixedDrivesDisabled()
        {
            ActivatableDriveType driveTypeFixed = this.GetActivatableDriveTypeByDriveType(DriveType.Fixed);

            driveTypeFixed.IsActive = false;
            this.UpdateDrivesVisibility(DriveType.Fixed, driveTypeFixed);
        }
        /// <inheritdoc/>
        public virtual void SetUnknownDrivesDisabled()
        {
            ActivatableDriveType driveTypeUnknown = this.GetActivatableDriveTypeByDriveType(DriveType.Unknown);

            driveTypeUnknown.IsActive = false;
            this.UpdateDrivesVisibility(DriveType.Unknown, driveTypeUnknown);
        }
        /// <inheritdoc/>
        public virtual void SetRemovableDrivesDisabled()
        {
            ActivatableDriveType driveTypeRemovable = this.GetActivatableDriveTypeByDriveType(DriveType.Removable);

            driveTypeRemovable.IsActive = false;
            this.UpdateDrivesVisibility(DriveType.Removable, driveTypeRemovable);
        }
        /// <inheritdoc/>
        public virtual void SetRamDrivesEnabled()
        {
            ActivatableDriveType driveTypeRam = this.GetActivatableDriveTypeByDriveType(DriveType.Ram);

            driveTypeRam.IsActive = true;
            this.UpdateDrivesVisibility(DriveType.Ram, driveTypeRam);
        }
        /// <inheritdoc/>
        public virtual void SetNoRootDirectoryDrivesDisabled()
        {
            ActivatableDriveType driveTypeNoRootDirectory = this.GetActivatableDriveTypeByDriveType(DriveType.NoRootDirectory);

            driveTypeNoRootDirectory.IsActive = false;
            this.UpdateDrivesVisibility(DriveType.NoRootDirectory, driveTypeNoRootDirectory);
        }
        /// <inheritdoc/>
        public virtual void SetNetworkDrivesDisabled()
        {
            ActivatableDriveType driveTypeNetwork = this.GetActivatableDriveTypeByDriveType(DriveType.Network);

            driveTypeNetwork.IsActive = false;
            this.UpdateDrivesVisibility(DriveType.Network, driveTypeNetwork);
        }
 private void UpdateDrivesVisibility(DriveType driveType, ActivatableDriveType activatableDriveType)
 {
     foreach (var drive in this.ExplorerTreeVM.Drives)
     {
         if (drive.DriveType == driveType)
         {
             drive.SetVisibleOrCollapsedAccordingToIsActiveFrom(activatableDriveType);
         }
     }
 }
        private void InitActivatableDriveTypes()
        {
            this.ActivatableDriveTypes = new List <ActivatableDriveType>();

            foreach (string driveType in Enum.GetNames(typeof(DriveType)))
            {
                ActivatableDriveType activatableDriveType = new ActivatableDriveType();
                activatableDriveType.DriveType = (DriveType)Enum.Parse(typeof(DriveType), driveType);
                this.ActivatableDriveTypes.Add(activatableDriveType);
            }
        }