summaryrefslogtreecommitdiff
path: root/product/Presentation/Presenters/AddBillingTaskPane.cs
blob: c6e6c5f41a7c419c21bf1a547cc3fc6660adce00 (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
35
using MoMoney.Presentation.Winforms.Resources;
using XPExplorerBar;

namespace MoMoney.Presentation.Presenters
{
    public class AddBillingTaskPane : IActionTaskPaneFactory
    {
        readonly IRunPresenterCommand command;

        public AddBillingTaskPane(IRunPresenterCommand command)
        {
            this.command = command;
        }

        public Expando create()
        {
            return Build
                .task_pane()
                .named("Billing")
                .with_item(
                Build.task_pane_item()
                    .named("Add Bill Payments")
                    .represented_by_icon(ApplicationIcons.AddBillPayment)
                    .when_clicked_execute(() => command.run<IAddBillPaymentPresenter>())
                )
                .with_item(
                Build.task_pane_item()
                    .named("View All Bills Payments")
                    .represented_by_icon(ApplicationIcons.ViewAllBillPayments)
                    .when_clicked_execute(() => command.run<IViewAllBillsPresenter>())
                )
                .build();
        }
    }
}