public PlayzoneViewModel() : base() { spotifyService = DependencyInjector.GetService <ISpotifyService>(); foobarService = DependencyInjector.GetService <IFoobarService>(); player = new PlayzoneBackgroundWorker(); localSelectedArtist = null; localSelectedAlbum = null; localSelectedGenre = null; onlineSelectedArtist = null; onlineSelectedAlbum = null; onlineSelectedGenre = null; LocalSupportedPlayers = GetLocalSupportedPlayers(); OnlineSupportedPlayers = GetOnlineSupportedPlayers(); MixList = new ObservableCollection <TrackBase>(); LocalSelectAllCommand = new RelayCommand <object>(exe => ExecuteLocalSelectAll(), can => CanExecuteLocalSelectAll); LocalSelectReverseCommand = new RelayCommand <object>(exe => ExecuteLocalSelectReverse(), can => CanExecuteLocalSelectReverse); LocalManageFiltersCommand = new RelayCommand <object>(exe => ExecuteLocalManageFilters(), can => CanExecuteLocalManageFilters); LocalAddToMixCommand = new RelayCommand <object>(exe => ExecuteLocalAddToMix(), can => CanExecuteLocalAddToMix); OnlineSelectAllCommand = new RelayCommand <object>(exe => ExecuteOnlineSelectAll(), can => CanExecuteOnlineSelectAll); OnlineSelectReverseCommand = new RelayCommand <object>(exe => ExecuteOnlineSelectReverse(), can => CanExecuteOnlineSelectReverse); OnlineManageFiltersCommand = new RelayCommand <object>(exe => ExecuteOnlineManageFilters(), can => CanExecuteOnlineManageFilters); OnlineAddToMixCommand = new RelayCommand <object>(exe => ExecuteOnlineAddToMix(), can => CanExecuteOnlineAddToMix); PlayCommand = new RelayCommand <object>(exe => ExecutePlay(), can => CanExecutePlay); PauseCommand = new RelayCommand <object>(exe => ExecutePause(), can => CanExecutePause); RemoveCommand = new RelayCommand <object>(exe => ExecuteRemove(), can => CanExecuteRemove); }
public PlayzoneBackgroundWorker() { playerWorker = new BackgroundWorker(); playerWorker.WorkerSupportsCancellation = true; playerWorker.DoWork += ConsumePlaylist; tracks = new List <PlayableTrackInfo>(); currentlyPlaying = null; isPaused = false; spotifyService = DependencyInjector.GetService <ISpotifyService>(); foobarService = DependencyInjector.GetService <IFoobarService>(); }
public HomeController(IInterceptable <IFoobarService> service) { _service = service.Proxy; }
public HomeController(IFoobarService service) { _service = service; }