public NewGroupForm(NewGroupFormController controller) { InitializeComponent(); _controller = controller; GetSpecialties(); codeSpecialtyComboBox.Text = _controller.CodeSpecialty.ToString(); _controller.PropertyChanged += _controller_PropertyChanged; }
private void newGroupButton_Click(object sender, EventArgs e) { var newGroupController = new NewGroupFormController(_controller.CodeSpecilty); var newGroupForm = new NewGroupForm(newGroupController); if (newGroupForm.ShowDialog() == DialogResult.OK) { IGroup newGroup = newGroupController.Group; _controller.AddGroup(newGroup); } ShowGroups(); }