protected void CreateImageUrl(imageType itemType) { this.ImageUrl = null; if (ImageId == null) { ImageUrl = null; return; } switch (itemType) { case imageType.product: ImageUrl = "Products/" + ImageId.ToString() + ".jpg"; break; case imageType.category: ImageUrl = "Categories/" + ImageId.ToString() + ".jpg"; break; case imageType.item: ImageUrl = "Items/" + ImageId.ToString() + ".jpg"; break; default: ImageUrl = null; break; } }
static public Image findAndClone(imageType type) { for (int i = 0; i < NextSlot; ++i) { if (type == PrototypeList[i].returnType()) { return(PrototypeList[i].clone()); } } return(null); }
public string GetFile(imageType type) { switch (type) { case imageType.Full: return(Config.GlobalPath + "img/" + id + "." + file.type); case imageType.Medium: return(Config.GlobalPath + "med/" + id + ".webp"); case imageType.Thumbnail: return(Config.GlobalPath + "med/" + id + ".webp"); } return(""); }
public string GetImage(imageType type) { switch (type) { case imageType.Full: return("https://img.fluxpoint.dev/" + id + "." + file.type); case imageType.Medium: return("https://img.fluxpoint.dev/med/" + id + ".webp"); case imageType.Thumbnail: return("https://img.fluxpoint.dev/med/" + id + ".webp"); case imageType.Download: return("https://img.fluxpoint.dev/dl/" + id + "." + file.type); } return(""); }
public ItemImage(Guid?imageId, imageType itemType) { this.ImageId = imageId; CreateImageUrl(itemType); }