main
 1using System.Collections.Generic;
 2using MoMoney.DTO;
 3using momoney.presentation.presenters;
 4using MoMoney.Presentation.Views;
 5using MoMoney.Presentation.Winforms.Resources;
 6using MoMoney.Service.Contracts.Application;
 7using XPExplorerBar;
 8
 9namespace MoMoney.Presentation.Presenters
10{
11    public class AddReportingTaskPane : IActionTaskPaneFactory
12    {
13        readonly IRunPresenterCommand command;
14
15        public AddReportingTaskPane(IRunPresenterCommand command)
16        {
17            this.command = command;
18        }
19
20        public Expando create()
21        {
22            return Build.task_pane()
23                .named("Reports")
24                .with_item(
25                Build.task_pane_item()
26                    .named("View All Bills")
27                    .represented_by_icon(ApplicationIcons.ViewAllBillPayments)
28                    .when_clicked_execute(() => command.run<IReportPresenter<IViewAllBillsReport, IEnumerable<BillInformationDTO>, IGetAllBillsQuery>>())
29                )
30                .with_item(
31                Build.task_pane_item()
32                    .named("View All Income")
33                    .represented_by_icon(ApplicationIcons.ViewAllIncome)
34                    .when_clicked_execute(() => command.run<IReportPresenter<IViewAllIncomeReport, IEnumerable<IncomeInformationDTO>, IGetAllIncomeQuery>>())
35                )
36                .build();
37        }
38    }
39}