コード例 #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
ファイル: DatabaseView.cs プロジェクト: paukr/auremo
        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
ファイル: MainWindow.xaml.cs プロジェクト: paukr/auremo
 private void AssociateTreeAndController(TreeView tree, HierarchyController controller)
 {
     tree.Tag = controller;
 }