コード例 #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
ファイル: RatingPresenter.cs プロジェクト: kpedltd/uisapp
 private void Model_StudentsUpdated(object sender, EventArgs e)
 {
     Model = sender as IRatingModel;
     lock (views)
     {
         views
         .ToList()
         .ForEach((x) =>
         {
             x.Update(Model);
         });
     }
 }
コード例 #3
0
ファイル: RatingPresenter.cs プロジェクト: kpedltd/uisapp
        public RatingPresenter(IRatingModel model)
        {
            Model = model;

            Model.StudentsUpdated += Model_StudentsUpdated;
        }