private IList <SystemFileWrapper> ReadSharedFolderContent(string sharedFolderPath) { List <SystemFileWrapper> pics = new List <SystemFileWrapper>(); string[] jpgPics = Directory.GetFiles(sharedFolderPath, "*.jpg"); string[] pngPics = Directory.GetFiles(sharedFolderPath, "*.png"); string[] tifPics = Directory.GetFiles(sharedFolderPath, "*.tif"); foreach (string path in jpgPics) { SystemFileWrapper wrapper = CreateFile(path); pics.Add(wrapper); } foreach (string path in pngPics) { SystemFileWrapper wrapper = CreateFile(path); pics.Add(wrapper); } foreach (string path in tifPics) { SystemFileWrapper wrapper = CreateFile(path); pics.Add(wrapper); } //Sort dates in descending order form leatest to oldest. pics.Sort((x, y) => y.Date.CompareTo(x.Date)); return(pics); }
void UpdateShownPicture(SystemFileWrapper picFile) { if (picFile == null) { return; } SelectedImage = new BitmapImage(new Uri(picFile.Path)); }