public SpotifyArtistViewModel(ISpotifyService service, IScrobblerService scrobbler, SettingViewModel settingViewModel) { _service = service; _scrobbler = scrobbler; _songClickRelayCommand = 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>(); }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel(IScrobblerService service, AudioPlayerHelper audioPlayer) { _service = service; _audioPlayer = audioPlayer; //Load data automatically LoadChartDataAsync(); }
public SpotifyAlbumViewModel(ISpotifyService spotify, IScrobblerService service, IMiscellaneousService misc, CollectionCommandHelper commands) { _service = service; _misc = misc; _commands = commands; _songClickRelayCommand = new Command <ItemClickEventArgs>(SongClickExecute); }
public AlbumViewModel(IScrobblerService service) { SongClickRelayCommand = new RelayCommand<ItemClickEventArgs>(SongClickExecute); _service = service; MessengerInstance.Register<GenericMessage<LastAlbum>>(this, "album-detail", ReceivedId); if (IsInDesignMode) LoadData(new LastAlbum()); }
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 SearchViewModel(IScrobblerService service) { _service = service; KeyDownRelayCommand = new RelayCommand <KeyRoutedEventArgs>(KeyDownExecute); SongClickRelayCommand = new RelayCommand <ItemClickEventArgs>(SongClickExecute); if (IsInDesignMode) { SearchAsync("test"); } }
public ArtistViewModel(IScrobblerService service) { SongClickRelayCommand = new RelayCommand <ItemClickEventArgs>(SongClickExecute); _service = service; MessengerInstance.Register <GenericMessage <string> >(this, "artist-detail-name", ReceivedName); if (IsInDesignMode) { LoadData("music.test"); } }
public AlbumViewModel(IScrobblerService service) { SongClickRelayCommand = new RelayCommand <ItemClickEventArgs>(SongClickExecute); _service = service; MessengerInstance.Register <GenericMessage <LastAlbum> >(this, "album-detail", ReceivedId); if (IsInDesignMode) { LoadData(new LastAlbum()); } }
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 SettingsViewModel(IScrobblerService service, ICredentialHelper credentialHelper, IAppSettingsHelper appSettingsHelper) { _service = service; _appSettingsHelper = appSettingsHelper; LoginClickRelay = new RelayCommand(LoginButtonClicked); DeveloperModeClickRelay = new RelayCommand(DeveloperModeExecute); var creds = credentialHelper.GetCredentials("lastfm"); if (creds == null) return; LastFmUsername = creds.GetUsername(); LastFmPassword = creds.GetPassword(); IsLoggedIn = true; }
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 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 SettingsViewModel(IScrobblerService service, ICredentialHelper credentialHelper, IAppSettingsHelper appSettingsHelper) { _service = service; _appSettingsHelper = appSettingsHelper; LoginClickRelay = new RelayCommand(LoginButtonClicked); DeveloperModeClickRelay = new RelayCommand(DeveloperModeExecute); var creds = credentialHelper.GetCredentials("lastfm"); if (creds == null) { return; } LastFmUsername = creds.GetUsername(); LastFmPassword = creds.GetPassword(); IsLoggedIn = true; }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> /// <param name="collectionService"> /// The collection service. /// </param> /// <param name="service"> /// The service. /// </param> /// <param name="spotify"> /// The spotify. /// </param> /// <param name="audioticaService"> /// The audiotica service. /// </param> /// <param name="audioPlayer"> /// The audio player. /// </param> /// <param name="playerViewModel"></param> public MainViewModel( ICollectionService collectionService, IScrobblerService service, ISpotifyService spotify, IAudioticaService audioticaService, AudioPlayerHelper audioPlayer, PlayerViewModel playerViewModel) { PlayerViewModel = playerViewModel; _collectionService = collectionService; _service = service; _spotify = spotify; _audioticaService = audioticaService; _audioPlayer = audioPlayer; _collectionService.LibraryLoaded += CollectionServiceOnLibraryLoaded; _audioPlayer.TrackChanged += CollectionServiceOnLibraryLoaded; // Load data automatically LoadChartDataAsync(); }
public ScrobblerHelper(IAppSettingsHelper appSettingsHelper, IScrobblerService scrobblerService) { _appSettingsHelper = appSettingsHelper; _service = scrobblerService; }