Esempio n. 1
0
 public ShowController(ILogger <ShowController> logger, IIoService ioService, IMapper mapper, IShowService showService)
 {
     _logger      = logger;
     _ioService   = ioService;
     _mapper      = mapper;
     _showService = showService;
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the PopularShowTabViewModel class.
 /// </summary>
 /// <param name="applicationService">Application state</param>
 /// <param name="showService">Show service</param>
 /// <param name="userService">The user service</param>
 public PopularShowTabViewModel(IApplicationService applicationService, IShowService showService,
                                IUserService userService)
     : base(applicationService, showService, userService,
            () => LocalizationProviderHelper.GetLocalizedValue <string>("PopularTitleTab"))
 {
     SortBy = "watching";
 }
Esempio n. 3
0
 public SearchModel(ILogger <SearchModel> logger, IShowService show, ITagService tag, INavPageService navpage)
 {
     _logger  = logger;
     _show    = show;
     _tag     = tag;
     _navpage = navpage;
 }
Esempio n. 4
0
 public IndexModel(ILogger <IndexModel> logger, IShowService show, IEpisodeService episode, ITagService tag)
 {
     _logger  = logger;
     _show    = show;
     _episode = episode;
     _tag     = tag;
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HomeController" /> class.
 /// </summary>
 /// <param name="showService">The show service.</param>
 /// <param name="logger">The logger.</param>
 public HomeController(
     IShowService showService,
     ILogger <HomeController> logger)
 {
     this.showService = showService;
     this.logger      = logger;
 }
Esempio n. 6
0
 /// <summary>
 /// Initializes a new instance of the RecentShowTabViewModel class.
 /// </summary>
 /// <param name="applicationService">Application state</param>
 /// <param name="showService">Show service</param>
 /// <param name="userService">The user service</param>
 public RecentShowTabViewModel(IApplicationService applicationService, IShowService showService,
                               IUserService userService)
     : base(applicationService, showService, userService,
            () => LocalizationProviderHelper.GetLocalizedValue <string>("RecentTitleTab"))
 {
     SortBy = "year";
 }
Esempio n. 7
0
        public Cashier()
        {
            InitializeComponent();

            ticketServices = new TicketServices();
            showServices   = new ShowServices();

            dgvShows.ColumnCount     = 6;
            dgvShows.Columns[0].Name = "ID";
            dgvShows.Columns[1].Name = "Title";
            dgvShows.Columns[2].Name = "Genre";
            dgvShows.Columns[3].Name = "Distribution";
            dgvShows.Columns[4].Name = "Date";
            dgvShows.Columns[5].Name = "Tickets";

            showServices.getShows().ForEach(show => dgvShows.Rows.Add(show.ToStringArray()));

            dgvTickets.ColumnCount     = 4;
            dgvTickets.Columns[0].Name = "ID";
            dgvTickets.Columns[1].Name = "ShowID";
            dgvTickets.Columns[2].Name = "Row";
            dgvTickets.Columns[3].Name = "Seat";

            ticketServices.getTickets().ForEach(ticket => dgvTickets.Rows.Add(ticket.ToStringArray()));
        }
 public TicketsController(IShowService showService, ITicketService ticketService, UserManager <IdentityUser> userManager, ILogger <HomeController> logger)
 {
     _showService   = showService;
     _ticketService = ticketService;
     _userManager   = userManager;
     _logger        = logger;
 }
Esempio n. 9
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="movieService"><see cref="IMovieService"/></param>
 /// <param name="showService"><see cref="IShowService"/></param>
 /// <param name="userId">User Id (Machine Guid)</param>
 public UserService(IMovieService movieService, IShowService showService, string userId)
 {
     ShowService  = showService;
     MovieService = movieService;
     UserId       = userId;
     RestClient   = new RestClient(Constants.PopcornApi);
 }
Esempio n. 10
0
        /// <summary>
        /// Initializes a new instance of the WantedMoviesViewModel class.
        /// </summary>
        public SeasonViewModel(IShowService showService)
        {
            // The data service
            _showService = showService;

            // Get all the movies and add them to the Movies collection
            Seasons = new ObservableCollection<Season>();
            _showService.GetSeasons("75760", (result, error) =>
            {
                if (error != null)
                {
                    MessageBox.Show(error.Message);
                    return;
                }

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

                foreach (var season in result)
                {
                    Seasons.Add(season);
                }
            });
        }
Esempio n. 11
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="applicationService">The application service</param>
        /// <param name="showService">The show service</param>
        /// <param name="userService">The user service</param>
        /// <param name="genreService">The genre service</param>
        public ShowPageViewModel(IApplicationService applicationService, IShowService showService,
                                 IUserService userService, IGenreService genreService)
        {
            _showService        = showService;
            _userService        = userService;
            _applicationService = applicationService;
            GenreViewModel      = new GenreViewModel(userService, genreService);
            RegisterCommands();
            RegisterMessages();

            Search = new SearchShowViewModel();

            DispatcherHelper.CheckBeginInvokeOnUI(async() =>
            {
                Tabs.Add(new PopularShowTabViewModel(_applicationService, showService, userService));
                Tabs.Add(new GreatestShowTabViewModel(_applicationService, showService, userService));
                Tabs.Add(new RecentShowTabViewModel(_applicationService, showService, userService));
                Tabs.Add(new FavoritesShowTabViewModel(_applicationService, showService, userService));
                SelectedTab = Tabs.First();
                SelectedShowsIndexMenuTab = 0;
                await GenreViewModel.LoadGenresAsync().ConfigureAwait(false);
                await Tabs.ToList().ParallelForEachAsync(async tab =>
                {
                    await tab.LoadShowsAsync().ConfigureAwait(false);
                }).ConfigureAwait(false);
            });
        }
Esempio n. 12
0
        /// <summary>
        /// Initializes a new instance of the WantedMoviesViewModel class.
        /// </summary>
        public ShowsViewModel(IShowService showsService)
        {
            // The data service
            _showsService = showsService;

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

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

                foreach (var show in result)
                {
                    Shows.Add(new ShowViewModel(show));
                }

            });
        }
Esempio n. 13
0
 /// <summary>
 /// Initializes a new instance of the PopularShowTabViewModel class.
 /// </summary>
 /// <param name="applicationService">Application state</param>
 /// <param name="showService">Show service</param>
 public PopularShowTabViewModel(IApplicationService applicationService, IShowService showService)
     : base(applicationService, showService)
 {
     RegisterMessages();
     RegisterCommands();
     TabName = LocalizationProviderHelper.GetLocalizedValue <string>("PopularShowTitleTab");
 }
Esempio n. 14
0
 /// <summary>
 /// Initializes a new instance of the UpdatedShowTabViewModel class.
 /// </summary>
 /// <param name="applicationService">Application state</param>
 /// <param name="showService">Show service</param>
 /// <param name="userService">The user service</param>
 public UpdatedShowTabViewModel(IApplicationService applicationService, IShowService showService,
                                IUserService userService)
     : base(applicationService, showService, userService,
            () => LocalizationProviderHelper.GetLocalizedValue <string>("UpdatedTitleTab"))
 {
     SortBy = "date_added";
 }
Esempio n. 15
0
        public TvMazeWebService(HttpClient client, ILogger <TvMazeWebService> logger, IShowService showService)
        {
            _client      = client;
            _logger      = logger;
            _showService = showService;

            _shows = new List <TvShow>();
        }
Esempio n. 16
0
 public MovieController(PostgresDataContext context, IWebRequestHandler webRequest, IShowService showService, ILogger <HomeController> logger, UserManager <AppUser> _userManager)
 {
     this._userManager = _userManager;
     this._context     = context;
     this.logger       = logger;
     this.webRequest   = webRequest;
     this.showService  = showService;
 }
Esempio n. 17
0
 public ShowModel(ILogger <ShowModel> logger, IShowService show, IEpisodeService episode, ITagService tag, IRatingService rating)
 {
     _logger  = logger;
     _show    = show;
     _episode = episode;
     _tag     = tag;
     _rating  = rating;
 }
Esempio n. 18
0
 public ApiClientService(IJsonSerializeService jsonSerializeService, IShowService showService, IEpisodeService episodeService, ISearchService searchService, IShowExtendedService showExtendedService)
 {
     _jsonSerializeService = jsonSerializeService;
     _showService          = showService;
     _episodeService       = episodeService;
     _searchService        = searchService;
     _showExtendedService  = showExtendedService;
 }
Esempio n. 19
0
 public EpisodeModel(ILogger <EpisodeModel> logger, IShowService show, IEpisodeService episode, ITagService tag, IViewsService view)
 {
     _logger  = logger;
     _show    = show;
     _episode = episode;
     _tag     = tag;
     _view    = view;
 }
Esempio n. 20
0
 public ScraperService(HttpClient client, IShowService showService, ILogger <ScraperService> logger, IConfiguration configuration, ShowParser parser)
 {
     _client        = client;
     _showService   = showService;
     _logger        = logger;
     _configuration = configuration;
     _parser        = parser;
 }
Esempio n. 21
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ListController" /> class.
 /// </summary>
 /// <param name="showService">The show service.</param>
 /// <param name="mapper">The mapper.</param>
 /// <param name="logger">The logger.</param>
 public ListController(
     IShowService showService,
     IMapper mapper,
     ILogger<ListController> logger)
 {
     this.showService = showService;
     this.mapper = mapper;
     this.logger = logger;
 }
Esempio n. 22
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ScrapeController" /> class.
 /// </summary>
 /// <param name="showService">The show service.</param>
 /// <param name="tvMazeService">The tv maze service.</param>
 /// <param name="logger">The log service.</param>
 public ScrapeController(
     IShowService showService,
     ITvMazeService tvMazeService,
     ILogger <ScrapeController> logger)
 {
     this.showService   = showService;
     this.tvMazeService = tvMazeService;
     this.logger        = logger;
 }
Esempio n. 23
0
 public SearchPageViewModel(INavigationService navigationService,
                            IShowService showService,
                            IMovieService movieService) : base(navigationService)
 {
     _showService             = showService;
     _movieService            = movieService;
     SearchItemTappedCommand  = new DelegateCommand <MovieDbTrendingItem>(ItemTapped);
     SearchTypeChangedCommand = new DelegateCommand <ValueChangedEventArgs>(SearchTypeChanged);
     PropertyChanged         += ViewModelPropertyChanged;
 }
 public MonitorProgressService(RedseatDbContext dbContext, IShowService showService, IDownloadersService downloaderService, IDownloadsService downloadsService, ILogger <MonitorProgressService> logger, IParserService parserService, IBackgroundJobClient backgroundJobs)
 {
     _dbContext         = dbContext;
     _showService       = showService;
     _downloaderService = downloaderService;
     _downloadsService  = downloadsService;
     _logger            = logger;
     _parserService     = parserService;
     _backgroundJobs    = backgroundJobs;
 }
        public ShowController()
        {
            var dbFactory = new DatabaseFactory();

            this.showRepository         = new Repository <Domain.Show>(dbFactory);
            this.cinemaRepository       = new Repository <Domain.Cinema>(dbFactory);
            this.filmRepository         = new Repository <Domain.Film>(dbFactory);
            this.showtimefilmRepository = new Repository <Domain.ShowTimeFilm>(dbFactory);
            this.showService            = new ShowService(dbFactory);
            this.unitOfWork             = new UnitOfWork(dbFactory);
        }
Esempio n. 26
0
        /// <summary>
        /// Initializes a new instance of the ShowTabsViewModel class.
        /// </summary>
        /// <param name="applicationService">The application state</param>
        /// <param name="showService">Used to interact with shows</param>
        protected ShowTabsViewModel(IApplicationService applicationService, IShowService showService)
        {
            ApplicationService = applicationService;
            ShowService        = showService;

            RegisterMessages();
            RegisterCommands();

            MaxShowsPerPage          = Constants.Constants.MaxShowsPerPage;
            CancellationLoadingShows = new CancellationTokenSource();
        }
Esempio n. 27
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ScraperWorker" /> class.
 /// </summary>
 /// <param name="showService">The show service.</param>
 /// <param name="tvMazeService">The tv maze service.</param>
 /// <param name="hubContext">The hub context.</param>
 /// <param name="logger">The logger.</param>
 public ScraperWorker(
     IShowService showService,
     ITvMazeService tvMazeService,
     IHubContext <ScraperHub> hubContext,
     ILogger <ScraperWorker> logger)
 {
     this.showService   = showService;
     this.tvMazeService = tvMazeService;
     this.hubContext    = hubContext;
     this.logger        = logger;
 }
Esempio n. 28
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="showService">The show service</param>
        /// <param name="subtitlesService">The subtitles service</param>
        /// <param name="showTrailerService">The show trailer service</param>
        /// <param name="cacheService">The cache service</param>
        public ShowDetailsViewModel(IShowService showService, ISubtitlesService subtitlesService, IShowTrailerService showTrailerService, ICacheService cacheService)
        {
            _showTrailerService = showTrailerService;
            _showService        = showService;
            Show = new ShowJson();
            RegisterCommands();
            RegisterMessages();
            CancellationLoadingTrailerToken = new CancellationTokenSource();
            var downloadService = new DownloadShowService <EpisodeShowJson>(cacheService);

            DownloadShow = new DownloadShowViewModel(downloadService, subtitlesService, cacheService);
        }
Esempio n. 29
0
        public ExplorePageViewModel(INavigationService navigationService,
                                    IShowService showService,
                                    IMovieService movieService) : base(navigationService)
        {
            _showService  = showService;
            _movieService = movieService;

            ShowSelectedCommand  = new DelegateCommand <MovieDbTrendingItem>(ShowSelected);
            MovieSelectedCommand = new DelegateCommand <MovieDbTrendingItem>(MovieSelected);
            SearchCommand        = new DelegateCommand(Search);
            TrendingShows        = new ObservableCollection <MovieDbTrendingItem>();
        }
 /// <summary>
 /// Initializes a new instance of the FavoritesMovieTabViewModel class.
 /// </summary>
 /// <param name="applicationService">Application state</param>
 /// <param name="showService">Show service</param>
 /// <param name="userService">User service</param>
 public FavoritesShowTabViewModel(IApplicationService applicationService, IShowService showService,
                                  IUserService userService)
     : base(applicationService, showService, userService,
            () => LocalizationProviderHelper.GetLocalizedValue <string>("FavoritesTitleTab"))
 {
     Messenger.Default.Register <ChangeFavoriteShowMessage>(
         this,
         async message =>
     {
         await LoadShowsAsync();
     });
 }
        public ShowsListViewModel(RegionManager regionManager, TheMovieDBDataService dataService, ShowService showService)
        {
            _regionManager = regionManager;
            _dataService   = dataService;
            _showService   = showService;
            _logger        = LogManager.GetCurrentClassLogger();

            NavigateCommandShowDirectShow   = new DelegateCommand(NavigateShowDirectShow);
            NavigateCommandShowNextPage     = new DelegateCommand(ShowNextPage);
            NavigateCommandShowPriviousPage = new DelegateCommand(ShowPriviousPage);
            NotificationRequest             = new InteractionRequest <INotification>();
            NotificationRequestNull         = new InteractionRequest <INotification>();
        }
Esempio n. 32
0
 public ShowController(
     ICPURepository cPU,
     IGPURepository gPU,
     IGameRepository game,
     IShowService service,
     IMapper mapper)
 {
     Service        = service;
     Mapper         = mapper;
     CPURepository  = cPU;
     GPURepository  = gPU;
     gameRepository = game;
 }