public void showSelectedMenu() { this.memberDAL = new MemberDALModel(); ListMembersView listMembersView = new ListMembersView(); StartMenuView.MenuChoice menuChoice = this.startView.GetMenuChoice(); if (menuChoice == StartMenuView.MenuChoice.AddMember) { AddMemberView addMemberView = new AddMemberView(); addMemberView.showAddMemberView(); AddMemberController addMemberController = new AddMemberController(addMemberView, memberDAL); } else if (menuChoice == StartMenuView.MenuChoice.CompactListMembers || menuChoice == StartMenuView.MenuChoice.VerboseListMembers) { if (menuChoice == StartMenuView.MenuChoice.CompactListMembers) { listMembersView.showCompactList(); } else { listMembersView.showVerboseList(); } MemberController listMemberController = new MemberController(listMembersView); } }
public MemberController(ListMembersView listMembersView) { this.memberDAL = new MemberDALModel(); this.listMembersView = listMembersView; this.selectedMember = this.listMembersView.GetMenuChoice(); this.memberView = new MemberView(this.selectedMember); this.memberView.showMember(); this.menuChoice = memberView.GetMenuChoice(); editMember(); }