Exemplo n.º 1
0
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var repository = new Model.CustomerXmlRepository(Application.StartupPath);
            var view       = new View.CustomerForm();

            var presenter = new Presenter.CustomerPresenter(view, repository);

            Application.Run(view);
        }
Exemplo n.º 2
0
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var repository = new Model.CustomerXmlRepository(Application.StartupPath);
            var view = new View.CustomerForm();

            // TODO: IOC
            var presenter = new Presenter.CustomerPresenter(view, repository);

            Application.Run(view);
        }
Exemplo n.º 3
0
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var repository = new Model.CustomerXmlRepository(Application.StartupPath);
            var view       = new View.CustomerForm();

            // Poor Man's Dependency Injection/Pure Dependency Injection, Main() is the Composition Root.
            // See https://github.com/mrts/winforms-mvp/issues/2.
            var presenter = new Presenter.CustomerPresenter(view, repository);

            Application.Run(view);
        }