Skip to content

Commit 8bf2fb9

Browse files
Add-playground-in-sample
1 parent d948b16 commit 8bf2fb9

File tree

10 files changed

+32
-5
lines changed

10 files changed

+32
-5
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+


Table-Of-Contents/TOC-with-user-defined-styles/.NET/TOC-with-user-defined-styles/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static void Main(string[] args)
6060
//Updates the table of contents.
6161
document.UpdateTableOfContents();
6262
//Creates file stream.
63-
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"../../../Result.docx"), FileMode.Create, FileAccess.ReadWrite))
63+
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Result.docx"), FileMode.Create, FileAccess.ReadWrite))
6464
{
6565
//Saves the Word document to file stream.
6666
document.Save(outputFileStream, FormatType.Docx);

Table-Of-Contents/TOC-with-user-defined-styles/.NET/TOC-with-user-defined-styles/TOC-with-user-defined-styles.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,10 @@
1010
<PackageReference Include="Syncfusion.DocIORenderer.Net.Core" Version="*" />
1111
</ItemGroup>
1212

13+
<ItemGroup>
14+
<None Update="Output\gitkeep">
15+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
16+
</None>
17+
</ItemGroup>
18+
1319
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+


Table-Of-Contents/Table_of_figures/.NET/Table_of_figures/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
//Load an existing Word document.
8-
using FileStream fileStream = new FileStream(Path.GetFullPath(@"../../../Data/Input.docx"), FileMode.Open, FileAccess.Read);
8+
using FileStream fileStream = new FileStream(Path.GetFullPath(@"Data/Input.docx"), FileMode.Open, FileAccess.Read);
99
using WordDocument document = new WordDocument(fileStream, FormatType.Docx);
1010
WParagraph paragraph = new WParagraph(document);
1111
paragraph.AppendText("List of Figures");
@@ -83,6 +83,6 @@
8383
document.UpdateTableOfContents();
8484

8585
//Create a FileStream to save the Word document.
86-
using FileStream outputStream = new FileStream("Result.docx", FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite);
86+
using FileStream outputStream = new FileStream(Path.GetFullPath(@"Output/Result.docx"), FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite);
8787
//Save the Word document.
8888
document.Save(outputStream, FormatType.Docx);

Table-Of-Contents/Table_of_figures/.NET/Table_of_figures/Table_of_figures.csproj

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

14+
<ItemGroup>
15+
<None Update="Data\Input.docx">
16+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
17+
</None>
18+
<None Update="Output\gitkeep">
19+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
20+
</None>
21+
</ItemGroup>
22+
1423
</Project>

Table-Of-Contents/Update-table-of-contents/.NET/Update-table-of-contents/Template.docx renamed to Table-Of-Contents/Update-table-of-contents/.NET/Update-table-of-contents/Data/Template.docx

File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+


Table-Of-Contents/Update-table-of-contents/.NET/Update-table-of-contents/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ class Program
99
{
1010
static void Main(string[] args)
1111
{
12-
using (FileStream fileStreamPath = new FileStream(Path.GetFullPath(@"../../../Template.docx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
12+
using (FileStream fileStreamPath = new FileStream(Path.GetFullPath(@"Data/Template.docx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
1313
{
1414
//Creates a new Word document.
1515
using (WordDocument document = new WordDocument(fileStreamPath, FormatType.Automatic))
1616
{
1717
//Updates the table of contents.
1818
document.UpdateTableOfContents();
1919
//Creates file stream.
20-
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"../../../Result.docx"), FileMode.Create, FileAccess.ReadWrite))
20+
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Result.docx"), FileMode.Create, FileAccess.ReadWrite))
2121
{
2222
//Saves the Word document to file stream.
2323
document.Save(outputFileStream, FormatType.Docx);

Table-Of-Contents/Update-table-of-contents/.NET/Update-table-of-contents/Update-table-of-contents.csproj

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

13+
<ItemGroup>
14+
<None Update="Data\Template.docx">
15+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
16+
</None>
17+
<None Update="Output\gitkeep">
18+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
19+
</None>
20+
</ItemGroup>
21+
1322
</Project>

0 commit comments

Comments
 (0)