public Screenshot() { var now = DateTime.Now; Name = Taker.GetScreenName(now); Date = now; }
public static List <Screenshot> GetScreenshots(string path = "") { if (path.Equals("")) { path = Taker.GetPath(); } var result = new List <Screenshot>(); var filters = new[] { "jpg", "jpeg", "png", "gif", "tiff", "bmp" }; var files = GetFilesWithFilters(path, filters, false); foreach (var fileInfo in files.Select(file => new FileInfo(file))) { fileInfo.Refresh(); result.Add(new Screenshot { Name = fileInfo.Name, Date = fileInfo.CreationTime }); } return(result); }
public Screenshot(DateTime date) { Name = Taker.GetScreenName(date); Date = date; }