Ejemplo n.º 1
0
 public void Decorate(ImageDecoratorContext context)
 {
     if (context.InvocationSource == ImageDecoratorInvocationSource.Reset ||
         context.InvocationSource == ImageDecoratorInvocationSource.InitialInsert)
     {
         //set the default HTML for this decorator.
         HtmlAlignDecoratorSettings settings = new HtmlAlignDecoratorSettings(context.Settings, context.ImgElement, context.InvocationSource);
         settings.Alignment = settings.DefaultAlignment;
     }
     //Note: all other times, this decorator is applied directly by the editor.
 }
 public void Decorate(ImageDecoratorContext context)
 {
     if (context.InvocationSource == ImageDecoratorInvocationSource.Reset ||
         context.InvocationSource == ImageDecoratorInvocationSource.InitialInsert)
     {
         //set the default HTML for this decorator.
         HtmlAlignDecoratorSettings settings = new HtmlAlignDecoratorSettings(context.Settings, context.ImgElement, context.InvocationSource);
         settings.Alignment = settings.DefaultAlignment;
     }
     //Note: all other times, this decorator is applied directly by the editor.
 }
Ejemplo n.º 3
0
 protected override void LoadEditor()
 {
     base.LoadEditor();
     HtmlAlignSettings = new HtmlAlignDecoratorSettings(EditorContext.Settings, EditorContext.ImgElement);
     Alignment         = HtmlAlignSettings.Alignment;
 }
Ejemplo n.º 4
0
 protected override void LoadEditor()
 {
     base.LoadEditor();
     HtmlAlignSettings = new HtmlAlignDecoratorSettings(EditorContext.Settings, EditorContext.ImgElement);
     Alignment = HtmlAlignSettings.Alignment;
 }
Ejemplo n.º 5
0
        void IImageDecoratorDefaultSettingsCustomizer.CustomizeDefaultSettingsBeforeSave(ImageDecoratorEditorContext context, IProperties defaultSettings)
        {
            HtmlAlignDecoratorSettings settings = new HtmlAlignDecoratorSettings(defaultSettings, context.ImgElement);

            settings.DefaultAlignment = settings.Alignment;
        }
 void IImageDecoratorDefaultSettingsCustomizer.CustomizeDefaultSettingsBeforeSave(ImageDecoratorEditorContext context, IProperties defaultSettings)
 {
     HtmlAlignDecoratorSettings settings = new HtmlAlignDecoratorSettings(defaultSettings, context.ImgElement);
     settings.DefaultAlignment = settings.Alignment;
 }