blob: 896e722b1a3964d6d3678e833a0b9f54550dbc1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
using System.Windows.Forms;
using Gorilla.Commons.Utility.Extensions;
using MoMoney.Presentation.Core;
using MoMoney.Presentation.Model.Menu;
using MoMoney.Presentation.Views.Shell;
namespace MoMoney.Presentation.Presenters.Menu
{
public interface IApplicationMenuPresenter : IPresenter
{
}
public class ApplicationMenuPresenter : IApplicationMenuPresenter
{
readonly ISubMenuRegistry registry;
readonly IRegionManager shell;
public ApplicationMenuPresenter(ISubMenuRegistry registry, IRegionManager shell)
{
this.registry = registry;
this.shell = shell;
}
public void run()
{
shell.region<MenuStrip>(x => registry.all().each(y => y.add_to(x)));
}
}
}
|