public DriveViewModel(DriveModel newDrive) : base(newDrive.DiskInfo.Name) { _Initialize(newDrive); }
private void _Initialize(DriveModel newDrive) { Name = newDrive.DiskInfo.Name; _FSysWatcher.Created += OnItemCreated; _FSysWatcher.Deleted += OnItemDeleted; _FSysWatcher.Renamed += OnItemRenamed; //_FSysWatcher.Changed += OnItemChanged; _FSysWatcher.Path = Name; _FSysWatcher.NotifyFilter = NotifyFilters.FileName | NotifyFilters.Attributes | NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.Security | NotifyFilters.Size | NotifyFilters.CreationTime | NotifyFilters.DirectoryName; _FSysWatcher.EnableRaisingEvents = true; _FSysWatcher.IncludeSubdirectories = true; }