main
 1using System.Collections.Generic;
 2using MoMoney.Presentation.model.menu.help;
 3using momoney.presentation.presenters;
 4using MoMoney.Presentation.Presenters;
 5using MoMoney.Presentation.Winforms.Resources;
 6
 7namespace MoMoney.Presentation.Model.Menu.Help
 8{
 9    public interface IHelpMenu : ISubMenu
10    {
11    }
12
13    public class HelpMenu : SubMenu, IHelpMenu
14    {
15        readonly IRunPresenterCommand command;
16
17        public HelpMenu(IRunPresenterCommand command)
18        {
19            this.command = command;
20        }
21
22        public override string name
23        {
24            get { return "&Help"; }
25        }
26
27        public override IEnumerable<IMenuItem> all_menu_items()
28        {
29            yield return Create
30                .a_menu_item()
31                .named("&About")
32                .that_executes<IDisplayInformationAboutTheApplication>()
33                .represented_by(ApplicationIcons.About)
34                .build();
35
36            yield return Create
37                .a_menu_item()
38                .named("Check For Updates...")
39                .represented_by(ApplicationIcons.Update)
40                .that_executes(() => command.run<ICheckForUpdatesPresenter>())
41                .build();
42
43            yield return Create.a_menu_item_separator();
44
45            yield return Create
46                .a_menu_item()
47                .named("View Log File")
48                .represented_by(ApplicationIcons.ViewLog)
49                .that_executes(() => command.run<ILogFilePresenter>())
50                .build();
51        }
52    }
53}