mvp

How to Structure a C# WinForms Model-View-Presenter (Passive View) Program?

荒凉一梦 提交于 2021-02-05 13:54:18
问题 I am designing a GUI that has the following basic idea (similarly modeled after Visual Studio's basic look-and-feel): File navigation Control selector (for selecting what to display in the Editor component) Editor Logger (errors, warnings, confirmation, etc.) For now, I will be using a TreeView for file navigation, a ListView for selecting controls to be displayed in the Editor and a RichTextBox for the Logger. The Editor will have 2 types of editing modes depending on what is selected in the

Dagger2 Error at inject in a class who injects

橙三吉。 提交于 2020-06-29 03:41:55
问题 I'm trying to inject in my presenter an interactor but gives me an error, at seems I can't inject in a class who injects to another: error: [Dagger/DuplicateBindings] com.example.calculadora.Data.Interactor.Operacion is bound multiple times: @Provides com.example.calculadora.Data.Interactor.Operacion com.example.calculadora.Inject.InteractorModule.provideDiv() @Provides com.example.calculadora.Data.Interactor.Operacion com.example.calculadora.Inject.InteractorModule.provideMult() @Provides

How to use empty view with pagination using paging library android?

喜欢而已 提交于 2020-06-10 12:12:05
问题 How to determine size of data returned before setting adapter? How to use emptyview with paging library? How to set emptyview if pagedlist returns null or no data? 回答1: Update[24/04/19]: I just found out that the library already provide us a way to listen to empty initial load, using PagedList.BoundaryCallback<YourItem> . *Note that my old answer is still a valid alternative. val livedPageList = LivePagedListBuilder(sourceFactory, config) .setBoundaryCallback(object: PagedList

android MVP - can I have multiple presenters for custom views and fragments

喜你入骨 提交于 2020-04-05 17:45:56
问题 So I have an a presenter that is already tied to an activity. The book says that one presenter should be tied to one view. But now I am adding a few fragments and lots of custom views. I am considering a fragment to be a view as well. The custom views will contain a little bit of logic in them. Both the fragments and custom views are contained in my activity of course. My question is, should I re-use the same presenter in the fragment and custom views or should each view get its own presenter

EF4 two models one database, possible?

社会主义新天地 提交于 2020-02-24 04:13:10
问题 I have been searching for this answer and can't seem to find anything, but with EF4 I want to create a base model and put in our 'foundation' and any new project we create if we need to add custom tables to that sites db is it possible to add a model with just those specific tables and link it to the model in our 'foundation' I can't seem to find a good resource on something like this and this seems to be like it would be a normal thing to have a reusable base model and a separate one for any

EF4 two models one database, possible?

拈花ヽ惹草 提交于 2020-02-24 04:12:22
问题 I have been searching for this answer and can't seem to find anything, but with EF4 I want to create a base model and put in our 'foundation' and any new project we create if we need to add custom tables to that sites db is it possible to add a model with just those specific tables and link it to the model in our 'foundation' I can't seem to find a good resource on something like this and this seems to be like it would be a normal thing to have a reusable base model and a separate one for any

Repository design pattern - should there be one repo for every Dao?

本小妞迷上赌 提交于 2020-02-21 18:16:23
问题 i have a few DAOs in my app which access a database for CRUD operations. Lets say there News, weather and , sports DAO. So im confused on how many Repositories i would need. should i just use one repository say DataRepository and let me hold my database and all dao's. and encapsulate methods for the CRUD operations in it ? or should each DAO have its own repository ? I mean a repository should return only data objects that the calling layer understands. so its like a encapsulation over the