public BasePageViewModel(INavigationService navigationService, IPageDialogService pageDialogService, IDbService dbService, IWLApiService WLApiService)
 {
     _navigationService = navigationService;
     _pageDialogService = pageDialogService;
     _dbService         = dbService;
     _WLApiService      = WLApiService;
 }
예제 #2
0
        public async Task <MovieInfo> MovieInfo(IWLApiService wLApiService, string imdbId)
        {
            var dataResult = await wLApiService.FindMovieByIMDBId(imdbId);

            if (dataResult != null)
            {
                return(dataResult);
            }

            return(null);
        }
예제 #3
0
        public async Task <List <Search> > MoviesResult(IWLApiService wLApiService, string movieTitle)
        {
            var dataResult = await wLApiService.SearchMediaListAsync(movieTitle, "1", "movie");

            if (dataResult != null && dataResult.Search.Any())
            {
                return(new List <Search>(dataResult.Search));
            }

            return(null);
        }
        public MovieListPageViewModel(INavigationService navigationService, IPageDialogService pageDialogService, IDbService dbService, IWLApiService WLApiService, IDeviceService deviceService) : base(navigationService, pageDialogService, dbService, WLApiService)
        {
            Title = "Movies";
            RefreshDataCommand = new DelegateCommand(DoRefreshData);
            LoadDataCommand    = new DelegateCommand(DoLoadData);
            _deviceService     = deviceService;

            if (Data == null)
            {
                Data = new List <Search>();
            }
        }
 public MovieInfoPageViewModel(INavigationService navigationService, IPageDialogService pageDialogService, IDbService dbService, IWLApiService WLApiService, IDeviceService deviceService) : base(navigationService, pageDialogService, dbService, WLApiService)
 {
     Title          = "Movie Details";
     Info           = new MovieInfo();
     _deviceService = deviceService;
 }