/// <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; }
/// <summary> /// Constructor /// </summary> /// <param name="model"></param> public ReadOnlyView(AnimalsModel model) { InitializeComponent(); myModel = model; }
/// <summary> /// Constructor /// </summary> /// <param name="model"></param> public GraphicView(AnimalsModel model) { InitializeComponent(); myModel = model; }
/// <summary> /// Constructor /// </summary> /// <param name="model"></param> public TextView(AnimalsModel model) { InitializeComponent(); myModel = model; }
public AnimalView(AnimalsModel model) { myModel = model; }