summaryrefslogtreecommitdiff
path: root/src/Notepad/Presentation/Context/NotepadApplicationContext.cs
blob: 8fda742c1c64f1aaafabc26e9a5bd97f77a7136d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
        }
    }
}