Skip to content

Commit 3978c7a

Browse files
Add-readme-file
1 parent 06e3d38 commit 3978c7a

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

Getting-started/.NET/Create-PowerPoint-presentation/Create-PowerPoint-presentation.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,13 @@
1212
<PackageReference Include="Syncfusion.Presentation.Net.Core" Version="*" />
1313
</ItemGroup>
1414

15+
<ItemGroup>
16+
<None Update="Data\Image.jpg">
17+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
18+
</None>
19+
<None Update="Output\.gitkeep">
20+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
21+
</None>
22+
</ItemGroup>
23+
1524
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

Binary file not shown.

Getting-started/.NET/Create-PowerPoint-presentation/Program.cs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static void Main(string[] args)
3737
secondPara.LeftIndent = 35;
3838
secondPara.FirstLineIndent = -35;
3939
//Gets a picture as stream.
40-
FileStream pictureStream = new FileStream(Path.GetFullPath(@"../../../Data/Image.jpg"), FileMode.Open);
40+
FileStream pictureStream = new FileStream(Path.GetFullPath(@"Data/Image.jpg"), FileMode.Open);
4141
//Adds the picture to a slide by specifying its size and position.
4242
slide.Shapes.AddPicture(pictureStream, 499.79, 238.59, 364.54, 192.16);
4343
//Add an auto-shape to the slide
@@ -46,18 +46,11 @@ static void Main(string[] args)
4646
stampShape.Fill.FillType = FillType.None;
4747
stampShape.TextBody.AddParagraph("IMN").HorizontalAlignment = HorizontalAlignmentType.Center;
4848
//Save the PowerPoint Presentation as stream
49-
using (FileStream outputStream = new FileStream(Path.GetFullPath(@"../../../Sample.pptx"), FileMode.Create))
49+
using (FileStream outputStream = new FileStream(Path.GetFullPath(@"Output/Sample.pptx"), FileMode.Create))
5050
{
5151
pptxDoc.Save(outputStream);
5252
}
5353
}
54-
// Open the PowerPoint located at the specified path using the default associated program.
55-
System.Diagnostics.Process process = new System.Diagnostics.Process();
56-
process.StartInfo = new System.Diagnostics.ProcessStartInfo(Path.GetFullPath(@"../../../Sample.pptx"))
57-
{
58-
UseShellExecute = true
59-
};
60-
process.Start();
6154
}
6255
}
6356
}

0 commit comments

Comments
 (0)