示例#1
0
        /// <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();
            }
        }
示例#2
0
 private void Model_StudentsUpdated(object sender, EventArgs e)
 {
     Model = sender as IRatingModel;
     lock (views)
     {
         views
         .ToList()
         .ForEach((x) =>
         {
             x.Update(Model);
         });
     }
 }
示例#3
0
        public RatingPresenter(IRatingModel model)
        {
            Model = model;

            Model.StudentsUpdated += Model_StudentsUpdated;
        }