blob: c926dac625cbbc21704fc395e01a168c90c87df8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
using Notepad.Presentation.Model.Menu.File.Commands;
namespace Notepad.Presentation.Model.Menu.File {
public class ExitMenuItem : IMenuItem {
private readonly IExitCommand exitCommand;
public ExitMenuItem(IExitCommand exitCommand) {
this.exitCommand = exitCommand;
}
public string Name() {
return "E&xit";
}
public void Click() {
exitCommand.Execute();
}
public bool BelongsTo(ISubMenu menu) {
return menu.Name().Equals(MenuNames.File);
}
}
}
|