static void Postfix(PhotoAlbumMgr __instance, PhotoAlbumType type, ref PhotoAlbumData __result) { if (!enabled || type != PhotoAlbumType.Other || __result == null) { return; } __result.photos = customPhotos; }
static bool Prefix(PhotoAlbumData __instance, ref int __result) { if (!enabled || __instance.abumType != PhotoAlbumType.Other) { return(true); } __result = 1000; return(false); }
public AlbumInfoModel(PhotoAlbumData photoAlbumData, string createrUserName) { AlbumName = photoAlbumData.AlbumName; CreaterUser = createrUserName ?? ""; CreatTime = photoAlbumData.CreatTime; LastPhotoTime = photoAlbumData.LastPhotoTime ?? ""; PhotoAlbumId = photoAlbumData.PhotoAlbumId; PhotoIds = new uint[photoAlbumData.photos.Count]; for (int i = 0; i < photoAlbumData.photos.Count; i++) { PhotoIds[i] = photoAlbumData.photos[i].PhotoId; } }