Exemplo n.º 1
0
        public static void GoToPLaylistMangePage(IPlaylistsChangeHandler playlistsChangeHandler)
        {
            var datasource         = App.ViewModel.GetDataSource;
            var connectionListener = App.ViewModel.ConnectionListener;

            NavigationHelper.Navigate("/PlaylistsManagePage.xaml", new PlaylistsManagePageViewModel(datasource, connectionListener, playlistsChangeHandler));
        }
 public PlaylistsManagePageViewModel(Func <IDataSource> getGeDataSource, IConnectionListener connectionListener, IPlaylistsChangeHandler playlistsChangeHandler)
 {
     _getGeDataSource        = getGeDataSource;
     _playlistsChangeHandler = playlistsChangeHandler;
     _playlistListViewModel  = new MyPlaylistListViewModel(_getGeDataSource, connectionListener, new DeleteContextMenuStrategy(), playlistsChangeHandler);
     _playlistListViewModel.FirstLoad();
     _createCommand = new RelayCommand(CreatePlaylist, CanCreateNewPlaylist);
     _accessItems   = new List <AccessItem>()
     {
         new AccessItem(PrivacyStatus.Public), new AccessItem(PrivacyStatus.Private)
     };
     _selectedAccess = _accessItems.First();
 }
 public MyPlaylistListViewModel(Func <IDataSource> getGeDataSource, IConnectionListener connectionListener,
                                IContextMenuStrategy contextMenuStrategy, IPlaylistsChangeHandler playlistsChangeHandler, Action <bool> changeProgressIndicator = null)
     : base(null, getGeDataSource, connectionListener, contextMenuStrategy, changeProgressIndicator)
 {
     _playlistsChangeHandler = playlistsChangeHandler;
 }