private void OnPlaylistMoved(object sender, PlaylistMovedEventArgs e)
 {
     if (Dispatcher.CheckAccess())
     {
         _items.Move(e.OldIndex, e.NewIndex);
     }
     else
     {
         Dispatcher.BeginInvoke(new Action<object, PlaylistMovedEventArgs>(OnPlaylistMoved), sender, e);
     }
 }
        private void OnPlaylistContainerPlaylistMoved(object sender, PlaylistMovedEventArgs e)
        {
            _logger.Log("Playlist moved", Category.Info, Priority.Medium);

            if (e.OldIndex < _playlists.Count)
            {
                _dispatcher.Invoke((Action<int, int>)_playlists.Move, e.OldIndex, e.NewIndex);
                ITorshifyPlaylist p = _playlists[e.NewIndex];
                OnPlaylistMoved(new Infrastructure.Interfaces.PlaylistMovedEventArgs(p, e.OldIndex, e.NewIndex));
            }
        }
Example #3
0
 private void OnPlaylistContainerPlaylistMoved(object sender, PlaylistMovedEventArgs e)
 {
     _logger.Log("Playlist moved", Category.Info, Priority.Medium);
     ITorshifyPlaylist p = _playlists[e.OldIndex];
     OnPlaylistMoved(new Infrastructure.Interfaces.PlaylistMovedEventArgs(p, e.OldIndex, e.NewIndex));
 }