Best Practice for BackGroundWorker in WinForms using an MVP architecture

前端 未结 2 537
再見小時候
再見小時候 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 12:09

    I think the view should be as passive as possible. The presenter should handle itself the events from the BackgroundWorker and translate this information to the view (e.g. update a list shown in a grid). To the view, this request should be no different than if the data had come directly from the presenter.

提交回复
热议问题