Пример #1
0
        /// <summary>method: completeSetUp
        /// make controller
        /// make model
        /// make views and
        /// show views
        /// </summary>
        private void completeSetUp()
        {
            // make controller
            theController = new ShapesController();
            // make model
            theModel = new ShapesModel(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();
        }
Пример #2
0
 private void btnShowViews_Click(object sender, System.EventArgs e)
 {
     myViewForm1.Show();
     myViewForm2.Show();
     myViewForm3.Show();
 }