コード例 #1
0
        public SearchViewModel(ITivoConnectionService tivoConnectionService)
        {
            this.tivoConnectionService = tivoConnectionService;
            this.tivoConnectionService.PropertyChanged += OnConnectionServicePropertyChanged;

            this.SearchText = "test";
        }
コード例 #2
0
        public SearchViewModel(
            IProgressService progressService,
            ISpeechService speechService,
            ITivoConnectionService connectionService,
            Func <PersonItemViewModel> personFactory,
            Func <CollectionItemViewModel> collectionFactory
            )
        {
            this.connectionService = connectionService;
            this.progressService   = progressService;
            this.speechService     = speechService;

            this.personFactory     = personFactory;
            this.collectionFactory = collectionFactory;

            this.connectionService.PropertyChanged += OnConnectionServicePropertyChanged;

            this.searchTextChangedSubject
            .Throttle(TimeSpan.FromSeconds(1))
            .Subscribe(_ =>
            {
                if (this.SearchText != this.lastSearchText)
                {
                    this.Search();
                }
            });
        }
コード例 #3
0
 public RecordingViewModel(
     ITivoConnectionService connectionService,
     IProgressService progressService)
 {
     this.connectionService = connectionService;
     this.progressService   = progressService;
 }
コード例 #4
0
 public PersonItemViewModel(
     INavigationService navigationService,
     IProgressService progressService,
     ITivoConnectionService connectionService)
 {
     this.connectionService = connectionService;
     this.navigationService = navigationService;
     this.progressService   = progressService;
 }
コード例 #5
0
 public PersonDetailsPageViewModel(
     IProgressService progressService,
     ITivoConnectionService connectionService,
     PersonContentViewModel contentViewModel)
 {
     this.progressService         = progressService;
     this.connectionService       = connectionService;
     this.contentSummaryViewModel = contentViewModel;
 }
コード例 #6
0
        public ScheduledRecordingsService(
            IProgressService progressService,
            ITivoConnectionService connectionService)
        {
            this.progressService   = progressService;
            this.connectionService = connectionService;

            connectionService.PropertyChanged += OnConnectionServicePropertyChanged;

            InitializeRecordingsService();
        }
コード例 #7
0
        public SettingsPageViewModel(
            IEventAggregator eventAggregator,
            IProgressService progressService,
            ITivoConnectionService connectionService)
        {
            this.eventAggregator   = eventAggregator;
            this.connectionService = connectionService;
            this.progressService   = progressService;

            this.connectionService.PropertyChanged += OnConnectionServicePropertyChanged;
        }
コード例 #8
0
        public LazyRecordingFolderItemViewModel(
            IProgressService progressService,
            ITivoConnectionService connectionService,
            Func <IndividualShowViewModel> showViewModelFactory,
            Func <ShowContainerViewModel> showContainerViewModelFactory)

        {
            this.progressService               = progressService;
            this.connectionService             = connectionService;
            this.showViewModelFactory          = showViewModelFactory;
            this.showContainerViewModelFactory = showContainerViewModelFactory;
        }
コード例 #9
0
        public MyShowsViewModel(
            IProgressService progressService,
            ITivoConnectionService connectionService,
            Func <LazyRecordingFolderItemViewModel> showModelFactory)
        {
            this.connectionService = connectionService;
            this.progressService   = progressService;

            this.showModelFactory = showModelFactory;

            connectionService.PropertyChanged += OnConnectionServicePropertyChanged;
        }
コード例 #10
0
 public CollectionDetailsPageViewModel(
     IAnalyticsService analyticsService,
     IProgressService progressService,
     ITivoConnectionService connectionService,
     CreditsViewModel creditsViewModel,
     UpcomingOffersViewModel upcomingOffersViewModel)
 {
     this.analyticsService        = analyticsService;
     this.progressService         = progressService;
     this.connectionService       = connectionService;
     this.creditsViewModel        = creditsViewModel;
     this.upcomingOffersViewModel = upcomingOffersViewModel;
 }
コード例 #11
0
        public OfferViewModel(
            ITivoConnectionService connectionService,
            IProgressService progressService,
            IScheduledRecordingsService scheduledRecordingsService)
        {
            this.connectionService          = connectionService;
            this.progressService            = progressService;
            this.scheduledRecordingsService = scheduledRecordingsService;

            if (this.scheduledRecordingsService != null)
            {
                this.scheduledRecordingsService.PropertyChanged += OnRecordingScheduleUpdated;
            }
        }
コード例 #12
0
        public UpcomingOffersViewModel(
            IProgressService progressService,
            INavigationService navigationService,
            IScheduledRecordingsService scheduledRecordingsService,
            ITivoConnectionService connectionService,
            Func <OfferViewModel> offerViewModelFactory)
        {
            this.progressService            = progressService;
            this.navigationService          = navigationService;
            this.scheduledRecordingsService = scheduledRecordingsService;
            this.connectionService          = connectionService;
            this.offerViewModelFactory      = offerViewModelFactory;

            connectionService.PropertyChanged += OnConnectionServicePropertyChanged;
        }
コード例 #13
0
        public MainViewModel(
            ITivoConnectionService tivoConnectionService,
            IWindowManager windowManager,
            WhatsOnViewModel whatsOnModel,
            ShowGridViewModel showGridModel,
            SearchViewModel searchModel)
        {
            this.tivoConnectionService = tivoConnectionService;
            this.windowManager         = windowManager;
            this.WhatsOn  = whatsOnModel;
            this.ShowGrid = showGridModel;
            this.Search   = searchModel;

            this.tivoConnectionService.PropertyChanged += OnTivoConnectionServicePropertyChanged;
            this.shows = new BindableCollection <RecordingFolderItem>();
        }
コード例 #14
0
        public ChannelListViewModel(
            IProgressService progressService,
            INavigationService navigationService,
            IScheduledRecordingsService scheduledRecordingsService,
            ITivoConnectionService connectionService,
            Func <OfferViewModel> offerViewModelFactory)
        {
            this.progressService            = progressService;
            this.navigationService          = navigationService;
            this.scheduledRecordingsService = scheduledRecordingsService;
            this.connectionService          = connectionService;
            this.offerViewModelFactory      = offerViewModelFactory;
            this.StartTime = DateTime.Now;

            connectionService.PropertyChanged += OnConnectionServicePropertyChanged;

            dateChangedSubject
            .Throttle(TimeSpan.FromSeconds(1))
            .Subscribe(_ => RefreshShows());
        }
コード例 #15
0
        public MainPageViewModel(
            INavigationService navigationService,
            ISpeechService speechService,
            ITivoConnectionService connectionService,
            MyShowsViewModel myShowsViewModel,
            ChannelListViewModel channelListViewModel,
            ToDoListViewModel toDoListViewModel,
            SearchViewModel searchViewModel)
        {
            this.navigationService = navigationService;
            this.speechService     = speechService;
            this.connectionService = connectionService;

            this.myShowsViewModel     = myShowsViewModel;
            this.channelListViewModel = channelListViewModel;
            this.toDoListViewModel    = toDoListViewModel;
            this.searchViewModel      = searchViewModel;

            connectionService.PropertyChanged += OnConnectionServicePropertyChanged;

            this.channelListViewModel.DisplayName      = "guide";
            this.channelListViewModel.PropertyChanged += OnViewModelPropertyChanged;
            this.Items.Add(channelListViewModel);

            this.toDoListViewModel.DisplayName      = "scheduled";
            this.toDoListViewModel.PropertyChanged += OnViewModelPropertyChanged;
            this.Items.Add(toDoListViewModel);

            this.myShowsViewModel.DisplayName      = "my shows";
            this.myShowsViewModel.PropertyChanged += OnViewModelPropertyChanged;
            this.Items.Add(myShowsViewModel);

            this.searchViewModel.DisplayName      = "search";
            this.searchViewModel.PropertyChanged += OnViewModelPropertyChanged;
            this.Items.Add(searchViewModel);

            this.ActivateItem(this.channelListViewModel);
        }
コード例 #16
0
 public ShowGridViewModel(ITivoConnectionService tivoConnectionService)
 {
     this.tivoConnectionService = tivoConnectionService;
     this.tivoConnectionService.PropertyChanged += OnConnectionServicePropertyChanged;
 }
コード例 #17
0
 public WhatsOnViewModel(ITivoConnectionService tivoConnectionService)
 {
     this.tivoConnectionService = tivoConnectionService;
     this.tivoConnectionService.PropertyChanged += (sender, args) => this.NotifyOfPropertyChange(() => this.CanUpdate);
 }