示例#1
0
 public PlaylistService(ITrackCriteriaService trackCriteriaService, IPlaylistRepository playlistRepository,
                        Interfaces.ILibraryService libraryService)
 {
     _trackCriteriaService = trackCriteriaService;
     _playlistRepository   = playlistRepository;
     _libraryService       = libraryService;
 }
示例#2
0
        public SearchViewModel(Common.Singletons.Library library, IMessenger messenger, ITrackCriteriaService trackCriteriaService, ITrackSearchService trackSearchService,
                               IPlaylistsService repository, TrackContextMenuViewModel trackContextMenu, IPlayRequestHandler playRequestHandler)
            : base(TabType.Search, IconType.Search, "Library Search")
        {
            _library              = library;
            _messenger            = messenger;
            _repository           = repository;
            _trackCriteriaService = trackCriteriaService;
            _trackSearchService   = trackSearchService;
            _playRequestHandler   = playRequestHandler;

            TrackContextMenu = trackContextMenu;

            Criteria = new ObservableCollection <CriteriaGroupViewModel>();

            AddNewCriteriaGroupCommand = new RelayCommand(OnAddNewCriteriaGroup);
            SearchCommand = new RelayCommand(OnSearch);
            ClearCommand  = new RelayCommand(OnClear);
            SaveAsCriteriaPlaylistCommand = new RelayCommand(OnSaveAsCriteriaPlaylist);
            SaveAsOrderedPlaylistCommand  = new RelayCommand(OnSaveAsOrderedPlaylist);
            PlayCommand        = new RelayCommand(OnPlay);
            EditCommand        = new RelayCommand(OnEdit);
            RemoveGroupCommand = new RelayCommand <CriteriaGroupViewModel>(OnRemoveGroup);

            _library.Updated += OnLibraryUpdated;
        }
示例#3
0
        public EditCriteriaPlaylistViewModel(IMessenger messenger, IPlaylistsService repository, ITrackSearchService trackSearchService,
                                             Common.Singletons.Library library, ITrackCriteriaService trackCriteriaService)
            : base(TabType.Playlists, IconType.Cog, "Edit Playlist", messenger, false)
        {
            _library              = library;
            _messenger            = messenger;
            _trackCriteriaService = trackCriteriaService;
            _trackSearchService   = trackSearchService;
            _repository           = repository;

            AddNewCriteriaGroupCommand = new RelayCommand(OnAddNewCriteriaGroup);
            PreviewResultsCommand      = new RelayCommand(OnPreviewResults);
            RemoveGroupCommand         = new RelayCommand <CriteriaGroupViewModel>(OnRemoveGroup);
        }
示例#4
0
 public PlaylistRepository(ITrackCriteriaService trackCriteriaService, IXmlProvider xmlProvider)
 {
     _trackCriteriaService = trackCriteriaService;
     _xmlProvider          = xmlProvider;
 }
示例#5
0
 public TrackSearchService(Library library, ITrackCriteriaService criteriaService)
 {
     _criteriaService = criteriaService;
     _library         = library;
 }