Пример #1
0
 /// <summary>
 /// 用于向 ResImages EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet&lt;T&gt; 属性的 .Add 方法。
 /// </summary>
 public void AddToResImages(ResImage resImage)
 {
     base.AddObject("ResImages", resImage);
 }
Пример #2
0
 /// <summary>
 /// 创建新的 ResImage 对象。
 /// </summary>
 /// <param name="id">id 属性的初始值。</param>
 public static ResImage CreateResImage(global::System.String id)
 {
     ResImage resImage = new ResImage();
     resImage.id = id;
     return resImage;
 }
Пример #3
0
 private ResImage GetImageDetail(string res_id, FileInfo file)
 {
     ResImage img = new ResImage();
     Folder folder = osShell.NameSpace(file.DirectoryName);
     FolderItem folderitem = folder.ParseName(file.Name);
     img.id = res_id;
     img.filename = folder.GetDetailsOf(folderitem, 0);
     img.fileext = folder.GetDetailsOf(folderitem, 2);
     img.filesize = folder.GetDetailsOf(folderitem, 1);
     img.filetype = img.fileext;
     img.width = folder.GetDetailsOf(folderitem, 26);
     img.height = folder.GetDetailsOf(folderitem, 28);
     img.dpi = folder.GetDetailsOf(folderitem, 22);
     img.thumb = ImageManager.BinaryThumbnail(file.FullName, 100);
     return img;
 }