示例#1
0
 protected virtual void OnLibraryChanged()
 {
     OnSizeChanged();
     if (LibraryChanged != null)
     {
         LibraryChanged.Invoke(this, EventArgs.Empty);
     }
 }
示例#2
0
 private void OnLibraryChanged()
 {
     OnSizeChanged();
     if (LibraryChanged != null)
     {
         LibraryChanged.Invoke(this, EventArgs.Empty);
     }
 }
示例#3
0
 public override void AddTrackToPlaylist(string playlist, string path)
 {
     base.AddTrackToPlaylist(playlist, path);
     if (RaiseLibraryChanged)
     {
         LibraryChanged?.Invoke(null, EventArgs.Empty);
     }
 }
示例#4
0
 public override void Remove(string path)
 {
     base.Remove(path);
     if (RaiseLibraryChanged)
     {
         LibraryChanged?.Invoke(null, EventArgs.Empty);
     }
 }
示例#5
0
 public override void DeletePlaylist(string playlist)
 {
     base.DeletePlaylist(playlist);
     if (RaiseLibraryChanged)
     {
         LibraryChanged?.Invoke(null, EventArgs.Empty);
     }
 }
示例#6
0
        public override DatabasePlaylist CreatePlaylist(string playlist, string path = null)
        {
            var newPlaylist = base.CreatePlaylist(playlist, path);

            if (RaiseLibraryChanged)
            {
                LibraryChanged?.Invoke(null, EventArgs.Empty);
            }
            return(newPlaylist);
        }
示例#7
0
 public override void Nuke(bool nukePlaylists = true)
 {
     base.Nuke(nukePlaylists);
     dispatcher.Invoke(() =>
     {
         notificationHandler.Add(new Notification
         {
             ContentText = Properties.Resources.NOTIFICATION_CLEARSUCCESS,
             Type        = NotificationType.Success
         });
         if (RaiseLibraryChanged)
         {
             LibraryChanged?.Invoke(null, EventArgs.Empty);
         }
     });
 }
示例#8
0
        public override void Import(string[] tracks)
        {
            var notification = new Notification {
                ContentText = $"Importing {tracks.Length} tracks"
            };

            dispatcher.Invoke(() => notificationHandler.Add(notification));
            base.Import(tracks);
            dispatcher.Invoke(() =>
            {
                notificationHandler.Remove(notification);
                if (RaiseLibraryChanged)
                {
                    LibraryChanged?.Invoke(null, EventArgs.Empty);
                }
            });
        }
 protected virtual void OnLibraryChanged(LibraryViewModelArgs e)
 {
     LibraryChanged?.Invoke(this, e);
 }