Пример #1
0
        /// <summary>
        /// Returns the default image size for inline images.
        /// </summary>
        /// <returns></returns>
        public Size GetDefaultInlineImageSize()
        {
            ImageDecoratorsList decoratorsList = LoadDefaultImageDecoratorsList();
            IProperties         props          = decoratorsList.GetImageDecoratorSettings(HtmlImageResizeDecorator.Id);
            Size imgSize = HtmlImageResizeDecoratorSettings.GetDefaultImageSize(props);

            return(imgSize);
        }
        /// <summary>
        /// Resets the image decorators back to their defaults.
        /// </summary>
        public void ResetImageSettings(ImageDecoratorsList defaultDecorators)
        {
            //preserve the HTML rotation setting
            RotateFlipType oldRotation = ImageRotation;

            //reset the image decorators
            ImageDecorators         = defaultDecorators;
            targetDecoratorSettings = null;
            _inlineImageSettings    = null;

            //restore the image rotation setting.
            InlineImageSettings.Rotation = oldRotation;
        }