public void RegisterPictureSize(IList <PictureSize> pictureSizes) { //we won't have media settings available if database is not installed, so let's check for that first if (!DatabaseManager.IsDatabaseInstalled()) { return; } var mediaSettings = mobSocialEngine.ActiveEngine.Resolve <MediaSettings>(); //register default sizes pictureSizes.UpdateOrInsertSize(PictureUtility.ParsePictureSize(mediaSettings.ThumbnailPictureSize, PictureSizeNames.ThumbnailImage)); pictureSizes.UpdateOrInsertSize(PictureUtility.ParsePictureSize(mediaSettings.SmallProfilePictureSize, PictureSizeNames.SmallProfileImage)); pictureSizes.UpdateOrInsertSize(PictureUtility.ParsePictureSize(mediaSettings.MediumProfilePictureSize, PictureSizeNames.MediumProfileImage)); pictureSizes.UpdateOrInsertSize(PictureUtility.ParsePictureSize(mediaSettings.SmallCoverPictureSize, PictureSizeNames.SmallCover)); pictureSizes.UpdateOrInsertSize(PictureUtility.ParsePictureSize(mediaSettings.MediumCoverPictureSize, PictureSizeNames.MediumCover)); pictureSizes.UpdateOrInsertSize(PictureSizeNames.OriginalProfileImage, 0, 0); pictureSizes.UpdateOrInsertSize(PictureSizeNames.OriginalCover, 0, 0); pictureSizes.UpdateOrInsertSize(PictureSizeNames.OriginalImage, 0, 0); }
public void RegisterPictureSize(IList <PictureSize> pictureSizes) { var mediaSettings = mobSocialEngine.ActiveEngine.Resolve <MediaSettings>(); //register default sizes pictureSizes.UpdateOrInsertSize(PictureUtility.ParsePictureSize(mediaSettings.ThumbnailPictureSize, PictureSizeNames.ThumbnailImage)); pictureSizes.UpdateOrInsertSize(PictureUtility.ParsePictureSize(mediaSettings.SmallProfilePictureSize, PictureSizeNames.SmallProfileImage)); pictureSizes.UpdateOrInsertSize(PictureUtility.ParsePictureSize(mediaSettings.MediumProfilePictureSize, PictureSizeNames.MediumProfileImage)); pictureSizes.UpdateOrInsertSize(PictureUtility.ParsePictureSize(mediaSettings.SmallCoverPictureSize, PictureSizeNames.SmallCover)); pictureSizes.UpdateOrInsertSize(PictureUtility.ParsePictureSize(mediaSettings.MediumCoverPictureSize, PictureSizeNames.MediumCover)); pictureSizes.UpdateOrInsertSize(PictureSizeNames.OriginalProfileImage, 0, 0); pictureSizes.UpdateOrInsertSize(PictureSizeNames.OriginalCover, 0, 0); pictureSizes.UpdateOrInsertSize(PictureSizeNames.OriginalImage, 0, 0); }