Aspose.Slides.Examples.CSharp.Shapes.CloneShapes.Run C# (CSharp) Метод

Run() публичный статический Метод

public static Run ( ) : void
Результат void
        public static void Run()
        {
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_Shapes();

            // Instantiate Presentation class
            using (Presentation srcPres = new Presentation(dataDir + "Source Frame.pptx"))
            {
                IShapeCollection sourceShapes = srcPres.Slides[0].Shapes;
                ILayoutSlide blankLayout = srcPres.Masters[0].LayoutSlides.GetByType(SlideLayoutType.Blank);
                ISlide destSlide = srcPres.Slides.AddEmptySlide(blankLayout);
                IShapeCollection destShapes = destSlide.Shapes;
                destShapes.AddClone(sourceShapes[1], 50, 150 + sourceShapes[0].Height);
                destShapes.AddClone(sourceShapes[2]);                 
                destShapes.InsertClone(0, sourceShapes[0], 50, 150);

                //Write the PPTX file to disk
                srcPres.Save(dataDir + "CloneShape_out.pptx", SaveFormat.Pptx);

            }
            
        }
    }
CloneShapes