MVC 中的对话框窗口
我想问一个有关 MVC 和对话框窗口的一般性问题。虽然我对 MVC 模式不是很有经验,但我可以说理解它的原理。我不知道如何使用 MVC 管理对话框窗口。让我们看一下具体情况:我有一个主视图(窗口)和控制器。在主视图中,用户现在单击按钮或菜单“选项”。当然,“选项”窗口应该升起,并为用户显示多个选项。但谁真正负责创建和显示“选项”窗口? View 将信息发送到用户单击“选项”按钮的控制器。但现在怎么办?控制器应该自己创建新窗口吗?我不这么认为,它通常不会创建任何View类型的对象。风景?我也不这么认为,它无法从“选项”窗口管理“选项”信息。可能是其他人,但是谁...有人可以解释一下这应该如何工作吗?我首选的编程语言是 C#,但这更多的是原则。谢谢。
I'd like to ask a general question about MVC and dialog windows. Although I'm not very experienced in MVC pattern I can say understand its principles. What I don't know is how to manage dialog windows using MVC. Let's have a look at the particular situation: I have a main View (Window) and the controller. In the main View a user now clicks on button or menu "Options." The Options window should be raised, of course, and display several choices for the user. But who's actually responsible for creating and showing the Options window? View sends the information to the controller that user clicked on "Options" button. But now what? Controller should create new Window by itself? I don't think so, it usually doesn't create any objects of type View. The View? I also don't think so, it cannot manage Options information from the Options window. Someone else, probably, but who... Can somebody explain me how this should work, please? My preferred programming language is C# but this is more about principles. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论