/// <summary> /// Create a root node. /// </summary> public HierarchicalLibraryItem(LibraryItem item, HierarchyController controller) { Item = item; Parent = null; Children = new ObservableCollection<HierarchicalLibraryItem>(); Controller = controller; Id = -1; HighestChildId = -1; Controller.RootLevelNodes.Add(this); }
/// <summary> /// Create a root node. /// </summary> public HierarchicalLibraryItem(LibraryItem item, HierarchyController controller) { Item = item; Parent = null; Children = new ObservableCollection <HierarchicalLibraryItem>(); Controller = controller; Id = -1; HighestChildId = -1; Controller.RootLevelNodes.Add(this); }
public DatabaseView(DataModel dataModel) { m_DataModel = dataModel; Artists = new ObservableCollection<IndexedLibraryItem>(); AlbumsBySelectedArtists = new ObservableCollection<IndexedLibraryItem>(); SongsOnSelectedAlbumsBySelectedArtists = new ObservableCollection<IndexedLibraryItem>(); Genres = new ObservableCollection<IndexedLibraryItem>(); AlbumsOfSelectedGenres = new ObservableCollection<IndexedLibraryItem>(); SongsOnSelectedAlbumsOfSelectedGenres = new ObservableCollection<IndexedLibraryItem>(); ArtistTree = new ObservableCollection<HierarchicalLibraryItem>(); ArtistTreeController = new HierarchyController(ArtistTree); GenreTree = new ObservableCollection<HierarchicalLibraryItem>(); GenreTreeController = new HierarchyController(GenreTree); DirectoryTree = new ObservableCollection<HierarchicalLibraryItem>(); DirectoryTreeController = new HierarchyController(DirectoryTree); m_DataModel.Database.PropertyChanged += new PropertyChangedEventHandler(OnDatabasePropertyChanged); }
private void AssociateTreeAndController(TreeView tree, HierarchyController controller) { tree.Tag = controller; }