public ExamListItemViewModel(ExamListItemModel examListItemModel, INotifyQualificationImageLoaded notifyQualificationImageLoaded, INotifyExamSelected notifyExamSelected) { this.notifyExamSelected = notifyExamSelected; this.Exam = examListItemModel.Exam; this.Qualification = new QualificationListViewModel(examListItemModel.Qualification, notifyQualificationImageLoaded, null); }
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(); }