main
1using momoney.presentation.presenters;
2using MoMoney.Presentation.Winforms.Resources;
3using XPExplorerBar;
4
5namespace MoMoney.Presentation.Presenters
6{
7 public class AddCompanyTaskPane : IActionTaskPaneFactory
8 {
9 readonly IRunPresenterCommand command;
10
11 public AddCompanyTaskPane(IRunPresenterCommand command)
12 {
13 this.command = command;
14 }
15
16 public Expando create()
17 {
18 return Build.task_pane()
19 .named("Company")
20 .with_item(
21 Build.task_pane_item()
22 .named("Add Company")
23 .represented_by_icon(ApplicationIcons.AddCompany)
24 .when_clicked_execute(() => command.run<IAddCompanyPresenter>()))
25 .build();
26 }
27 }
28}