public static string genPhotoUrl(string PhotoPath, string PhotoName, COM.Enum.PhotoSizes PhotoSize) { StringBuilder sb = new StringBuilder(); sb.Append(PhotoPath); sb.Append(PhotoName.Substring(0, PhotoName.LastIndexOf('.'))); sb.Append(","); sb.Append(((int)PhotoSize).ToString()); sb.Append(LIB.Util.GetExtension(PhotoName)); return(sb.ToString()); }
public static string genUserPicName(int UserID, COM.Enum.PhotoSizes PhotoSize) { StringBuilder sb = new StringBuilder(); sb.Append("HayatiDoldur_"); sb.Append(UserID.ToString().PadLeft(5, '0')); sb.Append("_"); sb.Append(DateTime.Now.Day.ToString().PadLeft(2, '0')); sb.Append(DateTime.Now.Month.ToString().PadLeft(2, '0')); sb.Append(LIB.Util.Right(DateTime.Now.Year.ToString(), 2)); sb.Append("-"); sb.Append(DateTime.Now.Hour.ToString().PadLeft(2, '0')); sb.Append(DateTime.Now.Minute.ToString().PadLeft(2, '0')); sb.Append(DateTime.Now.Second.ToString().PadLeft(2, '0')); sb.Append(","); sb.Append(((int)PhotoSize).ToString()); return(sb.ToString()); }
public string FacebookImgChangeSize(string Photo, COM.Enum.PhotoSizes PhotoSize) { switch (PhotoSize) { case COM.Enum.PhotoSizes.Big200: return(Photo.Replace("/s", "/n")); break; case COM.Enum.PhotoSizes.Small50: return(Photo.Replace("/s", "/t")); break; case COM.Enum.PhotoSizes.Square50: return(Photo.Replace("/s", "/q")); break; } return(Photo); }
public string ImageUrl(COM.Enum.ImageTypes ImageType, string PhotoName, COM.Enum.PhotoSizes PhotoSize) { return(ImageUrl(ImageType, PhotoName, (int)PhotoSize)); }
public static string genPhotoNameOfSize(string PhotoName, COM.Enum.PhotoSizes PhotoSize) { return(genPhotoNameOfSize(PhotoName, (int)PhotoSize)); }