//constructeur permettant de relier les differentes parties
        public PresenterRandomNumberGenerator(ModelRandomNumberGenerator model_, RandomNumberGeneratorView view_)
        {
            this.model = model_;
            this.view  = view_;

            view._Presenter = this;
        }
Пример #2
0
        private void MenuItemPickNumber_Click(object sender, EventArgs e)
        {
            ModelRandomNumberGenerator model = new ModelRandomNumberGenerator();

            RandomNumberGeneratorView view = new RandomNumberGeneratorView();

            PresenterRandomNumberGenerator presenter = new PresenterRandomNumberGenerator(model, view);

            view.Visible = true;
            this.Visible = false;
        }