public PlaylistGroupUserControlViewModel(IDataService dataService, IAccountService accountService, INavigationService navigationService, IResourceService resourceService, ICacheableBitmapService cacheableBitmapService) { this.m_dataService = dataService; this.m_accountService = accountService; this.m_navigationService = navigationService; this.m_resourceService = resourceService; this.m_cacheableBitmapService = cacheableBitmapService; this.LoadData(); Messenger.Default.Register<PlaylistChangeMessage>(this, message => { this.LoadData(); }); }
public PlaylistViewModel(IDataService dataService, IAccountService accountService, IResourceService resourceService, ICacheableBitmapService cacheableBitmapService, int playlistId) { this.m_dataService = dataService; this.m_accountService = accountService; this.m_resourceService = resourceService; this.m_cacheableBitmapService = cacheableBitmapService; this.PlaylistId = playlistId; this.LoadData(); Messenger.Default.Register<PlaylistEntryChangeMessage>(this, message => { Playlist changedPlaylist = message.Playlist; if (changedPlaylist != null && changedPlaylist.Equals(this.Playlist)) { this.LoadData(); } }); }
public PlayerBarUserControlViewModel(IDataService dataService, IAccountService accountService, IDialogService dialogService, IResourceService resourceService, PlayerManager playerManager, INavigationService navigationService, ICacheableBitmapService cacheableBitmapService): base(dataService,accountService,dialogService,resourceService,playerManager,navigationService,cacheableBitmapService) { }
public PlaylistDetailPageViewModel(IDataService dataService, IAccountService accountService, INavigationService navigationService, PlayerManager playerManager, IResourceService resourceService, IDialogService dialogService, ICacheableBitmapService cacheableBitmapService) : base(dataService, accountService, dialogService, resourceService, cacheableBitmapService, navigationService) { this.m_playerManager = playerManager; Messenger.Default.Register<PlaylistEntryChangeMessage>(this, message => { Playlist changedPlaylist = message.Playlist; if (changedPlaylist != null && changedPlaylist.Equals(this.Playlist)) { //TODO: add code for reloading the current playlist when it´s changed by an update //within the playerbar. var newEntries = changedPlaylist.Entries.Except(this.Playlist.Entries, new BSE.Tunes.Data.Comparers.PlaylistEntryComparer()); if (newEntries != null) { this.Entries.CollectionChanged -= OnEntryCollectionChanged; foreach(var playlistEntry in newEntries) { if (playlistEntry != null) { this.Entries.Add(playlistEntry); } } this.Entries.CollectionChanged += OnEntryCollectionChanged; } } }); }
public BaseTracklistPageViewModel(IDataService dataService, IAccountService accountService, IDialogService dialogService, IResourceService resourceService, ICacheableBitmapService cacheableBitmapService, INavigationService navigationService) : base(dataService, accountService, dialogService, resourceService, cacheableBitmapService) { this.m_navigationService = navigationService; }
public BasePlaylistableViewModel(IDataService dataService, IAccountService accountService, IDialogService dialogService, IResourceService resourceService, ICacheableBitmapService cacheableBitmapService) { this.DataService = dataService; this.AccountService = accountService; this.DialogService = dialogService; this.ResourceService = resourceService; this.CacheableBitmapService = cacheableBitmapService; Messenger.Default.Register<PlaylistChangeMessage>(this, message => { this.CreatePlaylistMenu(); }); }
public PlaylistPageViewModel(IDataService dataService, IAccountService accountService, INavigationService navigationService, IResourceService resourceService, ICacheableBitmapService cacheableBitmapService) { this.m_dataService = dataService; this.m_accountService = accountService; this.m_navigationService = navigationService; this.m_resourceService = resourceService; this.m_cacheableBitmapService = cacheableBitmapService; Messenger.Default.Register<PlaylistChangeMessage>(this, message => { PlaylistAddedMessage playlistMessage = message as PlaylistAddedMessage; if (playlistMessage != null && message.Playlist != null) { this.Playlists.Add(new PlaylistViewModel(this.m_dataService, this.m_accountService, this.m_resourceService, this.m_cacheableBitmapService, message.Playlist.Id)); } }); }
public AlbumDetailPageViewModel(IDataService dataService, IAccountService accountService, INavigationService navigationService, IResourceService resourceService, PlayerManager playerManager, IDialogService dialogService, ICacheableBitmapService cacheableBitmapService) : base(dataService, accountService, dialogService, resourceService, cacheableBitmapService, navigationService) { this.m_playerManager = playerManager; }
public PlayerUserControlViewModel(IDataService dataService, IAccountService accountService, IDialogService dialogService, IResourceService resourceService, PlayerManager playerManager, INavigationService navigationService, ICacheableBitmapService cacheableBitmapService) : base(dataService, accountService, dialogService, resourceService, cacheableBitmapService) { this.m_playerManager = playerManager; this.m_navigationService = navigationService; this.PlayerMode = Data.Audio.PlayerMode.Random; this.PlayerState = Data.Audio.PlayerState.Closed; //This prevents the alignment right of the slider´s thumb at start-up. this.ProgressMaximumValue = 100; this.ProgressValue = 0; Messenger.Default.Register<BSE.Tunes.Data.Audio.PlayerState>(this, playerState => { this.OnPlayerStateChanged(playerState); }); Messenger.Default.Register<BSE.Tunes.StoreApp.Messaging.MediaOpenedMessage>(this, message => { this.OnMediaOpened(); }); Messenger.Default.Register<BSE.Tunes.StoreApp.Messaging.MediaEndedMessage>(this, message => { this.OnMediaEnded(); }); Messenger.Default.Register<TrackMessage>(this, message => { Track track = message.Track; if (track != null) { this.OnInitializeView(track); } }); //Messenger.Default.Register<PlaylistChangeMessage>(this, message => //{ // this.CreatePlaylistMenu(); //}); this.CreatePlaylistMenu(); }