public MainFormPresenter(IMainFormView view, IMainFormModel mainFormModel, IInfoTextModel infoTextModel, IWebCollectionProvider webCollectionProvider)
        {
            _view          = view;
            _mainFormModel = mainFormModel;

            //Combined listing (Collections+Beatmaps)
            BeatmapListingModel = new BeatmapListingModel(null);
            BeatmapListingModel.BeatmapsDropped        += BeatmapListing_BeatmapsDropped;
            BeatmapListingModel.SelectedBeatmapChanged += BeatmapListingViewOnSelectedBeatmapChanged;
            CollectionListingModel = new CollectionListingModel(Initalizer.LoadedCollections, _mainFormModel.GetCollectionEditor());
            CollectionListingModel.CollectionEditing          += CollectionListing_CollectionEditing;
            CollectionListingModel.SelectedCollectionsChanged += CollectionListing_SelectedCollectionsChanged;
            new CombinedListingPresenter(_view.CombinedListingView, CollectionListingModel, BeatmapListingModel, webCollectionProvider, mainFormModel.GetUserDialogs());

            //Beatmap preview stuff (images, beatmap info like ar,cs,stars...)
            _combinedBeatmapPreviewModel = new CombinedBeatmapPreviewModel();
            var presenter = new CombinedBeatmapPreviewPresenter(_view.CombinedBeatmapPreviewView, _combinedBeatmapPreviewModel);

            presenter.MusicControlModel.NextMapRequest += (s, a) => { _view.CombinedListingView.beatmapListingView.SelectNextOrFirst(); };

            _collectionTextModel = new CollectionTextModel();
            new CollectionTextPresenter(_view.CollectionTextView, _collectionTextModel);

            //General information (Collections loaded, update check etc.)
            InfoTextModel = infoTextModel;
            new InfoTextPresenter(_view.InfoTextView, InfoTextModel);
        }
        public CombinedBeatmapPreviewPresenter(ICombinedBeatmapPreviewView view, ICombinedBeatmapPreviewModel model)
        {
            _view  = view;
            _model = model;
            _model.BeatmapChanged += ModelOnBeatmapChanged;
            _beatmapThumbnailModel = new BeatmapThumbnailModel();
            new BeatmapThumbnailPresenter(_view.BeatmapThumbnailView, _beatmapThumbnailModel);

            MusicControlModel = new MusicControlModel();
            new MusicControlPresenter(_view.MusicControlView, MusicControlModel);
        }
Example #3
0
        public BeatmapListingFormPresenter(IBeatmapListingForm view)
        {
            _view = view;
            //_view.BeatmapListingView.SelectedBeatmapChanged += BeatmapListingView_SelectedBeatmapChanged;
            BeatmapListingModel = new BeatmapListingModel(Initalizer.LoadedBeatmaps);
            BeatmapListingModel.SelectedBeatmapChanged += BeatmapListingView_SelectedBeatmapChanged;
            new BeatmapListingPresenter(_view.BeatmapListingView, BeatmapListingModel);

            _combinedBeatmapPreviewModel = new CombinedBeatmapPreviewModel();
            var presenter = new CombinedBeatmapPreviewPresenter(_view.CombinedBeatmapPreviewView, _combinedBeatmapPreviewModel);

            presenter.MusicControlModel.NextMapRequest += (s, a) => _view.BeatmapListingView.SelectNextOrFirst();
        }