Skip to content

Commit b47aa55

Browse files
Merge pull request #230 from VijayadharshiniMathiyalagan/main
ES-909293 - Resolved the errors faced in the playground buttons
2 parents 7bab6cb + 6c02f6b commit b47aa55

File tree

17 files changed

+24
-52
lines changed

17 files changed

+24
-52
lines changed

Compare-Word-documents/Compare-two-Word-documents/.NET/Compare-Word-documents/Program.cs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
1-
using System;
2-
using System.Collections;
3-
using System.Collections.Generic;
4-
using System.Data;
5-
using System.Data.OleDb;
6-
using System.Data.SqlClient;
7-
using System.IO;
8-
using System.Linq;
9-
using System.Reflection;
10-
using System.Text;
11-
using System.Threading.Tasks;
12-
using Syncfusion.DocIO;
1+
using Syncfusion.DocIO;
132
using Syncfusion.DocIO.DLS;
143

154
namespace Compare_Word_documents
@@ -32,7 +21,7 @@ static void Main(string[] args)
3221
originalDocument.Compare(revisedDocument);
3322

3423
//Save the Word document.
35-
using (FileStream fileStreamOutput = File.Create("Output/Output.docx"))
24+
using (FileStream fileStreamOutput = File.Create(Path.GetFullPath("Output/Output.docx")))
3625
{
3726
originalDocument.Save(fileStreamOutput, FormatType.Docx);
3827
}

Compare-Word-documents/Ignore-format-changes/.NET/Ignore-format-changes/Program.cs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
1-
using System;
2-
using System.Collections;
3-
using System.Collections.Generic;
4-
using System.Data;
5-
using System.Data.OleDb;
6-
using System.Data.SqlClient;
7-
using System.IO;
8-
using System.Linq;
9-
using System.Reflection;
10-
using System.Reflection.Metadata;
11-
using System.Text;
12-
using System.Threading.Tasks;
13-
using Syncfusion.DocIO;
1+
using Syncfusion.DocIO;
142
using Syncfusion.DocIO.DLS;
153

164
namespace Ignore_format_changes
@@ -39,7 +27,7 @@ static void Main(string[] args)
3927
originalDocument.Compare(revisedDocument, "Nancy Davolio", DateTime.Now.AddDays(-1), compareOptions);
4028

4129
//Save the Word document.
42-
using (FileStream fileStreamOutput = File.Create("Output/Output.docx"))
30+
using (FileStream fileStreamOutput = File.Create(Path.GetFullPath("Output/Output.docx")))
4331
{
4432
originalDocument.Save(fileStreamOutput, FormatType.Docx);
4533
}

Compare-Word-documents/Set-author-and-date/.NET/Program.cs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
1-
using System;
2-
using System.Collections;
3-
using System.Collections.Generic;
4-
using System.Data;
5-
using System.Data.OleDb;
6-
using System.Data.SqlClient;
7-
using System.IO;
8-
using System.Linq;
9-
using System.Reflection;
10-
using System.Text;
11-
using System.Threading.Tasks;
12-
using Syncfusion.DocIO;
1+
using Syncfusion.DocIO;
132
using Syncfusion.DocIO.DLS;
143

154
namespace Set_author_and_date
@@ -32,7 +21,7 @@ static void Main(string[] args)
3221
originalDocument.Compare(revisedDocument, "Nancy Davolio", DateTime.Now.AddDays(-1));
3322

3423
//Save the Word document.
35-
using (FileStream fileStreamOutput = File.Create("Output/Output.docx"))
24+
using (FileStream fileStreamOutput = File.Create(Path.GetFullPath("Output/Output.docx")))
3625
{
3726
originalDocument.Save(fileStreamOutput, FormatType.Docx);
3827
}
File renamed without changes.

HTML-conversions/Export-HTML-with-body-content/.NET/Export-HTML-with-body-content/Export-HTML-with-body-content.csproj

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

15+
<ItemGroup>
16+
<None Update="Data\Template.docx">
17+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
18+
</None>
19+
<None Update="Output\.gitkeep">
20+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
21+
</None>
22+
</ItemGroup>
23+
1524
</Project>
File renamed without changes.

HTML-conversions/Export-HTML-with-body-content/.NET/Export-HTML-with-body-content/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
using Syncfusion.DocIO.DLS;
33

44
//Load an existing Word document.
5-
using (FileStream fileStreamPath = new FileStream("../../../Template.docx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
5+
using (FileStream fileStreamPath = new FileStream(Path.GetFullPath("Data/Template.docx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
66
{
77
using (WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx))
88
{
99
//Enable the flag, to save HTML with elements inside body tags alone.
1010
document.SaveOptions.HtmlExportBodyContentAlone = true;
1111

12-
using (FileStream outputFileStream = new FileStream("WordToHTML.html", FileMode.Create, FileAccess.ReadWrite))
12+
using (FileStream outputFileStream = new FileStream(Path.GetFullPath("Output/WordToHTML.html"), FileMode.Create, FileAccess.ReadWrite))
1313
{
1414
//Save Word document as HTML.
1515
document.Save(outputFileStream, FormatType.Html);

Mail-Merge/Event-for-image-mail-merge-field/.NET/Event-for-image-mail-merge-field/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ private static void MergeField_ProductImage(object sender, MergeImageFieldEventA
4141
{
4242
string ProductFileName = args.FieldValue.ToString();
4343
//Gets the image from file system
44-
FileStream imageStream = new FileStream(Path.GetFullPath(@"../../../Data/" + ProductFileName), FileMode.Open, FileAccess.Read);
44+
FileStream imageStream = new FileStream(Path.GetFullPath(@"Data/" + ProductFileName), FileMode.Open, FileAccess.Read);
4545
args.ImageStream = imageStream;
4646
//Gets the picture, to be merged for image merge field
4747
WPicture picture = args.Picture;

Mail-Merge/Retrieve-merge-field-names/.NET/Retrieve-merge-field-names/Program.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ static void Main(string[] args)
3737
Console.WriteLine("\n\nMerge field names in " + groupNames[1] + " Group :");
3838
foreach (string fieldNameInGroup in fieldNamesInGroup)
3939
Console.WriteLine(fieldNameInGroup);
40-
41-
Console.ReadKey();
4240
}
4341
}
4442
}
File renamed without changes.

0 commit comments

Comments
 (0)