private void CollectionListing_CollectionEditing(object sender, CollectionEditArgs collectionEditArgs) { _mainFormModel.GetCollectionEditor()?.EditCollection(collectionEditArgs); }
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); }