-
Notifications
You must be signed in to change notification settings - Fork 2
Examples
Geiszl András edited this page Sep 20, 2015
·
6 revisions
using System.Collections.Generic;
using System.Linq;
List<iDevice> devices = iOSLib.GetDevices();
devices[0].Connect();
devices[0].GetPhotos();
DateTime lastYear = DateTime.Now.AddYears(-1);
List<Photo> removeList = devices[0].Photos.PhotoList
.Where(x => x.CreationTime < lastYear).ToList();
devices[0].Photos.RemovePhotos(removeList);
devices[0].Disconnect();using System.Collections.Generic;
using System.Linq;
List<iDevice> devices = iOSLib.GetDevices();
devices[0].Connect();
devices[0].GetPhotos();
List<Photo> saveList = devices[0].Photos.PhotoList
.Where(x => x.AlbumList.Any(y => y.Name == "Instagram")).ToList();
devices[0].Photos.SavePhotos(saveList, @"C:\Users\user\Desktop\Saved\");
devices[0].Disconnect();using System.Collections.Generic;
using System.Linq;
List<iDevice> devices = iOSLib.GetDevices();
devices[0].Connect();
devices[0].GetPhotos();
string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
var groupedPhotoList = devices[0].Photos.PhotoList.GroupBy(x => x.CreationTime,
(key, y) => new { date = key.Date, photos = y.ToList() });
foreach (var photosByAlbum in groupedPhotoList)
{
devices[0].Photos.SavePhotos(photosByAlbum.photos,
desktopPath + @"\Saved\" + photosByAlbum.date.ToString("d").Replace("/", "_"));
}
devices[0].Disconnect();