summaryrefslogtreecommitdiff
path: root/src/Notepad/Presentation/Model/Menu/File/SaveAsMenuItem.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Notepad/Presentation/Model/Menu/File/SaveAsMenuItem.cs')
-rw-r--r--src/Notepad/Presentation/Model/Menu/File/SaveAsMenuItem.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Notepad/Presentation/Model/Menu/File/SaveAsMenuItem.cs b/src/Notepad/Presentation/Model/Menu/File/SaveAsMenuItem.cs
new file mode 100644
index 0000000..859ad32
--- /dev/null
+++ b/src/Notepad/Presentation/Model/Menu/File/SaveAsMenuItem.cs
@@ -0,0 +1,24 @@
+using Notepad.Presentation.Presenters.Commands;
+using Notepad.Presentation.Presenters.Menu.File;
+
+namespace Notepad.Presentation.Model.Menu.File {
+ public class SaveAsMenuItem : IMenuItem {
+ private readonly IRunPresenterCommand<ISaveAsPresenter> saveAsCommand;
+
+ public SaveAsMenuItem(IRunPresenterCommand<ISaveAsPresenter> saveAsCommand) {
+ this.saveAsCommand = saveAsCommand;
+ }
+
+ public string Name() {
+ return "Save &As...";
+ }
+
+ public void Click() {
+ saveAsCommand.Execute();
+ }
+
+ public bool BelongsTo(ISubMenu menu) {
+ return menu.Name().Equals(MenuNames.File);
+ }
+ }
+} \ No newline at end of file