main
 1using System.Windows.Forms;
 2using gorilla.commons.utility;
 3using MoMoney.Presentation.Core;
 4using MoMoney.Presentation.Model.Menu;
 5using momoney.presentation.views;
 6
 7namespace momoney.presentation.presenters
 8{
 9    public interface IApplicationMenuPresenter : IPresenter {}
10
11    public class ApplicationMenuPresenter : IApplicationMenuPresenter
12    {
13        readonly ISubMenuRegistry registry;
14        readonly IRegionManager shell;
15
16        public ApplicationMenuPresenter(ISubMenuRegistry registry, IRegionManager shell)
17        {
18            this.registry = registry;
19            this.shell = shell;
20        }
21
22        public void run()
23        {
24            shell.region<MenuStrip>(x => registry.all().each(y => y.add_to(x)));
25        }
26    }
27}