Ejemplo n.º 1
0
        /// <summary>
        /// Set up MVC components and run them
        /// </summary>
        private void CompleteSetUp()
        {
            // make controller
            theController = new AnimalsController();
            // make model
            theModel = new AnimalsModel(theController);
            // make views
            myViewForm1 = new TextView(theModel);
            myViewForm2 = new GraphicView(theModel);
            myViewForm3 = new ReadOnlyView(theModel);

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

            //show views
            myViewForm3.Show();
            myViewForm2.Show();
            myViewForm1.Show();
            this.Visible = true;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="model"></param>
 public ReadOnlyView(AnimalsModel model)
 {
     InitializeComponent();
     myModel = model;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="model"></param>
 public GraphicView(AnimalsModel model)
 {
     InitializeComponent();
     myModel = model;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="model"></param>
 public TextView(AnimalsModel model)
 {
     InitializeComponent();
     myModel = model;
 }
Ejemplo n.º 5
0
 public AnimalView(AnimalsModel model)
 {
     myModel = model;
 }