protected virtual void OnLibraryChanged() { OnSizeChanged(); if (LibraryChanged != null) { LibraryChanged.Invoke(this, EventArgs.Empty); } }
private void OnLibraryChanged() { OnSizeChanged(); if (LibraryChanged != null) { LibraryChanged.Invoke(this, EventArgs.Empty); } }
public override void AddTrackToPlaylist(string playlist, string path) { base.AddTrackToPlaylist(playlist, path); if (RaiseLibraryChanged) { LibraryChanged?.Invoke(null, EventArgs.Empty); } }
public override void Remove(string path) { base.Remove(path); if (RaiseLibraryChanged) { LibraryChanged?.Invoke(null, EventArgs.Empty); } }
public override void DeletePlaylist(string playlist) { base.DeletePlaylist(playlist); if (RaiseLibraryChanged) { LibraryChanged?.Invoke(null, EventArgs.Empty); } }
public override DatabasePlaylist CreatePlaylist(string playlist, string path = null) { var newPlaylist = base.CreatePlaylist(playlist, path); if (RaiseLibraryChanged) { LibraryChanged?.Invoke(null, EventArgs.Empty); } return(newPlaylist); }
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); } }); }
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); }