@@ -94,27 +94,22 @@ static void Main ()
9494
9595
9696 /*
97- // Add slide to an existing presentation
98- Presentation presentation = Presentation.Open("D:\\AsposeSampleData\\sample .pptx");
97+ // change background of a slide of an existing presentation
98+ Presentation presentation = Presentation.Open("D:\\AsposeSampleData\\test .pptx");
9999 TextShape shape1 = new TextShape();
100100 shape1.Text = "Body : Here is my first title From FF";
101101 shape1.FontFamily = "Baguet Script";
102102 shape1.TextColor = Colors.Olive;
103103 shape1.FontSize = 45;
104104 shape1.Y = 10.0;
105- // First slide
106- Slide slide = new Slide();
107- Image image1 = new Image("D:\\AsposeSampleData\\target.png");
108- image1.X = Utility.EmuToPixels(1838700);
109- image1.Y = Utility.EmuToPixels(1285962);
110- image1.Width = Utility.EmuToPixels(2514600);
111- image1.Height = Utility.EmuToPixels(2886075);
112- slide.AddImage(image1);
113- slide.AddTextShapes(shape1);
114- presentation.AppendSlide(slide);
115- presentation.Save();
105+ Slide slide = presentation.GetSlides()[1];
106+ slide.BackgroundColor = Colors.Silver;
107+ slide.Update();
108+ presentation.Save();
116109 */
117110
111+
112+
118113 /*
119114 * Update an image in a slide
120115 Presentation presentation = Presentation.Open("D:\\AsposeSampleData\\sample.pptx");
@@ -166,7 +161,7 @@ static void Main ()
166161 shape1.TextColor = Colors.Yellow;
167162 shape1.BackgroundColor = Colors.LimeGreen;
168163
169- StyledList list = new StyledList();
164+ StyledList list = new StyledList(FileFormat.Slides.Common.Enumerations.ListType.Bulleted );
170165 list.AddListItem("Pakistan");
171166 list.AddListItem("India");
172167 list.AddListItem("Australia");
@@ -178,6 +173,42 @@ static void Main ()
178173 presentation.AppendSlide(slide1);
179174 presentation.Save();
180175 */
176+ /*
177+ // Add numbered list to an existing presentation
178+ Presentation presentation = Presentation.Open("D:\\AsposeSampleData\\test.pptx");
179+ Slide slide = new Slide();
180+ slide.BackgroundColor = Colors.Teal;
181+ TextShape shape1 = new TextShape();
182+ shape1.FontFamily = "Baguet Script";
183+ shape1.FontSize = 60;
184+ shape1.Y = 200.0;
185+ shape1.TextColor = Colors.Yellow;
186+ shape1.BackgroundColor = Colors.LimeGreen;
187+
188+ StyledList list = new StyledList(FileFormat.Slides.Common.Enumerations.ListType.Numbered);
189+ list.AddListItem("Umar");
190+ list.AddListItem("Farooq");
191+ list.AddListItem("Adnan");
192+ list.AddListItem("Usman");
193+ list.AddListItem("Numan");
194+ shape1.TextList = list;
195+
196+ slide.AddTextShapes(shape1);
197+ presentation.AppendSlide(slide);
198+ presentation.Save();
199+ */
200+ /*
201+ Presentation presentation = Presentation.Open("D:\\AsposeSampleData\\test.pptx");
202+ Slide slide = presentation.GetSlides()[3];
203+ TextShape shape = slide.TextShapes[0];
204+ StyledList list = shape.TextList;
205+ list.ListItems.RemoveAt(4);
206+ list.ListItems.RemoveAt(2);
207+ list.ListType = FileFormat.Slides.Common.Enumerations.ListType.Bulleted;
208+ list.Update();
209+
210+ presentation.Save();
211+ */
181212
182213
183214 }
0 commit comments