/// <summary> /// Обновить /// </summary> /// <param name="model"></param> public void Update(IRatingModel model) { if (model.Group.Id == Groups[groupComboBox.SelectedIndex].Id && model.Subject.Id == Subjects[subjectComboBox.SelectedIndex].Id) { StudentsRating = model.Students; DisposeRatingPanel(); FillRating(); } }
private void Model_StudentsUpdated(object sender, EventArgs e) { Model = sender as IRatingModel; lock (views) { views .ToList() .ForEach((x) => { x.Update(Model); }); } }
public RatingPresenter(IRatingModel model) { Model = model; Model.StudentsUpdated += Model_StudentsUpdated; }