Best Practice for BackGroundWorker in WinForms using an MVP architecture

前端 未结 2 529
再見小時候
再見小時候 2021-01-15 11:28

I am working on a winforms project. I am implementing an MVP architecture. I have some processing intensive jobs running at the presenter (Reading from file system and perfo

2条回答
  •  别那么骄傲
    2021-01-15 11:55

    Work should not be summoned by the presenter - add another model unit that does the work and call the work (can be via the gui) from the controller.

    (Have the view raise a Work event, handled by the controller, which summons the backgroundworker and calls the view on updates/completion).

提交回复
热议问题