/// /// Method to Update an Entry /// public void Update(IPTCViewModel iptc) { License = iptc.License; PhotographerName = iptc.PhotographerName; Category = iptc.Category; IsEdited = iptc.IsEdited; KeyWords = iptc.KeyWords; Notes = iptc.Notes; CreationDate = iptc.CreationDate; }
public PictureViewModel(IPictureModel model) { if (model is PictureModel) { IPTC = new IPTCViewModel(model.IPTC); EXIF = new EXIFViewModel(model.EXIF); Photographer = new PhotographerViewModel(((PictureModel)model).Photographer); Camera = new CameraViewModel(model.Camera); EXIF.Camera = Camera; } if (model != null) { ID = model.ID; FileName = model.FileName; FilePath = GlobalInformation.Path + "\\" + FileName; DisplayName = FileName.Split('.')[0]; string name = model.FileName; string by = model.IPTC.ByLine; DisplayName = name + " (by " + Photographer.FirstName + " " + Photographer.LastName + ")"; } }