Exemple #1
0
 private void button6_Click(object sender, EventArgs e)
 {
     myViewForm1         = new ViewForm1();
     myViewForm2         = new ViewForm2();
     myViewForm3         = new ViewForm3();
     myViewForm1.MyModel = theModel;
     myViewForm2.MyModel = theModel;
     myViewForm3.MyModel = theModel;
     theController.AddView(myViewForm1);
     theController.AddView(myViewForm2);
     theController.AddView(myViewForm3);
 }
Exemple #2
0
        private void completeSetUp()
        {
            // make controller
            theController = new ItemController();
            // make model
            theModel = new ItemModel(theController);
            // make views
            myViewForm1         = new ViewForm1();
            myViewForm2         = new ViewForm2();
            myViewForm3         = new ViewForm3();
            myViewForm1.MyModel = theModel;
            myViewForm2.MyModel = theModel;
            myViewForm3.MyModel = theModel;

            theController.AddView(myViewForm1);
            theController.AddView(myViewForm2);
            theController.AddView(myViewForm3);

            //show views
            myViewForm3.Show();
            myViewForm2.Show();
            myViewForm1.Show();
        }