main
1using momoney.presentation.presenters;
2using MoMoney.Presentation.Winforms.Resources;
3using XPExplorerBar;
4
5namespace MoMoney.Presentation.Presenters
6{
7 public class AddIncomeTaskPane : IActionTaskPaneFactory
8 {
9 readonly IRunPresenterCommand command;
10
11 public AddIncomeTaskPane(IRunPresenterCommand command)
12 {
13 this.command = command;
14 }
15
16 public Expando create()
17 {
18 return Build.task_pane()
19 .named("Income")
20 .with_item(
21 Build.task_pane_item()
22 .named("Add Income")
23 .represented_by_icon(ApplicationIcons.AddNewIncome)
24 .when_clicked_execute(() => command.run<IAddNewIncomePresenter>())
25 )
26 .with_item(
27 Build.task_pane_item()
28 .named("View All Income")
29 .represented_by_icon(ApplicationIcons.ViewAllIncome)
30 .when_clicked_execute(() => command.run<IViewIncomeHistoryPresenter>())
31 )
32 .build();
33 }
34 }
35}