Beispiel #1
0
 protected FileSystemEntryViewModel(
     ISourceExplorerViewModelHost host,
     TreeViewItemViewModel parentViewModel,
     bool lazyLoadChildren)
     : base(host, parentViewModel, lazyLoadChildren)
 {
 }
Beispiel #2
0
 protected FileSystemEntryViewModel(
     ISourceExplorerViewModelHost host,
     TreeViewItemViewModel parentViewModel,
     bool lazyLoadChildren)
     : base(host, parentViewModel, lazyLoadChildren)
 {
 }
        public static IEnumerable<TreeViewItemViewModel> CreateViewModels(ISourceExplorerViewModelHost host, FileEntryViewModel parent, FileSystemEntryData data)
        {
            var positionsData = data as FilePositionsData;
              if (positionsData != null)
            return positionsData.Positions.Select(x => new FilePositionViewModel(host, parent, x));

              return Enumerable.Empty<TreeViewItemViewModel>();
        }
Beispiel #4
0
 public static FileSystemEntryViewModel Create(ISourceExplorerViewModelHost host, TreeViewItemViewModel parentViewModel, FileSystemEntry fileSystemEntry)
 {
     var fileEntry = fileSystemEntry as FileEntry;
       if (fileEntry != null)
     return new FileEntryViewModel(host, parentViewModel, fileEntry);
       else
     return new DirectoryEntryViewModel(host, parentViewModel, (DirectoryEntry)fileSystemEntry);
 }
 public SourceExplorerItemViewModelBase(
     ISourceExplorerViewModelHost host,
     TreeViewItemViewModel parent,
     bool lazyLoadChildren)
     : base(host.StandarImageSourceFactory, parent, lazyLoadChildren)
 {
     _host = host;
 }
 public SourceExplorerItemViewModelBase(
     ISourceExplorerViewModelHost host,
     TreeViewItemViewModel parent,
     bool lazyLoadChildren)
     : base(host.StandarImageSourceFactory, parent, lazyLoadChildren)
 {
     _host = host;
 }
Beispiel #7
0
 public DirectoryEntryViewModel(
     ISourceExplorerViewModelHost host,
     TreeViewItemViewModel parentViewModel,
     DirectoryEntry directoryEntry)
     : base(host, parentViewModel, directoryEntry.Entries.Count > 0)
 {
     _directoryEntry = directoryEntry;
       _children = new Lazy<IList<TreeViewItemViewModel>>(CreateChildren);
 }
 public DirectoryEntryViewModel(
     ISourceExplorerViewModelHost host,
     TreeViewItemViewModel parentViewModel,
     DirectoryEntry directoryEntry)
     : base(host, parentViewModel, directoryEntry.Entries.Count > 0)
 {
     _directoryEntry = directoryEntry;
     _children       = new Lazy <IList <TreeViewItemViewModel> >(CreateChildren);
 }
        public static IEnumerable <TreeViewItemViewModel> CreateViewModels(ISourceExplorerViewModelHost host, FileEntryViewModel parent, FileSystemEntryData data)
        {
            var positionsData = data as FilePositionsData;

            if (positionsData != null)
            {
                return(positionsData.Positions.Select(x => new FilePositionViewModel(host, parent, x)));
            }

            return(Enumerable.Empty <TreeViewItemViewModel>());
        }
Beispiel #10
0
        public static FileSystemEntryViewModel Create(ISourceExplorerViewModelHost host, TreeViewItemViewModel parentViewModel, FileSystemEntry fileSystemEntry)
        {
            var fileEntry = fileSystemEntry as FileEntry;

            if (fileEntry != null)
            {
                return(new FileEntryViewModel(host, parentViewModel, fileEntry));
            }
            else
            {
                return(new DirectoryEntryViewModel(host, parentViewModel, (DirectoryEntry)fileSystemEntry));
            }
        }
Beispiel #11
0
 public void SetHost(ISourceExplorerViewModelHost sourceExplorerViewModelHost)
 {
     _sourceExplorerViewModelHost = sourceExplorerViewModelHost;
 }
 public FilePositionViewModel(ISourceExplorerViewModelHost host, FileEntryViewModel parentFile, FilePositionSpan position)
     : base(host, parentFile, false)
 {
     _parentFile = parentFile;
       _position = position;
 }
 public void SetHost(ISourceExplorerViewModelHost sourceExplorerViewModelHost)
 {
     _sourceExplorerViewModelHost = sourceExplorerViewModelHost;
 }
Beispiel #14
0
 public FilePositionViewModel(ISourceExplorerViewModelHost host, FileEntryViewModel parentFile, FilePositionSpan position)
     : base(host, parentFile, false)
 {
     _parentFile = parentFile;
     _position   = position;
 }
Beispiel #15
0
 public FileEntryViewModel(ISourceExplorerViewModelHost host, TreeViewItemViewModel parentViewModel, FileEntry fileEntry)
     : base(host, parentViewModel, fileEntry.Data != null)
 {
     _fileEntry = fileEntry;
       _children = new Lazy<IList<TreeViewItemViewModel>>(CreateChildren);
 }
 public FileEntryViewModel(ISourceExplorerViewModelHost host, TreeViewItemViewModel parentViewModel, FileEntry fileEntry)
     : base(host, parentViewModel, fileEntry.Data != null)
 {
     _fileEntry = fileEntry;
     _children  = new Lazy <IList <TreeViewItemViewModel> >(CreateChildren);
 }