private void Rotate(string inPath, string outPath, bool isBackRotate, Data.Storage.IDataStore store) { if (store.IsFile(inPath)) { ImageHelper.RotateImage(inPath, outPath, isBackRotate, store); } }
private string GetHTMLSmallThumb(AlbumItem image, int maxSize, string link, Data.Storage.IDataStore store) { var sb = new StringBuilder(); var limit = ImageHTMLHelper.GetImageSizeLimit(image, maxSize); sb.Append("<span style=\"padding: 3px; display: inline-block; position: relative; text-align: center; vertical-align: top;\" >"); sb.Append("<table border=0 cellpadding=\"0\" cellspacing=\"0\"><tr><td style=\"text-align:center;vertical-align:middle;border:solid 0px #cfcfcf;height:" + maxSize + "px;width:" + maxSize + "px;table-layout:fixed;\">"); sb.Append("<a href=\"" + link + "\">"); sb.Append("<img " + limit + " title=\"" + (image != null ? HttpUtility.HtmlEncode(image.Name) : "") + "\" src=\"" + (image != null ? ImageHTMLHelper.GetImageUrl(image.ExpandedStoreThumb, store) : "") + "\" class=\"borderBase\">"); sb.Append("</a></td></tr></table></span>"); return(sb.ToString()); }
private void LoadUserAllPhoto(string userID, Data.Storage.IDataStore store) { mainContainer.BreadCrumbs.Add(new Web.Controls.BreadCrumb { Caption = PhotoManagerResource.PhotoTitle, NavigationUrl = PhotoConst.PAGE_DEFAULT }); mainContainer.BreadCrumbs.Add(new Web.Controls.BreadCrumb { Caption = DisplayUserSettings.GetFullUserName(new Guid(userID), false) }); var list = StorageFactory.GetStorage().GetAlbums(0, userID); if (list == null || list.Count == 0) { var emptyScreenControl = new EmptyScreenControl { ImgSrc = WebImageSupplier.GetAbsoluteWebPath("150x_photo_icon.png", PhotoConst.ModuleID), Describe = PhotoManagerResource.EmptyScreenText }; if (userID == SecurityContext.CurrentAccount.ID.ToString()) { emptyScreenControl.Header = PhotoManagerResource.YouHaveNoPhotosTitle; emptyScreenControl.ButtonHTML = CommunitySecurity.CheckPermissions(PhotoConst.Action_AddPhoto) ? String.Format("<a class='linkAddMediumText' href='" + PhotoConst.PAGE_ADD_PHOTO + "'>{0}</a>", PhotoManagerResource.EmptyScreenLink) : String.Empty; } else { emptyScreenControl.Header = PhotoManagerResource.UserHaveNoPhotosTitle; } _contentHolder.Controls.Add(emptyScreenControl); } else { _contentHolder.Controls.Add(new Literal { Text = ImageHTMLHelper.DrawAlbumsAlone(list, store) }); } }