public MoviesViewModel()
 {
     movieService = ServiceContainer.Resolve<IMovieService>();
     messageDialog = ServiceContainer.Resolve<IMessageDialog>();
     storageService = ServiceContainer.Resolve<IStorageService>();
     NeedsUpdate = true;
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the TrailerViewModel class.
 /// </summary>
 /// <param name="movieService">Movie service</param>
 /// <param name="applicationState">Application state</param>
 /// <param name="movieHistoryService">Movie history service</param>
 public TrailerViewModel(IMovieService movieService, IApplicationState applicationState,
     IMovieHistoryService movieHistoryService)
 {
     _movieService = movieService;
     _applicationState = applicationState;
     _movieHistoryService = movieHistoryService;
 }
 public MovieLookupController(
     IOrchardServices orchardServices,
     IMovieService movieService)
 {
     _orchardServices = orchardServices;
     _movieService = movieService;
 }
 /// <summary>
 /// Initializes a new instance of the SearchTabViewModel class.
 /// </summary>
 /// <param name="applicationState">Application state</param>
 /// <param name="movieService">Movie service</param>
 /// <param name="movieHistoryService">Movie history service</param>
 public SearchTabViewModel(IApplicationState applicationState, IMovieService movieService, IMovieHistoryService movieHistoryService)
     : base(applicationState, movieService, movieHistoryService)
 {
     RegisterMessages();
     RegisterCommands();
     TabName = LocalizationProviderHelper.GetLocalizedValue<string>("SearchTitleTab");
 }
        /// <summary>
        /// Initializes a new instance of the WantedMoviesViewModel class.
        /// </summary>
        public WantedMoviesViewModel(IMovieService moviesService)
        {
            // The data service
            _moviesService = moviesService;

            // Get all the movies and add them to the Movies collection
            Movies = new ObservableCollection<MovieViewModel>();
            _moviesService.GetWanted((result, error) =>
            {
                if (error != null)
                {
                    MessageBox.Show(error.Message);
                    return;
                }

                if (result == null)
                {
                    MessageBox.Show("Nothing found");
                    return;
                }

                foreach (var movie in result)
                {
                    Movies.Add(new MovieViewModel(movie));
                }
            });
            SelectionChangedCommand = new RelayCommand<MovieViewModel>((msg) => OnSelectionChanged(msg));
            //SelectionChangedCommand = new RelayCommand<SelectionChangedEventArgs>(e => OnSelectionChanged(e));
        }
        /// <summary>
        /// Initializes a new instance of the WantedMoviesViewModel class.
        /// </summary>
        public AllMoviesViewModel(IMovieService moviesService)
        {
            // The data service
            _moviesService = moviesService;

            // Get all the movies and add them to the Movies collection
            Movies = new ObservableCollection<MovieViewModel>();
            _moviesService.GetMovies((result, error) =>
            {
                if (error != null)
                {
                    MessageBox.Show(error.Message);
                    return;
                }

                if (result == null)
                {
                    MessageBox.Show("Nothing found");
                    return;
                }

                List<Movie> movies = (List<Movie>)result;
                movies.Reverse();

                foreach (var movie in movies)
                {
                    Movies.Add(new MovieViewModel(movie));
                }

            });
        }
 public MovieLookupController(
     IOrchardServices orchardServices,
     IMovieService movieService,
     IAuthorizer authorizer) {
     _orchardServices = orchardServices;
     _movieService = movieService;
     _authorizer = authorizer;
 }
 /// <summary>
 /// Initializes a new instance of the DownloadMovieViewModel class.
 /// </summary>
 /// <param name="movieService">Instance of MovieService</param>
 /// <param name="settingsViewModel">Instance of SettingsViewModel</param>
 /// <param name="movieSettingsViewModel">Instance of MovieSettingsViewModel</param>
 public DownloadMovieViewModel(IMovieService movieService, ISettingsViewModel settingsViewModel,
     IMovieSettingsViewModel movieSettingsViewModel)
 {
     _movieService = movieService;
     _settingsViewModel = settingsViewModel;
     _cancellationDownloadingMovie = new CancellationTokenSource();
     MovieSettings = movieSettingsViewModel;
     RegisterMessages();
     RegisterCommands();
 }
 /// <summary>
 /// Initializes a new instance of the MovieDetailsViewModel class.
 /// </summary>
 public MovieDetailsViewModel(IMovieService moviesService)
 {
     Messenger.Default.Register<MovieViewModel>(
         this,
         message =>
         {
             //SelectedMovie = null;
             SelectedMovie = message;
         });
 }
Esempio n. 10
0
 /// <summary>
 /// Initializes a new instance of the MovieViewModel class.
 /// </summary>
 /// <param name="downloadMovieViewModel">ViewModel which manages the movie download</param>
 /// <param name="movieService">Service used to interact with movies</param>
 /// <param name="trailerViewModel">ViewModel which manages the trailer</param>
 public MovieViewModel(IDownloadMovieViewModel downloadMovieViewModel, IMovieService movieService,
     ITrailerViewModel trailerViewModel)
 {
     _movieService = movieService;
     _cancellationLoadingToken = new CancellationTokenSource();
     _cancellationLoadingTrailerToken = new CancellationTokenSource();
     DownloadMovie = downloadMovieViewModel;
     Trailer = trailerViewModel;
     RegisterMessages();
     RegisterCommands();
 }
Esempio n. 11
0
        /// <summary>
        /// Initializes a new instance of the TabsViewModel class.
        /// </summary>
        protected TabsViewModel(IApplicationState applicationState, IMovieService movieService, IMovieHistoryService movieHistoryService)
        {
            ApplicationState = applicationState;
            MovieService = movieService;
            MovieHistoryService = movieHistoryService;

            RegisterMessages();
            RegisterCommands();

            MaxMoviesPerPage = Constants.MaxMoviesPerPage;
            CancellationLoadingMovies = new CancellationTokenSource();
        }
Esempio n. 12
0
 public MovieController(IMovieService movieService, ICountryService countryService,
                        IGenreService genreService, IPeopleService peopleService,
                        ICareerService careerService, IUserCommentService userCommentService,
                        IRatingService ratingService)
 {
     _movieService = movieService;
     _countryService = countryService;
     _genreService = genreService;
     _peopleService = peopleService;
     _careerService = careerService;
     _userCommentService = userCommentService;
     _ratingService = ratingService;
 }
 public MovieController(IMovieService ms, IMarkService marks, IUserService us, IFavoriteService fs)
 {
     movieService = ms;
     markService = marks;
     userService = us;
     favoriteService = fs;
     var scale = new SelectList(
         new int[] { 1, 2, 3, 4, 5 }.Select(
             x => new SelectListItem
             {
                 Value = x.ToString(),
                 Text = x.ToString()
             }),
         "value",
         "text");
     ViewBag.MarkScale = scale;
 }
Esempio n. 14
0
        public FeedModule(IMovieService movieService, IVideoGameService videoGameService)
        {
            Get["/api/feed/{year}"] = _ =>
            {
                int year;
                int page;
                // make sure a year is being passed in.
                if (!int.TryParse(Context.Parameters.year, out year))
                    return HttpStatusCode.BadRequest;

                if (!int.TryParse(Request.Query.page, out page))
                    page = 1;
                // remove this line when the line below has been commented.
                //var items = movieService.GetByYear(year);

                // below will create a list combined of data from the different services.
                var items = new List<Item>().Concat(movieService.GetByYear(year, page)).Concat(videoGameService.GetByYear(year, page)).ToList();

                return Response.AsJson<IList<Item>>(items.Shuffle<Item>());
            };
        }
        public DataCollector(IMovieService movieService, IPersonService personService, IOptions<AppSettings> options)
        {
            _movieService = movieService;
            _personService = personService;

            var appSettings = options.Options;
            _token = appSettings.MyApiFilmsToken;

            _queue = new ConcurrentQueue();
            _queue.PushIncompleteMovie("The Adventures of Mickey Matson and Copperhead Treasure");
            _queue.PushIncompleteMovie("Lost in the Future");
            _queue.PushIncompleteMovie("American Scream King");
            _queue.PushIncompleteMovie("Eddie and the Alternate Universe");
            _queue.PushIncompleteMovie("The Christmas Bunny");
            _queue.PushIncompleteMovie("---"); // "---" is used to indicate end, this is so it properly runs in parallel
            _queue.PushIncompletePerson("Matthew Settle");
            _queue.PushIncompletePerson("Jennifer Esposito");
            _queue.PushIncompletePerson("John Hawkes");
            _queue.PushIncompletePerson("Tate Donovan");
            _queue.PushIncompletePerson("Michael Greene");
            _queue.PushIncompletePerson("---"); // "---" is used to indicate end, this is so it properly runs in parallel
        }
Esempio n. 16
0
 /// <summary>
 /// Initializes a new instance of the SubtitlesViewModel class.
 /// </summary>
 /// <param name="movieService">The movie service</param>
 public SubtitlesViewModel(IMovieService movieService)
 {
     _movieService = movieService;
     _cancellationDownloadingSubtitlesToken = new CancellationTokenSource();
 }
Esempio n. 17
0
 public MainViewModel(IMovieService service)
 {
     _service = service;
 }
Esempio n. 18
0
 public MovieController(IMovieService myMovieService)
 {
     _movieService = myMovieService;
 }
Esempio n. 19
0
 public MovieController(IMovieService mService)
 {
     _mService = mService;
 }
Esempio n. 20
0
 public MovieController(ILogger <MovieController> logger, IMovieService movieService, IStatsService statsService)
 {
     _logger       = logger;
     _movieService = movieService;
     _statsService = statsService;
 }
Esempio n. 21
0
 public UserController(IUserService userService, IMovieService movieService)
 {
     _userService  = userService;
     _movieService = movieService;
 }
Esempio n. 22
0
 public MoviesController(IMovieService movieService, ILogger <MoviesController> logger, IHttpContextAccessor httpContextAccessor) : base(httpContextAccessor)
 {
     _movieService = movieService;
     _logger       = logger;
 }
Esempio n. 23
0
 public SearchController()
 {
     _movieService = new MovieService();
 }
 public MovieController(IMovieService movieService,
                        ICinemaService cinemaService)
 {
     _movieService  = movieService;
     _cinemaService = cinemaService;
 }
 public AdminController(IMovieService movieService)
 {
     _movieService = movieService;
 }
Esempio n. 26
0
 public MoviesController(MvcMovieContext context, IMovieService service)
 {
     _context     = context;
     this.service = service;
 }
 public StudiosActorsByMovieModel(IMovieService mservice, IActorService aservice, IStudioService sservice)
 {
     movieService  = mservice;
     actorService  = aservice;
     studioService = sservice;
 }
 public DemoController(IMovieService movieService)
 {
     _movieService = movieService;
 }
Esempio n. 29
0
 public MovieController(IMovieService service)
 {
     _service = service;
 }
 public MovieCountViewComponent(IMovieService movieServices)
 {
     this.movieServices = movieServices;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="HomeController" /> class.
 /// </summary>
 /// <param name="movieService">The movie Service.</param>
 public HomeController(IMovieService movieService)
 {
     this.movieService = movieService;
 }
Esempio n. 32
0
 public MoviesController(IMovieService expenseService)
 {
     this.movieService = expenseService;
 }
 public DetailedMovieViewModel(IMovieService service)
 {
     _service = service;
 }
Esempio n. 34
0
 /// <summary>
 /// Initializes a new instance of the SeenMovieTabViewModel class.
 /// </summary>
 /// <param name="applicationService">Application state</param>
 /// <param name="movieService">Movie service</param>
 /// <param name="userService">Movie history service</param>
 public SeenMovieTabViewModel(IApplicationService applicationService, IMovieService movieService,
                              IUserService userService)
     : base(applicationService, movieService, userService,
            () => LocalizationProviderHelper.GetLocalizedValue <string>("SeenTitleTab"))
 {
 }
Esempio n. 35
0
 public ImportService(UserManager <ApplicationUser> userManager, IAlbumService albumService, IBookService bookService, IGameService gameService, IMovieService movieService, IPopService popService)
 {
     _userManager  = userManager;
     _albumService = albumService;
     _bookService  = bookService;
     _gameService  = gameService;
     _movieService = movieService;
     _popService   = popService;
 }
Esempio n. 36
0
 public MoviesController(IMovieService service)
 {
     this.service = service;
 }
Esempio n. 37
0
 public ActorsController(IMovieService movieService)
 {
     _movieService = movieService;
 }
Esempio n. 38
0
 public MoviesController(IMovieService movieService)
 {
     _movieService = movieService;
 }
Esempio n. 39
0
 public UserController(IUserService userService, IMovieService movieService, ICurrentUserService currentUserService)
 {
     _userService        = userService;
     _movieService       = movieService;
     _currentUserService = currentUserService;
 }
Esempio n. 40
0
 public MovieController(IMovieService movieService, ILogger <MovieController> logger)
 {
     _movieService = movieService;
     _logger       = logger;
 }
Esempio n. 41
0
 /// <summary>
 /// Initializes a new instance of the MainViewModel class.
 /// </summary>
 /// <param name="genresViewModel">Instance of GenresViewModel</param>
 /// <param name="movieService">Instance of MovieService</param>
 /// <param name="movieHistoryService">Instance of MovieHistoryService</param>
 /// <param name="applicationState">Instance of ApplicationState</param>
 public MainViewModel(IGenresViewModel genresViewModel, IMovieService movieService,
     IMovieHistoryService movieHistoryService, IApplicationState applicationState)
 {
     _dialogCoordinator = DialogCoordinator.Instance;
     _movieService = movieService;
     _movieHistoryService = movieHistoryService;
     ApplicationState = applicationState;
     GenresViewModel = genresViewModel;
     RegisterMessages();
     RegisterCommands();
     AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
     AppDomain.CurrentDomain.ProcessExit += (sender, args) => _updateManager.Dispose();
     _updateManager = new UpdateManager(Constants.UpdateServerUrl, Constants.ApplicationName);
 }
Esempio n. 42
0
 public MovieController()
 {
     _movieService = new MovieService();
 }
 public GraphMovieController(IGraphMovieService graphMovieService, IMovieService movieService)
 {
     _graphMovieService = graphMovieService;
     _movieService = movieService;
 }
Esempio n. 44
0
 public HomeController(IMovieService movieService)
 {
     _movieService = movieService;
 }
Esempio n. 45
0
 public MovieExistsValidator(IMovieService seriesService)
     : base("This movie has already been added")
 {
     _seriesService = seriesService;
 }
Esempio n. 46
0
 public LatestMoviesModel(IMovieService movieService)
 {
     _movieService = movieService;
 }
Esempio n. 47
0
 public MovieController(IMovieService movieService, IGenreService genreService, ICertificationService certificationService)
 {
     _movieService = movieService;
     _genreService = genreService;
     _certificationService = certificationService;
 }
Esempio n. 48
0
 public MovieCountViewComponent(IMovieService movieService)
 {
     _movieService = movieService;
 }
Esempio n. 49
0
 public MediaController(IMovieService movieService, ITvService tvService, IMembershipService membershipService)
 {
     _movieService = movieService;
     _tvService = tvService;
     _membershipService = membershipService;
 }
Esempio n. 50
0
 public MovieController(IMovieService service)
 {
     _service = service;
 }
 public MoviesController(IMovieService movieService)
 {
     this._movieService = movieService;
 }
Esempio n. 52
0
 public DetailedMovieViewModel(IMovieService service)
 {
     _service = service;
 }
Esempio n. 53
0
 public MovieController()
 {
     _movieService = new MovieService();
 }
 public MovieController(IMovieService movieService, IGenreService genreService)
 {
     this.movieService = movieService ?? throw new ArgumentNullException(nameof(movieService));
     this.genreService = genreService ?? throw new ArgumentNullException(nameof(genreService));
 }
Esempio n. 55
0
 public MovieAjaxController(IMovieService movieService)
 {
     _movieService = movieService;
 }
 public MoviesController(ILogger <MoviesController> logger, IMovieService movieService, IMovieMapper movieMapper)
 {
     _logger       = logger;
     _movieService = movieService;
     _movieMapper  = movieMapper;
 }
Esempio n. 57
0
 public MostVisitedRazorModel(IMovieService movieService)
 {
     _movieService = movieService;
 }
Esempio n. 58
0
 public void TearDown()
 {
     _mockMovieRepo = null;
     _movieService  = null;
 }
 public MovieImportController(IMovieService movieService, IMembershipService membershipService)
 {
     _movieService = movieService;
     _membershipService = membershipService;
 }
Esempio n. 60
0
 /// <summary>
 /// Initialize a new instance of GenresViewModel class
 /// </summary>
 /// <param name="movieService">The movie service</param>
 public GenresViewModel(IMovieService movieService)
 {
     _movieService = movieService;
     _cancellationLoadingGenres = new CancellationTokenSource();
     RegisterMessages();
 }