Ejemplo n.º 1
0
        public RootDirectoryViewModel() : base(new NativeDirectoryInfo(), null)
        {
            var nativeSubDirectoryProvider = new NativeSubDirectoryProvider((NativeDirectoryInfo)NativeSystemInfo, this);
            var nativeFilesProvider        = new NativeFilesProvider(null, this);

            DisplayName    = NativeSystemInfo.DisplayName;
            Path           = NativeSystemInfo.Path;
            HasItems       = true;
            VisualPath     = DisplayName;
            SubDirectories = new AsyncLoadCollection <IDirectoryViewModel>(nativeSubDirectoryProvider);
            Files          = new AsyncLoadCollection <ISystemObjectViewModel>(nativeFilesProvider);
            IsExpanded     = true;
            IsSelected     = true;
            Children       = new UnionCollectionEx <IDirectoryViewModel, ISystemObjectViewModel, ISystemObjectViewModel>(SubDirectories, Files);
        }
 public RootDirectoryViewModel()
     : base(new NativeDirectoryInfo(),null)
 {
     var nativeSubDirectoryProvider = new NativeSubDirectoryProvider((NativeDirectoryInfo)NativeSystemInfo, this);
     var nativeFilesProvider = new NativeFilesProvider(null,this);
     DisplayName = NativeSystemInfo.DisplayName;
     Path = NativeSystemInfo.Path;
     HasItems = true;
     VisualPath = DisplayName;
     SubDirectories = new AsyncLoadCollection<IDirectoryViewModel>(nativeSubDirectoryProvider);
     Files = new AsyncLoadCollection<ISystemObjectViewModel>(nativeFilesProvider);
     IsExpanded = true;
     IsSelected = true;
     Children = new UnionCollectionEx<IDirectoryViewModel, ISystemObjectViewModel, ISystemObjectViewModel>(SubDirectories, Files);
 }