示例#1
0
 public MusicPageViewModel(IContext context)
     : base(context)
 {
     Importer = Context.Services.Utilise <ImporterService>();
     Player   = Context.Services.Utilise <PlayerService>();
     Player.Start();
 }
示例#2
0
        public LibraryPageViewModel(IContext context)
            : base(context)
        {
            Importer = Context.Services.Utilise <ImporterService>();
            Player   = Context.Services.Utilise <PlayerService>();

            Folders = new BindableCollection <LibraryFolder>();
            Folders.Add(new LibraryFolder("Now Playing", Player.CurrentPlaylist.ToList()));
            Folders.Add(new LibraryFolder("All Tracks", Player.TracksCollection));
            Folders.Add(new LibraryFolder("Recent", Player.GetRecentTracks()));
            Folders.Add(new LibraryFolder("Unheard", Player.GetUnheardTracks()));
            Folders.Add(new LibraryFolder("Favourites", Player.GetFavouriteTracks()));

            _searchFolder = new LibraryFolder("Search", null, isEnabled: false);
            Folders.Add(_searchFolder);

            Folders.Refresh();
        }