Ejemplo n.º 1
0
        private void button1_Click(object sender, System.EventArgs e)
        {
            //create the model, controller and views
            theController = new ControllerX();
            myModel       = new ModelX(theController);
            frmView1      = new View1(myModel);
            frmView2      = new View2(myModel);

            //tell the controller about the views
            theController.AddView(frmView1);
            theController.AddView(frmView2);
        }
Ejemplo n.º 2
0
 public ModelX(ControllerX aController)         //constructor
 {
     theController = aController;
 }