Ejemplo n.º 1
0
 protected StoreNowPlaying()
 {
     AppBar                      = new AppBarController();
     Timer                       = new DispatcherTimer();
     Timer.Interval              = TimeSpan.FromMilliseconds(900);
     Timer.Tick                 += Timer_Tick;
     Selected                    = new ObservableCollection <PlaylistMusicItem>();
     Selected.CollectionChanged += (s, e) => AppBar.Update(SelectedList);
     RemoveSelected              = new AsyncUnitCommand(() => {
         return(Player.Playlist.RemoveSong(SelectedList.First().Index));
     });
     // TODO: event handler life cycles
     PlayerManager.ActiveEndpointChanged += e => InstallPlayerEventHandlers();
     InstallPlayerEventHandlers();
 }