summaryrefslogtreecommitdiff
path: root/src/Notepad/Presentation/Views/Menu/File
diff options
context:
space:
mode:
authormo <mo.khan@gmail.com>2018-11-04 15:22:16 -0700
committermo <mo.khan@gmail.com>2018-11-04 15:22:16 -0700
commit5ee1f55497a4e30322a56f133f897ecde1612967 (patch)
treebf544e0879234c3623869627d8786776cb19b8e9 /src/Notepad/Presentation/Views/Menu/File
initial commit.HEADmaster
Diffstat (limited to 'src/Notepad/Presentation/Views/Menu/File')
-rw-r--r--src/Notepad/Presentation/Views/Menu/File/ISaveAsView.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Notepad/Presentation/Views/Menu/File/ISaveAsView.cs b/src/Notepad/Presentation/Views/Menu/File/ISaveAsView.cs
new file mode 100644
index 0000000..e66de04
--- /dev/null
+++ b/src/Notepad/Presentation/Views/Menu/File/ISaveAsView.cs
@@ -0,0 +1,17 @@
+using System.Windows.Forms;
+using Notepad.Presentation.Presenters.Menu.File;
+
+namespace Notepad.Presentation.Views.Menu.File {
+ public interface ISaveAsView {
+ void AttachTo(ISaveAsPresenter presenterToDelegateWorkToo);
+ }
+
+ public class SaveAsView : ISaveAsView {
+ public void AttachTo(ISaveAsPresenter presenterToDelegateWorkToo) {
+ var saveFileDialog = new SaveFileDialog();
+ if (saveFileDialog.ShowDialog() == DialogResult.OK) {
+ presenterToDelegateWorkToo.SaveToFileAt(saveFileDialog.FileName);
+ }
+ }
+ }
+} \ No newline at end of file