How to pass values between forms in c# windows application?

后端 未结 4 1461
渐次进展
渐次进展 2020-11-27 08:18

I have two forms A and B. Form A is the default start up form of the application. I do some stuffs in Form A and i then i want to run my Form B parallel and then pass a para

4条回答
  •  醉酒成梦
    2020-11-27 08:46

    You can utilize EventAggregator pattern, if you don't want to couple your forms.

    Some reading:

    • http://martinfowler.com/eaaDev/EventAggregator.html
    • http://codebetter.com/blogs/jeremy.miller/archive/2009/07/21/braindump-on-the-event-aggregator-pattern.aspx
    • http://codebetter.com/blogs/jeremy.miller/archive/2009/07/23/how-i-m-using-the-event-aggregator-pattern-in-storyteller.aspx

提交回复
热议问题