Exemple #1
0
        public Library(IMediaItemPersister mediaItemPersister)
        {
            this.mediaItemPersister = mediaItemPersister;
            log.Info("Creating library...");

            mediaItems = new CustomObservableCollection<MediaItem>(this.mediaItemPersister.LoadAll());

            log.Info("Library populated successfully");
        }
 public NowPlayingViewModel(IEventAggregator eventAgg, IMediaItemPersister mediaItemPersister)
 {
     this.mediaItemPersister = mediaItemPersister;
     this.eventAgg           = eventAgg;
     eventAgg.Subscribe(this);
     updateProgressTimer          = new DispatcherTimer();
     updateProgressTimer.Interval = TimeSpan.FromMilliseconds(300);
     updateProgressTimer.Tick    += (o, s) => UpdateProgress();
 }
Exemple #3
0
        public Library(IMediaItemPersister mediaItemPersister)
        {
            this.mediaItemPersister = mediaItemPersister;
            log.Info("Creating library...");

            mediaItems = new CustomObservableCollection<MediaItem>(this.mediaItemPersister.LoadAll());

            log.Info("Library populated successfully");
        }