summaryrefslogtreecommitdiff
path: root/src/Notepad/Presentation/Context/NotepadApplicationContext.cs
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/Context/NotepadApplicationContext.cs
initial commit.HEADmaster
Diffstat (limited to 'src/Notepad/Presentation/Context/NotepadApplicationContext.cs')
-rw-r--r--src/Notepad/Presentation/Context/NotepadApplicationContext.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Notepad/Presentation/Context/NotepadApplicationContext.cs b/src/Notepad/Presentation/Context/NotepadApplicationContext.cs
new file mode 100644
index 0000000..8fda742
--- /dev/null
+++ b/src/Notepad/Presentation/Context/NotepadApplicationContext.cs
@@ -0,0 +1,18 @@
+using System.Windows.Forms;
+using Notepad.Presentation.Core;
+using Notepad.Presentation.Model.Menu.File.Commands;
+using Notepad.Presentation.Presenters.Shell;
+using Notepad.Presentation.Views.Shell;
+
+namespace Notepad.Presentation.Context {
+ public class NotepadApplicationContext : ApplicationContext {
+ public NotepadApplicationContext(
+ WindowShell shellView,
+ IExitCommand exitCommand,
+ IApplicationController applicationController) {
+ shellView.Closed += delegate { exitCommand.Execute(); };
+ applicationController.Run<IMainShellPresenter>();
+ MainForm = shellView;
+ }
+ }
+} \ No newline at end of file