예제 #1
0
 public ExamListItemViewModel(ExamListItemModel examListItemModel,
                              INotifyQualificationImageLoaded notifyQualificationImageLoaded,
                              INotifyExamSelected notifyExamSelected)
 {
     this.notifyExamSelected = notifyExamSelected;
     this.Exam          = examListItemModel.Exam;
     this.Qualification = new QualificationListViewModel(examListItemModel.Qualification, notifyQualificationImageLoaded, null);
 }
예제 #2
0
        public QualificationListViewModel(QualificationModel model,
                                          INotifyQualificationImageLoaded notifyQualificationImageLoaded,
                                          INotifyQualificationSelected notifyQualificationSelected)
        {
            this.code = model.Code;
            this.notifyQualificationImageLoaded = notifyQualificationImageLoaded;
            this.notifyQualificationSelected    = notifyQualificationSelected;

            picture = new BitmapImage();
            picture.DownloadCompleted += (s, e) =>
            {
                notifyQualificationImageLoaded.ImageLoaded();
            };

            picture.BeginInit();
            picture.UriSource = new Uri(model.PictureUrl);
            picture.EndInit();
        }