blob: 3f30325ee067920b575a1db0e3fefb0ecb332c0a (
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
30
31
32
33
34
|
using System.Collections.Generic;
using Gorilla.Commons.Utility.Extensions;
using MoMoney.Presentation.Core;
using MoMoney.Presentation.Views;
namespace MoMoney.Presentation.Presenters
{
public interface IMainMenuPresenter : IContentPresenter
{
}
public class MainMenuPresenter : ContentPresenter<IMainMenuView>, IMainMenuPresenter
{
IRunPresenterCommand command;
public MainMenuPresenter(IMainMenuView view, IRunPresenterCommand command) : base(view)
{
this.command = command;
}
public override void run()
{
all_factories().each(x => view.add(x));
}
IEnumerable<IActionTaskPaneFactory> all_factories()
{
yield return new AddCompanyTaskPane(command);
yield return new AddIncomeTaskPane(command);
yield return new AddBillingTaskPane(command);
yield return new AddReportingTaskPane(command);
}
}
}
|