コード例 #1
0
 private void OnNewPlaylistInserted(object sender, Event.PlaylistChangedEventArgs e)
 {
     this.NewPlaylistViewModel.PlaylistInserted -= OnNewPlaylistInserted;
     this.NewPlaylistViewModel.IsOpen = false;
     this.NewPlaylistViewModel = null;
     //Refreshing all the playlist views
     Messenger.Default.Send<PlaylistChangeMessage>(new PlaylistChangeMessage());
     Playlist playlist = e.Playlist;
     if (playlist != null)
     {
         this.AddTracksToPlaylist(playlist);
     }
 }
コード例 #2
0
 private NewPlaylistUserControlViewModel CreateNewPlaylistModel(InsertMode insertMode)
 {
     var newPlaylistViewModel = new NewPlaylistUserControlViewModel(this.DataService, this.AccountService, this.ResourceService)
     {
         IsOpen = true,
         InsertMode = insertMode
     };
     newPlaylistViewModel.PlaylistInserted += this.OnNewPlaylistInserted;
     return newPlaylistViewModel;
 }
コード例 #3
0
 protected virtual void OpenNewPlaylistDialog()
 {
     this.NewPlaylistViewModel = new NewPlaylistUserControlViewModel(this.DataService, this.AccountService, this.ResourceService);
     this.NewPlaylistViewModel.IsOpen = true;
     this.NewPlaylistViewModel.PlaylistInserted += OnNewPlaylistInserted;
 }
コード例 #4
0
 private void CompleteToPlaylist(MenuItemViewModel menuItem)
 {
     //Necessary because NewCompleteToPlaylistViewModel is an own viewmodel.
     MenuNewPlaylistViewModel menuNewPlaylistViewModel = menuItem as MenuNewPlaylistViewModel;
     if (menuNewPlaylistViewModel != null)
     {
         this.NewCompleteToPlaylistViewModel = this.CreateNewPlaylistModel(InsertMode.All);
     }
     this.ChoosePlaylist(menuItem, InsertMode.All);
 }