我觉得这里可能对 MVP 有一些误解——我写了一篇关于如何用 Windows Phone 7 做 MVP 的文章,但是我涵盖了 MVP 的基础知识,你应该能够理解一般理论,然后将其应用到 WinForms:
使用 MVP 模式开发 WP7 应用程序
但是为了快速回答你的问题,每个 Form 都应该实现一个 View 接口,每个 Presenter 应该处理 1 个且只有 1 个 View 接口。
当您想要打开子表单时,WinForms 变得棘手。我最终做的是让父 Presenter 直接在子 Presenter 上调用 Show 方法。然后,子 Presenter 将使用依赖注入来实例化相关 View 接口的实现。
更新 (因为我没有完全回答这个问题):)
让我描述一下我用于 winforms/MVP 应用程序的项目结构:
/ - solution root
/[App]Core - project that contains the Model - pure business logic
/[App]Core/Model - data model (lowercase "m"), POCOs
/[App]Core/Daos - data access layer (all interfaces)
/[App]Core/Services - business logic classes (interfaces and implementations)
/[App]Ui - project that contains all UI-related code, but is UI-agnostic
/[App]Ui/Model - contains POCOs that are used by the UI but not the Core
/[App]Ui/Presenters - contains presenters
/[App]Ui/Views - contains view interfaces
/[App][Platform] - project that contains all UI-specific code (e.g. WinRT, WinPhone, WinForms, WPF, Silverlight, etc)
/[App][Platform]/Daos - implementation of DAO interfaces defined in [App]Core
/[App][Platform]/Services - implementation of business logic interfaces defined in [App]Core
/[App][Platform]/Views - implementation of view interfaces defined in [App]Ui
这更像你要求的吗?