diff options
Diffstat (limited to 'src/Notepad/Presentation/Model/Menu/File/ExitMenuItem.cs')
| -rw-r--r-- | src/Notepad/Presentation/Model/Menu/File/ExitMenuItem.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/Notepad/Presentation/Model/Menu/File/ExitMenuItem.cs b/src/Notepad/Presentation/Model/Menu/File/ExitMenuItem.cs new file mode 100644 index 0000000..c926dac --- /dev/null +++ b/src/Notepad/Presentation/Model/Menu/File/ExitMenuItem.cs @@ -0,0 +1,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);
+ }
+ }
+}
\ No newline at end of file |
