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

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

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

        public Expando create()
        {
            return Build.task_pane()
                .named("Company")
                .with_item(
                Build.task_pane_item()
                    .named("Add Company")
                    .represented_by_icon(ApplicationIcons.AddCompany)
                    .when_clicked_execute(() => command.run<IAddCompanyPresenter>()))
                .build();
        }
    }
}