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();
     });
 }
Exemplo n.º 2
0
        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;
                 }
             }
         });
 }
Exemplo n.º 5
0
 public BaseTracklistPageViewModel(IDataService dataService, IAccountService accountService, IDialogService dialogService, IResourceService resourceService, ICacheableBitmapService cacheableBitmapService, INavigationService navigationService)
     : base(dataService, accountService, dialogService, resourceService, cacheableBitmapService)
 {
     this.m_navigationService = navigationService;
 }
Exemplo n.º 6
0
        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();
            });
        }
Exemplo n.º 7
0
        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));
                }
            });
        }
Exemplo n.º 8
0
 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;
 }
Exemplo n.º 9
0
 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();
 }