Пример #1
0
    public void Initialize(SearchViewModel _viewModel, SearchPresenterModel _presenterModel,
                           Action <string> goToDetails)
    {
        viewModel      = _viewModel;
        presenterModel = _presenterModel;
        presenterModel.OnElementLoaded   += LoadPoster;
        presenterModel.OnElementRemoved  += RemovePoster;
        presenterModel.OnSearchRefreshed += SearchRefreshed;

        SetButtonActions(goToDetails);
        //presenterModel.OnElementLoaded +=
    }
Пример #2
0
    private void Start()
    {
        searchPM        = new SearchPresenterModel();
        searchPresenter = new SearchPresenterImpl(searchPM);

        searchInteractor = new MovieSearchImpl(searchPresenter, dataLoader, textureLoader);

        searchVM         = new SearchViewModel();
        searchController = new SearchController(searchInteractor, searchVM);

        detailsPM        = new DetailsPresenterModel();
        detailsPresenter = new DetailsPresenterImpl(detailsPM);

        detailsInteractor = new MovieDetailerImpl(detailsPresenter, textureLoader, dataLoader);

        detailsVM         = new DetailsViewModel();
        detailsController = new DetailsController(detailsInteractor, detailsVM);

        mainSearchView.Initialize(searchVM, searchPM, detailsController.SpecificSearch);
        detailsView.Initialize(detailsPM, detailsVM);
        relatedSearchView.SetButtonActions(detailsController.SpecificSearch);
    }
Пример #3
0
 public SearchPresenterImpl(SearchPresenterModel _model)
 {
     model            = _model;
     searchOutputData = new List <MovieSearchOutputData>();
 }