コード例 #1
0
        public VideoQueuePageViewModel(
            ILoggerFactory loggerFactory,
            IMessenger messenger,
            QueuePlaylist queuePlaylist,
            QueuePlaylistSetting queuePlaylistSetting,
            ApplicationLayoutManager applicationLayoutManager,
            RemoveWatchedItemsInAfterWatchPlaylistCommand removeWatchedItemsInAfterWatchPlaylistCommand,
            PlaylistPlayAllCommand playlistPlayAllCommand,
            SelectionModeToggleCommand selectionModeToggleCommand,
            VideoPlayWithQueueCommand videoPlayWithQueueCommand,
            NicoVideoProvider nicoVideoProvider
            )
            : base(loggerFactory.CreateLogger <VideoQueuePageViewModel>())
        {
            _messenger               = messenger;
            QueuePlaylist            = queuePlaylist;
            _queuePlaylistSetting    = queuePlaylistSetting;
            ApplicationLayoutManager = applicationLayoutManager;
            RemoveWatchedItemsInAfterWatchPlaylistCommand = removeWatchedItemsInAfterWatchPlaylistCommand;
            PlaylistPlayAllCommand     = playlistPlayAllCommand;
            SelectionModeToggleCommand = selectionModeToggleCommand;
            VideoPlayWithQueueCommand  = videoPlayWithQueueCommand;
            _nicoVideoProvider         = nicoVideoProvider;

            IsEnableGroupingByTitleSimulality = _queuePlaylistSetting.ToReactivePropertyAsSynchronized(x => x.IsGroupingNearByTitleThenByTitleAscending, mode: ReactivePropertyMode.DistinctUntilChanged)
                                                .AddTo(_CompositeDisposable);

            CurrentPlaylistToken = this.ObserveProperty(x => x.SelectedSortOptionItem)
                                   .Select(x => new PlaylistToken(QueuePlaylist, x))
                                   .ToReadOnlyReactivePropertySlim()
                                   .AddTo(_CompositeDisposable);
        }
コード例 #2
0
 public LocalPlaylistPageViewModel(
     ApplicationLayoutManager applicationLayoutManager,
     PageManager pageManager,
     LocalMylistManager localMylistManager,
     HohoemaPlaylist hohoemaPlaylist,
     PlaylistAggregateGetter playlistAggregate,
     LocalPlaylistDeleteCommand localPlaylistDeleteCommand,
     PlaylistPlayAllCommand playlistPlayAllCommand,
     RemoveWatchedItemsInAfterWatchPlaylistCommand removeWatchedItemsInAfterWatchPlaylistCommand
     )
 {
     ApplicationLayoutManager = applicationLayoutManager;
     _pageManager = pageManager;
     _localMylistManager = localMylistManager;
     HohoemaPlaylist = hohoemaPlaylist;
     _playlistAggregate = playlistAggregate;
     LocalPlaylistDeleteCommand = localPlaylistDeleteCommand;
     PlaylistPlayAllCommand = playlistPlayAllCommand;
     RemoveWatchedItemsInAfterWatchPlaylistCommand = removeWatchedItemsInAfterWatchPlaylistCommand;
 }