Ejemplo n.º 1
0
 public Track(RawTrack trackinfo, Album album, Artist artist)
 {
     _file = trackinfo.File;
     Album = album;
     Artist = artist;
     Title = trackinfo.TrackTitle;
     Tracknumber = trackinfo.TrackNumberUnknown ? (int?) null : trackinfo.TrackNumber;
     Model = trackinfo;
 }
Ejemplo n.º 2
0
        public AlbumViewModel(Album album)
        {
            _events = IoC.Get<IEventAggregator>();
            _windowManager = IoC.Get<IWindowManager>();
            Model = album;
            Tracks = new ReactiveList<TrackViewModel>();
            Tracks.AddRange(album.Tracks.Select(x => new TrackViewModel(x)));

            AddAlbumToPlaylistCommand = new ReactiveCommand();
            AddAlbumToPlaylistCommand.Subscribe(param => _events.Publish(Tracks.Select(x => x.Track).ToList()));

            EditorEditAlbumsCommand = new ReactiveCommand();
            EditorEditAlbumsCommand.Subscribe(
                param => _windowManager.ShowDialog(new AlbumTagEditorViewModel(Tracks.Select(x => x.Track.Model).ToList())));
        }
Ejemplo n.º 3
0
 private Album CreateAlbum(string albumName, int albumYear)
 {
     var album = new Album(albumName, albumYear);
     _albums.Add(album);
     return album;
 }