private static void DecorateSlideThree(PPT.Slide slide) { var columnsList = new string[] { "C#", "VB.Net", "Perl", "Python", "Java" }; var series1 = new ChartSeries() { name = "Blog Statistics", seriesData = new string[] { "8200", "3900", "890", "300", "3278" }, seriesType = XlChartType.xl3DColumn }; var chartData = new List <ChartSeries>() { series1 }; var chart = PptChartManager.CreateChart(XlChartType.xlColumnStacked, slide, columnsList, chartData); var chartTitle = new ChartTitle() { bold = true, italic = false, fontSize = 40, titleText = "Users by Software Language", underline = false }; PptChartManager.AddChartTitle(chart, chartTitle); SetSlideFooter(slide, 3); }
private static void DecorateSlideOne(PPT.Slide slide) { // Insert the graphic for the slide var pictureShape = PptShapeManager.AddPicture( slide, Environment.CurrentDirectory + ResourceFolder + Slide1Graphic, 100f, 220f, 200f, 200f); // Insert the graphic for the slide var pictureShape2 = PptShapeManager.AddPicture( slide, Environment.CurrentDirectory + ResourceFolder + Slide1Graphic, 100f, 420f, 75f, 75f); // Insert the textboxes var textShape1 = PptShapeManager.AddTextBoxToSlide( slide, MsoTextOrientation.msoTextOrientationHorizontal, 320f, 280f, 400f, 40f); var textShape2 = PptShapeManager.AddTextBoxToSlide( slide, MsoTextOrientation.msoTextOrientationHorizontal, 320f, 320f, 400f, 40f); // Set the text in the textboxes PptShapeManager.SetTextBoxText(textShape1, "CodeSharper PowerPoint Helper"); textShape1.TextEffect.FontBold = MsoTriState.msoTrue; textShape1.TextEffect.FontSize = 42f; PptShapeManager.SetTextBoxText(textShape2, "A Demonstration"); textShape2.TextEffect.FontBold = MsoTriState.msoTrue; textShape1.TextEffect.FontSize = 28f; // Configure a click event hyperlink for the pictureShape PptShapeManager.AddHyperLinkToWebsite(pictureShape, "http://www.codesharper.co.uk"); // Configure a click event navigate backword for the textshape1 PptShapeManager.AddClickedActionToShape(pictureShape2, PPT.PpActionType.ppActionEndShow); SetSlideFooter(slide, 1); }
private static void SetSlideFooter(PPT.Slide slide, int slideNumber) { // Insert the textboxes var textShape1 = PptShapeManager.AddTextBoxToSlide( slide, MsoTextOrientation.msoTextOrientationHorizontal, 905f, 512f, 100f, 40f); // Set the text in the textboxes PptShapeManager.SetTextBoxText(textShape1, "slide " + slideNumber); textShape1.TextEffect.FontBold = MsoTriState.msoFalse; textShape1.TextEffect.FontSize = 14f; }
private static void DecorateSlideTwo(PPT.Slide slide) { // Insert the textboxes var textShape1 = PptShapeManager.AddTextBoxToSlide( slide, MsoTextOrientation.msoTextOrientationHorizontal, 100f, 100f, 800f, 40f); // Set the text in the textboxes PptShapeManager.SetTextBoxText( textShape1, "This PowerPoint presentation helps to show you what you can achieve with the CodeSharper PowerPoint helper library." + "\nWe hope that you will find this library helpful." + "\nFeel free to contact email any questions to" + "\[email protected]"); textShape1.TextEffect.FontSize = 16f; SetSlideFooter(slide, 2); }
private static void DecorateSlideOne(PPT.Slide slide) { // Insert the graphic for the slide var pictureShape = PptShapeManager.AddPicture( slide, Environment.CurrentDirectory + ResourceFolder + Slide1Graphic, 100f, 220f, 200f, 200f); // Insert the textboxes var textShape1 = PptShapeManager.AddTextBoxToSlide( slide, MsoTextOrientation.msoTextOrientationHorizontal, 320f, 280f, 400f, 40f); var textShape2 = PptShapeManager.AddTextBoxToSlide( slide, MsoTextOrientation.msoTextOrientationHorizontal, 320f, 320f, 400f, 40f); // Set the text in the textboxes PptShapeManager.SetTextBoxText(textShape1, "CodeSharper PowerPoint Helper"); textShape1.TextEffect.FontBold = MsoTriState.msoTrue; textShape1.TextEffect.FontSize = 42f; PptShapeManager.SetTextBoxText(textShape2, "A Demonstration"); textShape2.TextEffect.FontBold = MsoTriState.msoTrue; textShape1.TextEffect.FontSize = 28f; SetSlideFooter(slide, 1); }
private static void DecorateSlideFour(PPT.Slide slide) { var starShape = PptShapeManager.DrawShape(slide, MsoAutoShapeType.msoShape16pointStar, 45f, 25f, 150f, 150f); var upArrowShape = PptShapeManager.DrawShape( slide, MsoAutoShapeType.msoShapeUpArrow, 250f, 100f, 150f, 250f); var downArrowShape = PptShapeManager.DrawShape( slide, MsoAutoShapeType.msoShapeDownArrow, 500f, 100f, 150f, 250f); starShape.Fill.ForeColor.RGB = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Gold); starShape.Line.ForeColor.RGB = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Yellow); // Insert the textboxes var textShape0 = PptShapeManager.AddTextBoxToSlide( slide, MsoTextOrientation.msoTextOrientationHorizontal, 70f, 75f, 100f, 100f); var textShape1 = PptShapeManager.AddTextBoxToSlide( slide, MsoTextOrientation.msoTextOrientationHorizontal, 100f, 195f, 200f, 300f); var textShape2 = PptShapeManager.AddTextBoxToSlide( slide, MsoTextOrientation.msoTextOrientationHorizontal, 650f, 120f, 200f, 300f); // Set the text in the textboxes PptShapeManager.SetTextBoxText(textShape0, "Important" + "\nFact!"); textShape0.TextEffect.Alignment = MsoTextEffectAlignment.msoTextEffectAlignmentCentered; textShape0.Rotation = -45f; textShape0.TextFrame.TextRange.Font.Color.RGB = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Red); textShape0.TextEffect.FontSize = 20f; PptShapeManager.SetTextBoxText( textShape1, "The number of C# developers has grown" + "\nby 25% over the past quarter."); textShape1.TextEffect.FontSize = 18f; PptShapeManager.SetTextBoxText( textShape2, "The number of VB.Net developers has declined" + "\nby 40% over the past quarter."); textShape2.TextEffect.FontSize = 18f; SetSlideFooter(slide, 4); }