main
 1using momoney.presentation.model.eventing;
 2using MoMoney.Presentation.Presenters;
 3using MoMoney.Service.Infrastructure.Eventing;
 4
 5namespace MoMoney.Modules
 6{
 7    public class MainMenuModule : IMainMenuModule
 8    {
 9        readonly IEventAggregator broker;
10        readonly IRunPresenterCommand command;
11
12        public MainMenuModule(IEventAggregator broker, IRunPresenterCommand command)
13        {
14            this.broker = broker;
15            this.command = command;
16        }
17
18        public void run()
19        {
20            broker.subscribe_to(this);
21        }
22
23        public void notify(NewProjectOpened message)
24        {
25            command.run<IMainMenuPresenter>();
26        }
27    }
28}