public IList<Shape> Execute(StyleOption option, EffectsDesigner designer, ImageItem source, Shape imageShape)
 {
     designer.ApplyImageReference(source.ContextLink);
     if (option.IsInsertReference)
     {
         designer.ApplyImageReferenceInsertion(source.ContextLink, option.GetFontFamily(), option.FontColor,
             option.CitationFontSize, option.ImageReferenceTextBoxColor, option.GetCitationTextBoxAlignment());
     }
     return new List<Shape>();
 }
 public IList<Shape> Execute(StyleOption option, EffectsDesigner designer, ImageItem source, Shape imageShape, Settings settings)
 {
     designer.ApplyImageReference(source.Source);
     if (settings != null && settings.IsInsertCitation)
     {
         designer.ApplyImageReferenceInsertion(source.Source, "Calibri", settings.CitationFontColor,
             settings.CitationFontSize, 
             settings.IsUseCitationTextBox ? settings.CitationTextBoxColor : "", 
             settings.GetCitationTextBoxAlignment());
     }
     else if (option.IsInsertReference)
     {
         designer.ApplyImageReferenceInsertion(source.Source, option.GetFontFamily(), option.FontColor,
             option.CitationFontSize, option.ImageReferenceTextBoxColor, option.GetCitationTextBoxAlignment());
     }
     return new List<Shape>();
 }
        public void TestInsertImageReference()
        {
            // constructor for producing preview image
            var ed = new EffectsDesigner(
                _processingSlide, _contentSlide,
                Pres.PageSetup.SlideWidth, Pres.PageSetup.SlideHeight,
                new ImageItem
            {
                ImageFile = "some images",
                Tooltip   = "some tooltips"
            });

            ed.ApplyImageReference(Link);
            Assert.IsTrue(
                PpOperations.GetNotesPageText(_processingSlide)
                .Contains(Link));

            ed.ApplyImageReferenceInsertion(Link, "Calibri", "#000000");
            var refShape = PpOperations.SelectShapesByPrefix(
                EffectsDesigner.ShapeNamePrefix + "_" + EffectName.ImageReference);

            Assert.IsTrue(
                refShape.TextFrame2.TextRange.Text.Contains(Link));
        }