简体   繁体   English

使用MVP模式的Winform应用程序中的用户控件

[英]User controls in winform application with mvp pattern

I'm developing winform application using MVP pattern. 我正在使用MVP模式开发winform应用程序。 There are some user controls in my application which were created before. 我的应用程序中有一些以前创建的用户控件。 My question is: should I use MVP inside these controls? 我的问题是:我应该在这些控件中使用MVP吗? That is, do I have alter thier? 也就是说,我是否有其他选择?

Given the http://webformsmvp.com/ implementation I'd say you should alter the existing controls and use MVP pattern inside. 考虑到http://webformsmvp.com/的实现,我会说您应该更改现有控件并在其中使用MVP模式。

The reason is the communication among user-controls should be consistent. 原因是用户控件之间的通信应保持一致。 eg, do you want it to look like this: 例如,您是否希望它看起来像这样:

在此处输入图片说明

Or more elegant and uniform: 或更优雅,更统一:

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM