public IIPTCViewModel GetIPTCViewModel(BIF.SWE2.Interfaces.Models.IIPTCModel mdl) { return(new IPTCViewModel(mdl)); }
/// <summary> /// Returns a filterd list of Pictures from the directory, based on a database query. /// </summary> /// <returns></returns> public IEnumerable <IPictureModel> GetPictures(string namePart, IPhotographerModel photographerParts, BIF.SWE2.Interfaces.Models.IIPTCModel iptcParts, IEXIFModel exifParts) { if (namePart != null) { IPictureModel pi = new PictureModel("Blume.jpg"); foreach (IPictureModel pm in picl) { if (pm.FileName == pi.FileName) { pi.ID = pm.ID; } } Save(pi); } if (!string.IsNullOrEmpty(namePart)) { List <IPictureModel> result = new List <IPictureModel>(); foreach (IPictureModel p in picl) { if (p.FileName.ToLower().Contains(namePart.ToLower())) { result.Add(p); } } return(result); } else { return(picl); } }
/// <summary> /// returns picture based on filter criteria /// only namePart relevant - everything else will be ignored /// returns all pictures if namePart is null /// </summary> /// <param name="namePart"></param> /// <param name="photographerParts"></param> /// <param name="iptcParts"></param> /// <param name="exifParts"></param> /// <returns></returns> public IEnumerable <IPictureModel> GetPictures(string namePart, IPhotographerModel photographerParts, BIF.SWE2.Interfaces.Models.IIPTCModel iptcParts, IEXIFModel exifParts) { if (String.IsNullOrEmpty(namePart)) { return(UnfilteredPictures()); } else { return(FilteredPictures(namePart)); } }