public CollectionViewModel(ICollectionService service, CollectionCommandHelper commands) { _service = service; _commands = commands; SongClickCommand = new RelayCommand <ItemClickEventArgs>(SongClickExecute); if (IsInDesignModeStatic) { _service.LoadLibrary(); } SortedSongs = AlphaKeyGroup <Song> .CreateGroups(Service.Songs.Where(p => !p.IsTemp).ToList(), CultureInfo.CurrentCulture, item => item.Name, true); SortedArtists = AlphaKeyGroup <Artist> .CreateGroups(Service.Artists.Where(p => p.Songs.Count > 0).ToList(), CultureInfo.CurrentCulture, item => item.Name, true); SortedAlbums = AlphaKeyGroup <Album> .CreateGroups(Service.Albums.Where(p => p.Songs.Count > 0).ToList(), CultureInfo.CurrentCulture, item => item.Name, true); Service.Songs.CollectionChanged += OnCollectionChanged; Service.Albums.CollectionChanged += OnCollectionChanged; Service.Artists.CollectionChanged += OnCollectionChanged; }
public CollectionArtistViewModel(ICollectionService service, CollectionCommandHelper commands, SettingViewModel settingViewModel) { _service = service; _commands = commands; _songClickCommand = new Command <ItemClickEventArgs>(SongClickExecute); SettingViewModel = settingViewModel; }
public NowPlayingViewModel(IScrobblerService service, ICollectionService collection, CollectionCommandHelper commands) { _service = service; _commands = commands; _collection = collection; _songClickRelayCommand = new Command <ItemClickEventArgs>(SongClickExecute); SimilarTracks = new ObservableCollection <Base>(); }
public SpotifyAlbumViewModel(ISpotifyService spotify, IScrobblerService service, IMiscellaneousService misc, CollectionCommandHelper commands) { _service = service; _misc = misc; _commands = commands; _songClickRelayCommand = new Command <ItemClickEventArgs>(SongClickExecute); }
public CollectionAlbumViewModel(ICollectionService service, CollectionCommandHelper commands) { _service = service; _commands = commands; _songClickCommand = new RelayCommand<ItemClickEventArgs>(SongClickExecute); if (IsInDesignMode) SetAlbum(0); else MessengerInstance.Register<GenericMessage<int>>(this, "album-coll-detail-id", ReceivedId); }
public CollectionArtistViewModel(ICollectionService service, CollectionCommandHelper commands, IScrobblerService lastService) { _service = service; _commands = commands; _lastService = lastService; _songClickCommand = new RelayCommand<ItemClickEventArgs>(SongClickExecute); MessengerInstance.Register<int>(this, "artist-coll-detail-id", ReceivedId); if (IsInDesignMode) SetArtist(0); }
public CollectionArtistViewModel(ICollectionService service, CollectionCommandHelper commands, IScrobblerService lastService) { _service = service; _commands = commands; _lastService = lastService; _songClickCommand = new RelayCommand <ItemClickEventArgs>(SongClickExecute); MessengerInstance.Register <int>(this, "artist-coll-detail-id", ReceivedId); if (IsInDesignMode) { SetArtist(0); } }
public MainViewModel(ICollectionService service, IMiscellaneousService misc, CollectionCommandHelper commands, Data.Service.Interfaces.IScrobblerService scroble, PlayerViewModel _playerModel) { _service = service; _commands = commands; _scroble = scroble; _misc = misc; PlayerModel = _playerModel; Message = Core.StringMessage.LoadingPleaseWait; WhatsNewMessage = Core.StringMessage.LoadingPleaseWait; _songClickCommand = new Command <ItemClickEventArgs>(SongClickExecute); _service.LibraryLoaded += _service_LibraryLoaded; }
public CollectionAlbumViewModel(ICollectionService service, CollectionCommandHelper commands) { _service = service; _commands = commands; _songClickCommand = new RelayCommand <ItemClickEventArgs>(SongClickExecute); if (IsInDesignMode) { SetAlbum(0); } else { MessengerInstance.Register <GenericMessage <int> >(this, "album-coll-detail-id", ReceivedId); } }
public SearchViewModel(IScrobblerService service, ISpotifyService spotify, IMiscellaneousService misc, IDeezerService deezer, CollectionCommandHelper commands) { _spotify = spotify; _service = service; _misc = misc; _deezer = deezer; _commands = commands; KeyDownRelayCommand = new Command <KeyRoutedEventArgs>(KeyDownExecute); SongClickRelayCommand = new Command <ItemClickEventArgs>(SongClickExecute); VideoClickCommand = new Command <ItemClickEventArgs>(VideoClickExecute); }
public CollectionViewModel(ICollectionService service, IMiscellaneousService misc, CollectionCommandHelper commands) { _service = service; _commands = commands; _misc = misc; SongClickCommand = new Command <ItemClickEventArgs>(SongClickExecute); VideoClickCommand = new Command <ItemClickEventArgs>(VideoClickExecute); SortedSongs = AlphaKeyGroup <Song> .CreateGroups(Service.Songs.Where(p => !p.IsTemp).ToList(), CultureInfo.CurrentCulture, item => item.Name, true); SortedArtists = AlphaKeyGroup <Artist> .CreateGroups(Service.Artists.Where(p => p.Songs.Count > 0).ToList(), CultureInfo.CurrentCulture, item => item.Name, true); SortedAlbums = AlphaKeyGroup <Album> .CreateGroups(Service.Albums.Where(p => p.Songs.Count > 0).ToList(), CultureInfo.CurrentCulture, item => item.Name, true); SortedVideos = AlphaKeyGroup <Video> .CreateGroups(Service.Videos, CultureInfo.CurrentCulture, item => item.Title, true);//Service.Videos; InitAsync(); }
public CollectionSearchViewModel(CollectionCommandHelper commands, ICollectionService service) { _commands = commands; _service = service; }