public ToWatchViewModel(
            IReactiveTVShowTimeApiService tvshowtimeApiService,
            IHamburgerMenuService hamburgerMenuService,
            IEventService eventService,
            IToastNotificationService toastNotificationService)
        {
            _tvshowtimeApiService     = tvshowtimeApiService;
            _hamburgerMenuService     = hamburgerMenuService;
            _eventService             = eventService;
            _toastNotificationService = toastNotificationService;

            SelectEpisodeCommand = new RelayCommand <Episode>(SelectEpisode);

            Refresh();

            _eventService.WatchEpisodeEvent
            .Concat(_eventService.UnwatchEpisodeEvent)
            .Subscribe((episode) =>
            {
                _watchedOrUnwatchedEpisode = true;
            });

            _eventService.FollowShowEvent
            .Concat(_eventService.UnfollowShowEvent)
            .Subscribe((show) =>
            {
                _followedOrUnfollowedShow = true;
            });
        }
Beispiel #2
0
 public ShowViewModel(
     IReactiveTVShowTimeApiService tvshowtimeApiService,
     IEventService eventService)
 {
     _tvshowtimeApiService = tvshowtimeApiService;
     _eventService         = eventService;
 }
        public LoginViewModel(
            IReactiveTVShowTimeApiService tvshowtimeApiService,
            INavigationService navigationService)
        {
            _tvshowtimeApiService = tvshowtimeApiService;
            _navigationService    = navigationService;

            _localObjectStorageHelper = ServiceLocator.Current.GetInstance <IObjectStorageHelper>(ServiceLocatorConstants.LocalObjectStorageHelper);

            TryAuthenticateCommand = new RelayCommand(TryAuthenticate);
        }
Beispiel #4
0
        public UpcomingViewModel(
            IReactiveTVShowTimeApiService tvshowtimeApiService,
            IHamburgerMenuService hamburgerMenuService)
        {
            _tvshowtimeApiService = tvshowtimeApiService;
            _hamburgerMenuService = hamburgerMenuService;

            SelectEpisodeCommand = new RelayCommand <UpcomingEpisodeViewModel>(SelectEpisode);

            Initialize();
        }
        public AgendaViewModel(
            IReactiveTVShowTimeApiService tvshowtimeApiService,
            IHamburgerMenuService hamburgerMenuService,
            IEventService eventService)
        {
            _tvshowtimeApiService = tvshowtimeApiService;
            _hamburgerMenuService = hamburgerMenuService;
            _eventService         = eventService;

            SelectEpisodeCommand = new RelayCommand <Episode>(SelectEpisode);

            LoadAgendaPage(_currentPage);
        }
Beispiel #6
0
        public ShowViewModel(
            IReactiveTVShowTimeApiService tvshowtimeApiService,
            IEventService eventService,
            IToastNotificationService toastNotificationService,
            IHamburgerMenuService hamburgerMenuService)
        {
            _tvshowtimeApiService     = tvshowtimeApiService;
            _eventService             = eventService;
            _toastNotificationService = toastNotificationService;
            _hamburgerMenuService     = hamburgerMenuService;

            GoToPreviousSeasonCommand = new RelayCommand(GoToPreviousSeason);
            GoToNextSeasonCommand     = new RelayCommand(GoToNextSeason);
            SelectEpisodeCommand      = new RelayCommand <Episode>(SelectEpisode);
        }
Beispiel #7
0
        public ExploreViewModel(
            IReactiveTVShowTimeApiService tvshowtimeApiService,
            IEventService eventService,
            IHamburgerMenuService hamburgerMenuService)
        {
            _tvshowtimeApiService = tvshowtimeApiService;
            _eventService         = eventService;
            _hamburgerMenuService = hamburgerMenuService;

            SelectionChangedCommand = new RelayCommand <int>(SelectionChanged);
            ToggleFollowShowCommand = new RelayCommand <ExploreShowViewModel>(ToggleFollowShow);
            SelectShowCommand       = new RelayCommand <long>(SelectShow);

            LoadTrendingShows(_currentPage);
        }
        public EpisodeViewModel(
            IReactiveTVShowTimeApiService tvshowtimeApiService,
            IEventService eventService,
            IHamburgerMenuService hamburgerMenuService)
        {
            _tvshowtimeApiService = tvshowtimeApiService;
            _eventService         = eventService;
            _hamburgerMenuService = hamburgerMenuService;

            ToggleWatchCommand         = new RelayCommand(ToggleWatch);
            GoToPreviousEpisodeCommand = new RelayCommand(GoToPreviousEpisode);
            GoToNextEpisodeCommand     = new RelayCommand(GoToNextEpisode);
            ToggleEmotionCommand       = new RelayCommand <Emotion>(ToggleEmotion);
            SelectShowCommand          = new RelayCommand <Episode>(SelectShow);
        }
        public AgendaViewModel(
            IReactiveTVShowTimeApiService tvshowtimeApiService,
            IHamburgerMenuService hamburgerMenuService,
            IEventService eventService,
            IToastNotificationService toastNotificationService)
        {
            _tvshowtimeApiService     = tvshowtimeApiService;
            _hamburgerMenuService     = hamburgerMenuService;
            _eventService             = eventService;
            _toastNotificationService = toastNotificationService;

            SelectEpisodeCommand = new RelayCommand <Episode>(SelectEpisode);

            Refresh();
        }
        public CollectionViewModel(
            IReactiveTVShowTimeApiService tvshowtimeApiService,
            IEventService eventService,
            IHamburgerMenuService hamburgerMenuService,
            IToastNotificationService toastNotificationService)
        {
            _tvshowtimeApiService     = tvshowtimeApiService;
            _eventService             = eventService;
            _hamburgerMenuService     = hamburgerMenuService;
            _toastNotificationService = toastNotificationService;

            SelectShowCommand = new RelayCommand <Show>(SelectShow);

            _allGroup = new ShowCollectionGroup {
                Name = "All"
            };
            _lateGroup = new ShowCollectionGroup {
                Name = "Late"
            };
            _upToDateGroup = new ShowCollectionGroup {
                Name = "Up to date"
            };
            _continuingGroup = new ShowCollectionGroup {
                Name = "Continuing"
            };
            _endedGroup = new ShowCollectionGroup {
                Name = "Ended"
            };
            _archivedGroup = new ShowCollectionGroup {
                Name = "Archived"
            };

            Groups.Add(_allGroup);
            Groups.Add(_lateGroup);
            Groups.Add(_upToDateGroup);
            Groups.Add(_continuingGroup);
            Groups.Add(_endedGroup);
            Groups.Add(_archivedGroup);

            Refresh();
        }
        public ToWatchViewModel(
            IReactiveTVShowTimeApiService tvshowtimeApiService,
            IHamburgerMenuService hamburgerMenuService,
            IEventService eventService)
        {
            _tvshowtimeApiService = tvshowtimeApiService;
            _hamburgerMenuService = hamburgerMenuService;
            _eventService         = eventService;

            SelectEpisodeCommand = new RelayCommand <Episode>(SelectEpisode);

            Refresh();

            _eventService.WatchEpisodeEvent
            .Subscribe((episode) =>
            {
                Refresh();
            });

            _eventService.UnwatchEpisodeEvent
            .Subscribe((episode) =>
            {
                Refresh();
            });

            _eventService.FollowShowEvent
            .Subscribe((show) =>
            {
                Refresh();
            });

            _eventService.UnfollowShowEvent
            .Subscribe((show) =>
            {
                var episodeOfTheShow = Episodes.FirstOrDefault(e => e.Show.Id == show.Id);
                if (episodeOfTheShow != null)
                {
                    Episodes.Remove(episodeOfTheShow);
                }
            });
        }