//Constructor public Model(ref ShoppingController aController) { shoppingList = new ArrayList(); theController = aController; produce = new ArrayList(); meat = new ArrayList(); personalCare = new ArrayList(); }
public ShoppingOrganizer() { InitializeComponent(); theController = new ShoppingController(); //Make model model = new Model(ref theController); //Make views frmTextView = new TextView(ref model); frmGraphicView = new GraphicView(ref model); frmReadOnlyView = new ReadOnlyView(ref model); theController.AddView(frmTextView); theController.AddView(frmGraphicView); theController.AddView(frmReadOnlyView); }