private void btnPlay_Click(object sender, EventArgs e) { //make controller theController = new BuildingsController(); //make model theModel = new BuildingsModel(theController); //make views myViewForm1 = new ViewForm1(); myViewForm2 = new ViewForm2(); myViewForm3 = new ViewForm3(); myViewForm1.MyModel = theModel; myViewForm2.MyModel = theModel; myViewForm3.MyModel = theModel; //add views to controller theController.AddView(myViewForm1); theController.AddView(myViewForm2); theController.AddView(myViewForm3); //show views myViewForm1.Show(); myViewForm3.Show(); myViewForm2.Show(); }
public BuildingsModel(BuildingsController buildingsController) { _buildingsController = buildingsController; AnyBuildings = new List <AnyBuilding>(); }