public NicoRepoPageViewModel(

            Services.HohoemaPlaylist hohoemaPlaylist,
            Services.PageManager pageManager,
            ActivityFeedSettings activityFeedSettings,
            Models.Provider.LoginUserNicoRepoProvider loginUserNicoRepoProvider,
            Models.Subscription.SubscriptionManager subscriptionManager
            )
            : base(pageManager, useDefaultPageTitle: true)
        {
            HohoemaPlaylist           = hohoemaPlaylist;
            ActivityFeedSettings      = activityFeedSettings;
            LoginUserNicoRepoProvider = loginUserNicoRepoProvider;
            SubscriptionManager       = subscriptionManager;
            DisplayNicoRepoItemTopics = ActivityFeedSettings.DisplayNicoRepoItemTopics.ToList();

            /*
             * DisplayNicoRepoItemTopics.CollectionChangedAsObservable()
             *  .Throttle(TimeSpan.FromSeconds(1))
             *  .Subscribe(async _ =>
             *  {
             *      await HohoemaApp.UIDispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, async () =>
             *      {
             *          await ResetList();
             *      });
             *  });
             */
        }
Exemple #2
0
        public NicoRepoPageViewModel(
            IScheduler scheduler,
            ApplicationLayoutManager applicationLayoutManager,
            HohoemaPlaylist hohoemaPlaylist,
            Services.PageManager pageManager,
            ActivityFeedSettings activityFeedSettings,
            Models.Provider.LoginUserNicoRepoProvider loginUserNicoRepoProvider,
            Models.Subscription.SubscriptionManager subscriptionManager,
            OpenLiveContentCommand openLiveContentCommand
            )
        {
            _scheduler = scheduler;
            ApplicationLayoutManager  = applicationLayoutManager;
            HohoemaPlaylist           = hohoemaPlaylist;
            ActivityFeedSettings      = activityFeedSettings;
            LoginUserNicoRepoProvider = loginUserNicoRepoProvider;
            SubscriptionManager       = subscriptionManager;
            _openLiveContentCommand   = openLiveContentCommand;
            DisplayNicoRepoItemTopics = new ObservableCollection <NicoRepoItemTopic>(ActivityFeedSettings.DisplayNicoRepoItemTopics);

            DisplayNicoRepoItemTopics.CollectionChangedAsObservable()
            .Subscribe(_ =>
            {
                _NicoRepoItemTopicsChanged = true;
            })
            .AddTo(_CompositeDisposable);
        }
Exemple #3
0
 public ChannelFavItemVM(
     FollowItemInfo follow,
     Services.NiconicoFollowToggleButtonService followToggleButtonService,
     Models.Subscription.SubscriptionManager subscriptionManager,
     Commands.Subscriptions.CreateSubscriptionGroupCommand createSubscriptionGroupCommand
     )
     : base(follow, followToggleButtonService, subscriptionManager, createSubscriptionGroupCommand)
 {
     FollowToggleButtonService.SetFollowTarget(this);
 }
 public LoginUserNicoRepoTimelineSource(
     Models.Provider.LoginUserNicoRepoProvider loginUserNicoRepoProvider,
     Models.Subscription.SubscriptionManager subscriptionManager,
     IEnumerable <NicoRepoItemTopic> allowedNicoRepoTypes
     )
 {
     AllowedNicoRepoItemType   = allowedNicoRepoTypes.ToList();
     LoginUserNicoRepoProvider = loginUserNicoRepoProvider;
     SubscriptionManager       = subscriptionManager;
 }
Exemple #5
0
 public UserVideoPageViewModel(
     UserProvider userProvider,
     Models.Subscription.SubscriptionManager subscriptionManager,
     Services.HohoemaPlaylist hohoemaPlaylist,
     Services.PageManager pageManager,
     Commands.Subscriptions.CreateSubscriptionGroupCommand createSubscriptionGroupCommand
     )
 {
     SubscriptionManager            = subscriptionManager;
     UserProvider                   = userProvider;
     HohoemaPlaylist                = hohoemaPlaylist;
     PageManager                    = pageManager;
     CreateSubscriptionGroupCommand = createSubscriptionGroupCommand;
 }
 public SubscriptionControlViewModel(
     Models.Subscription.SubscriptionManager subscriptionManager,
     Views.Subscriptions.ChoiceSubscriptionSourceCommand choiceSubscriptionSourceCommand,
     Views.Subscriptions.MultiSelectSubscriptionDestinationCommand multiSelectSubscriptionDestinationCommand,
     Views.Subscriptions.OpenSubscriptionSourceCommand openSubscriptionSourceCommand,
     Views.Subscriptions.OpenSubscriptionDestinationCommand openSubscriptionDestinationCommand
     )
 {
     SubscriptionManager                       = subscriptionManager;
     ChoiceSubscriptionSourceCommand           = choiceSubscriptionSourceCommand;
     MultiSelectSubscriptionDestinationCommand = multiSelectSubscriptionDestinationCommand;
     OpenSubscriptionSourceCommand             = openSubscriptionSourceCommand;
     OpenSubscriptionDestinationCommand        = openSubscriptionDestinationCommand;
 }
Exemple #7
0
 public FavoriteItemViewModel(
     FollowItemInfo follow,
     Services.NiconicoFollowToggleButtonService followToggleButtonService,
     Models.Subscription.SubscriptionManager subscriptionManager,
     Commands.Subscriptions.CreateSubscriptionGroupCommand createSubscriptionGroupCommand
     )
 {
     FollowItemInfo                 = follow;
     FollowToggleButtonService      = followToggleButtonService;
     SubscriptionManager            = subscriptionManager;
     CreateSubscriptionGroupCommand = createSubscriptionGroupCommand;
     Label    = follow.Name;
     ItemType = follow.FollowItemType;
     SourceId = follow.Id;
 }
Exemple #8
0
        public VideoPlayerPageViewModel(
            IScheduler scheduler,
            IEventAggregator eventAggregator,
            Models.NiconicoSession niconicoSession,
            Models.Subscription.SubscriptionManager subscriptionManager,
            NicoVideoProvider nicoVideoProvider,
            ChannelProvider channelProvider,
            MylistProvider mylistProvider,
            PlayerSettings playerSettings,
            CacheSettings cacheSettings,
            NGSettings ngSettings,
            ApplicationLayoutManager applicationLayoutManager,
            HohoemaPlaylist hohoemaPlaylist,
            LocalMylistManager localMylistManager,
            UserMylistManager userMylistManager,
            PageManager pageManager,
            MediaPlayer mediaPlayer,
            NotificationService notificationService,
            DialogService dialogService,
            ExternalAccessService externalAccessService,
            Commands.Subscriptions.CreateSubscriptionGroupCommand createSubscriptionGroupCommand,
            Commands.Mylist.CreateLocalMylistCommand createLocalMylistCommand,
            Commands.Mylist.CreateMylistCommand createMylistCommand,
            UseCase.NicoVideoPlayer.VideoStreamingOriginOrchestrator videoStreamingOriginOrchestrator,
            UseCase.VideoPlayer videoPlayer,
            UseCase.CommentPlayer commentPlayer,
            KeepActiveDisplayWhenPlaying keepActiveDisplayWhenPlaying,
            ObservableMediaPlayer observableMediaPlayer,
            WindowService windowService,
            VideoEndedRecommendation videoEndedRecommendation,
            PrimaryViewPlayerManager primaryViewPlayerManager,
            TogglePlayerDisplayViewCommand togglePlayerDisplayViewCommand,
            ShowPrimaryViewCommand showPrimaryViewCommand,
            MediaPlayerSoundVolumeManager soundVolumeManager
            )
        {
            _scheduler                        = scheduler;
            NiconicoSession                   = niconicoSession;
            SubscriptionManager               = subscriptionManager;
            NicoVideoProvider                 = nicoVideoProvider;
            ChannelProvider                   = channelProvider;
            MylistProvider                    = mylistProvider;
            PlayerSettings                    = playerSettings;
            CacheSettings                     = cacheSettings;
            NgSettings                        = ngSettings;
            ApplicationLayoutManager          = applicationLayoutManager;
            HohoemaPlaylist                   = hohoemaPlaylist;
            LocalMylistManager                = localMylistManager;
            UserMylistManager                 = userMylistManager;
            PageManager                       = pageManager;
            _NotificationService              = notificationService;
            _HohoemaDialogService             = dialogService;
            ExternalAccessService             = externalAccessService;
            CreateSubscriptionGroupCommand    = createSubscriptionGroupCommand;
            CreateLocalMylistCommand          = createLocalMylistCommand;
            CreateMylistCommand               = createMylistCommand;
            _videoStreamingOriginOrchestrator = videoStreamingOriginOrchestrator;
            VideoPlayer                       = videoPlayer;
            CommentPlayer                     = commentPlayer;
            PrimaryViewPlayerManager          = primaryViewPlayerManager;
            TogglePlayerDisplayViewCommand    = togglePlayerDisplayViewCommand;
            ShowPrimaryViewCommand            = showPrimaryViewCommand;
            SoundVolumeManager                = soundVolumeManager;
            ObservableMediaPlayer             = observableMediaPlayer
                                                .AddTo(_CompositeDisposable);
            WindowService = windowService
                            .AddTo(_CompositeDisposable);
            VideoEndedRecommendation = videoEndedRecommendation
                                       .AddTo(_CompositeDisposable);
            _keepActiveDisplayWhenPlaying = keepActiveDisplayWhenPlaying
                                            .AddTo(_CompositeDisposable);
            MediaPlayer = mediaPlayer;

            SeekCommand            = new MediaPlayerSeekCommand(MediaPlayer);
            SetPlaybackRateCommand = new MediaPlayerSetPlaybackRateCommand(MediaPlayer);
            ToggleMuteCommand      = new MediaPlayerToggleMuteCommand(MediaPlayer);
            VolumeUpCommand        = new MediaPlayerVolumeUpCommand(SoundVolumeManager);
            VolumeDownCommand      = new MediaPlayerVolumeDownCommand(SoundVolumeManager);
        }