Пример #1
0
 /// <summary>
 /// Display all views
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btn_show_views_Click(object sender, EventArgs e)
 {
     if (theController == null)
     {
         MessageBox.Show("Please Make the Controller First by clicking on 'Create Controller' button. ");
     }
     else
     {
         if (theModel == null)
         {
             MessageBox.Show("Please Make the Model by clicking on 'Create Model' button");
         }
         else
         {
             if (!isViewCreated)
             {
                 MessageBox.Show("please Create views by clicking on 'Create Views' button");
             }
             else
             {
                 view2.Show();
                 view1.Show();
                 view3.Show();
             }
         }
     }
 }
Пример #2
0
        /// <summary>
        /// intialize controller, model, views and display views
        /// </summary>
        private void CompleteSetUp()
        {
            theController = new PersonControllers();
            theModel      = new PersonModels(theController);
            view2         = new SecondView();
            view1         = new FirstView();
            view3         = new ThirdView();
            view2.MyModel = theModel;
            view1.MyModel = theModel;
            view3.MyModel = theModel;

            theController.addView(view2);
            theController.addView(view1);
            theController.addView(view3);
            view2.Show();
            view1.Show();
            view3.Show();
            isViewCreated = true;
        }