Sample MVC / MVP winforms Application (Non Trivial

2020-05-28 03:44发布

问题:

I'm looking for a non-trivial example of MVC/MVP implemented in Winforms (C# .NET). I searched the website but getting only trivial examples, a little more would be helpful.

I'm Particularly looking at ways to implement views (view for a master-child model) and controllers/presenters.

回答1:

This project covers a lot more than just the forms - it demonstrates CQRS and EventSourcing amongst others, but also uses MVP (Simple View type) for it's UI:

It is designed to be a demo application and there is a lot of information in his blog about it too (links in his readme.txt on gitHub.)

Fohjin by Mark Nijof



回答2:

I was working on windows form project (the project is using third party winform library not compatile with wpf) and searching for mvp best practice for winform; I found Mini SQL Query at codeplex: http://minisqlquery.codeplex.com/

this covers winform, mvp, dependency injection with castle windsor, weifen luo docking suite, command pattern, etc

so far this is best real working winform mvp sample for me(not too complex once you know how the components interconnected)

ps: the castle library used is version 2.5 so if you upgrade to version 3 this project won't compile



回答3:

Have a look at Koossery.MVCWin. It has links to some tutorials that should provide some sample applications. In addition, it's an actual MVC framework, so it might help you get there faster.

http://koosserymvcwin.codeplex.com/

Also have a look at MVCSharp.

http://mvcsharp.org/