AODL.Document.Import.OpenDocument.OpenDocumentImporter.ReadImageResources C# (CSharp) Method

ReadImageResources() private method

Reads the image resources.
private ReadImageResources ( string folder ) : AODL.Document.TextDocuments.DocumentPictureCollection
folder string The folder.
return AODL.Document.TextDocuments.DocumentPictureCollection
		private DocumentPictureCollection ReadImageResources(string folder)
		{
			DocumentPictureCollection dpc	= new DocumentPictureCollection();
			//If folder not exists, return (folder will only unpacked if not empty)
			if (!Directory.Exists(folder))
				return dpc;
			//Only image files should be in this folder, if not -> Exception
			DirectoryInfo di				= new DirectoryInfo(folder);
			foreach(FileInfo fi in di.GetFiles())
			{
				DocumentPicture dp			= new DocumentPicture(fi.FullName);
				dpc.Add(dp);
			}

			return dpc;
		}