Exemplo 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);
        }
Exemplo n.º 2
0
 public View2(ModelX theModel)
 {
     InitializeComponent();
     myModel = theModel;
 }