예제 #1
0
 /// <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);
 }
예제 #2
0
 /// <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);
 }
예제 #3
0
        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);
        }
예제 #4
0
 private void AssociateTreeAndController(TreeView tree, HierarchyController controller)
 {
     tree.Tag = controller;
 }