File tree Expand file tree Collapse file tree 28 files changed +50
-46
lines changed Expand file tree Collapse file tree 28 files changed +50
-46
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
28
28
using System . Collections . ObjectModel ;
29
29
using System . Net ;
30
30
using System . Diagnostics ;
31
- using System . Drawing . Drawing2D ;
32
31
using System . Reflection ;
33
32
using System . ComponentModel ;
34
33
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
26
26
using System . Globalization ;
27
27
using System . Diagnostics ;
28
28
using System . Drawing ;
29
- using System . Drawing . Drawing2D ;
30
29
31
30
namespace Xceed . Document . NET
32
31
{
Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
2
<PropertyGroup >
3
- <TargetFrameworks >net40</TargetFrameworks >
3
+ <TargetFrameworks >net40;netstandard2.0 </TargetFrameworks >
4
4
5
5
<AssemblyTitle >Xceed Document for .NET</AssemblyTitle >
6
6
<Description >This assembly implements the classes for Xceed Document for .NET.</Description >
27
27
<ItemGroup >
28
28
<EmbeddedResource Include =" Resources\SignatureLine.emf" />
29
29
</ItemGroup >
30
- <ItemGroup >
30
+ <ItemGroup Condition = " '$(TargetFramework)' == 'net40' " >
31
31
<Reference Include =" WindowsBase" />
32
32
</ItemGroup >
33
+ <ItemGroup Condition =" '$(TargetFramework)' == 'netstandard2.0' " >
34
+ <PackageReference Include =" System.IO.Packaging" Version =" 6.0.0" />
35
+ <PackageReference Include =" System.Drawing.Common" Version =" 6.0.0" />
36
+ </ItemGroup >
33
37
</Project >
Original file line number Diff line number Diff line change @@ -19,7 +19,9 @@ namespace Xceed.Words.NET.Examples
19
19
{
20
20
public class Program
21
21
{
22
- internal const string SampleDirectory = @"..\..\..\Samples\" ;
22
+ internal static string SampleDirectory = System . IO . Path . Combine (
23
+ System . IO . Path . GetDirectoryName ( Assembly . GetExecutingAssembly ( ) . Location ) , @"..\..\..\Samples\"
24
+ ) ;
23
25
24
26
private static void Main ( string [ ] args )
25
27
{
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ public class BookmarkSample
21
21
{
22
22
#region Private Members
23
23
24
- private const string BookmarkSampleResourcesDirectory = Program . SampleDirectory + @"Bookmark\Resources\" ;
25
- private const string BookmarkSampleOutputDirectory = Program . SampleDirectory + @"Bookmark\Output\" ;
24
+ private static string BookmarkSampleResourcesDirectory = Program . SampleDirectory + @"Bookmark\Resources\" ;
25
+ private static string BookmarkSampleOutputDirectory = Program . SampleDirectory + @"Bookmark\Output\" ;
26
26
27
27
#endregion
28
28
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ public class ChartSample
21
21
{
22
22
#region Private Members
23
23
24
- private const string ChartSampleOutputDirectory = Program . SampleDirectory + @"Chart\Output\" ;
25
- private const string ChartSampleResourceDirectory = Program . SampleDirectory + @"Chart\Resources\" ;
24
+ private static string ChartSampleOutputDirectory = Program . SampleDirectory + @"Chart\Output\" ;
25
+ private static string ChartSampleResourceDirectory = Program . SampleDirectory + @"Chart\Resources\" ;
26
26
27
27
#endregion
28
28
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ public class CheckBoxSample
20
20
{
21
21
#region Private Members
22
22
23
- private const string CheckBoxSampleResourcesDirectory = Program . SampleDirectory + @"CheckBox\Resources\" ;
24
- private const string CheckBoxSampleOutputDirectory = Program . SampleDirectory + @"CheckBox\Output\" ;
23
+ private static string CheckBoxSampleResourcesDirectory = Program . SampleDirectory + @"CheckBox\Resources\" ;
24
+ private static string CheckBoxSampleOutputDirectory = Program . SampleDirectory + @"CheckBox\Output\" ;
25
25
26
26
#endregion
27
27
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ public class DigitalSignatureSample
20
20
{
21
21
#region Private Members
22
22
23
- private const string DigitalSignatureSampleOutputDirectory = Program . SampleDirectory + @"DigitalSignature\Output\" ;
24
- private const string DigitalSignatureSampleResourcesDirectory = Program . SampleDirectory + @"DigitalSignature\Resources\" ;
23
+ private static string DigitalSignatureSampleOutputDirectory = Program . SampleDirectory + @"DigitalSignature\Output\" ;
24
+ private static string DigitalSignatureSampleResourcesDirectory = Program . SampleDirectory + @"DigitalSignature\Resources\" ;
25
25
26
26
#endregion
27
27
Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ public class DocumentSample
30
30
{ "DATE" , "October 18 2016" } ,
31
31
} ;
32
32
33
- private const string DocumentSampleResourcesDirectory = Program . SampleDirectory + @"Document\Resources\" ;
34
- private const string DocumentSampleOutputDirectory = Program . SampleDirectory + @"Document\Output\" ;
33
+ private static string DocumentSampleResourcesDirectory = Program . SampleDirectory + @"Document\Resources\" ;
34
+ private static string DocumentSampleOutputDirectory = Program . SampleDirectory + @"Document\Output\" ;
35
35
36
36
#endregion
37
37
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public class EquationSample
21
21
{
22
22
#region Private Members
23
23
24
- private const string EquationSampleOutputDirectory = Program . SampleDirectory + @"Equation\Output\" ;
24
+ private static string EquationSampleOutputDirectory = Program . SampleDirectory + @"Equation\Output\" ;
25
25
26
26
#endregion
27
27
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ public class FootnoteEndnoteSample
22
22
{
23
23
#region Private Members
24
24
25
- private const string FootnoteEndnoteSampleResourcesDirectory = Program . SampleDirectory + @"FootnoteEndnote\Resources\" ;
26
- private const string FootnoteEndnoteSampleOutputDirectory = Program . SampleDirectory + @"FootnoteEndnote\Output\" ;
25
+ private static string FootnoteEndnoteSampleResourcesDirectory = Program . SampleDirectory + @"FootnoteEndnote\Resources\" ;
26
+ private static string FootnoteEndnoteSampleOutputDirectory = Program . SampleDirectory + @"FootnoteEndnote\Output\" ;
27
27
28
28
#endregion
29
29
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ public class HeaderFooterSample
20
20
{
21
21
#region Private Members
22
22
23
- private const string HeaderFooterSampleOutputDirectory = Program . SampleDirectory + @"HeaderFooter\Output\" ;
23
+ private static string HeaderFooterSampleOutputDirectory = Program . SampleDirectory + @"HeaderFooter\Output\" ;
24
24
25
25
#endregion
26
26
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public class HyperlinkSample
21
21
{
22
22
#region Private Members
23
23
24
- private const string HyperlinkSampleOutputDirectory = Program . SampleDirectory + @"Hyperlink\Output\" ;
24
+ private static string HyperlinkSampleOutputDirectory = Program . SampleDirectory + @"Hyperlink\Output\" ;
25
25
26
26
#endregion
27
27
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ public class HyphenationSample
20
20
{
21
21
#region Private Members
22
22
23
- private const string HyphenationSampleResourceDirectory = Program . SampleDirectory + @"Hyphenation\Resources\" ;
24
- private const string HyphenationSampleOutputDirectory = Program . SampleDirectory + @"Hyphenation\Output\" ;
23
+ private static string HyphenationSampleResourceDirectory = Program . SampleDirectory + @"Hyphenation\Resources\" ;
24
+ private static string HyphenationSampleOutputDirectory = Program . SampleDirectory + @"Hyphenation\Output\" ;
25
25
26
26
#endregion
27
27
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ public class ImageSample
24
24
{
25
25
#region Private Members
26
26
27
- private const string ImageSampleResourcesDirectory = Program . SampleDirectory + @"Image\Resources\" ;
28
- private const string ImageSampleOutputDirectory = Program . SampleDirectory + @"Image\Output\" ;
27
+ private static string ImageSampleResourcesDirectory = Program . SampleDirectory + @"Image\Resources\" ;
28
+ private static string ImageSampleOutputDirectory = Program . SampleDirectory + @"Image\Output\" ;
29
29
30
30
#endregion
31
31
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ public class LineSample
20
20
{
21
21
#region Private Members
22
22
23
- private const string LineSampleOutputDirectory = Program . SampleDirectory + @"Line\Output\" ;
23
+ private static string LineSampleOutputDirectory = Program . SampleDirectory + @"Line\Output\" ;
24
24
25
25
#endregion
26
26
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ public class ListSample
24
24
{
25
25
#region Private Members
26
26
27
- private const string ListSampleResourceDirectory = Program . SampleDirectory + @"List\Resources\" ;
28
- private const string ListSampleOutputDirectory = Program . SampleDirectory + @"List\Output\" ;
27
+ private static string ListSampleResourceDirectory = Program . SampleDirectory + @"List\Resources\" ;
28
+ private static string ListSampleOutputDirectory = Program . SampleDirectory + @"List\Output\" ;
29
29
30
30
#endregion
31
31
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ public class MarginSample
20
20
{
21
21
#region Private Members
22
22
23
- private const string MarginSampleOutputDirectory = Program . SampleDirectory + @"Margin\Output\" ;
23
+ private static string MarginSampleOutputDirectory = Program . SampleDirectory + @"Margin\Output\" ;
24
24
25
25
#endregion
26
26
Original file line number Diff line number Diff line change @@ -24,9 +24,9 @@ public class MiscellaneousSample
24
24
{
25
25
#region Private Members
26
26
27
- private const string MiscellaneousSampleResourcesDirectory = Program . SampleDirectory + @"Miscellaneous\Resources\" ;
28
- private const string MiscellaneousSampleOutputDirectory = Program . SampleDirectory + @"Miscellaneous\Output\" ;
29
- private const string MiscellaneousSampleOutputMailMergeDirectory = MiscellaneousSample . MiscellaneousSampleOutputDirectory + @"MailMerge\" ;
27
+ private static string MiscellaneousSampleResourcesDirectory = Program . SampleDirectory + @"Miscellaneous\Resources\" ;
28
+ private static string MiscellaneousSampleOutputDirectory = Program . SampleDirectory + @"Miscellaneous\Output\" ;
29
+ private static string MiscellaneousSampleOutputMailMergeDirectory = MiscellaneousSample . MiscellaneousSampleOutputDirectory + @"MailMerge\" ;
30
30
31
31
private static List < Candidate > Canditates = new List < Candidate > ( )
32
32
{
Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ public class ParagraphSample
28
28
{ "COST" , "$13.95" } ,
29
29
} ;
30
30
31
- private const string ParagraphSampleResourcesDirectory = Program . SampleDirectory + @"Paragraph\Resources\" ;
32
- private const string ParagraphSampleOutputDirectory = Program . SampleDirectory + @"Paragraph\Output\" ;
31
+ private static string ParagraphSampleResourcesDirectory = Program . SampleDirectory + @"Paragraph\Resources\" ;
32
+ private static string ParagraphSampleOutputDirectory = Program . SampleDirectory + @"Paragraph\Output\" ;
33
33
34
34
#endregion
35
35
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ public class ParallelSample
20
20
{
21
21
#region Private Members
22
22
23
- private const string ParallelSampleResourcesDirectory = Program . SampleDirectory + @"Parallel\Resources\" ;
24
- private const string ParallelSampleOutputDirectory = Program . SampleDirectory + @"Parallel\Output\" ;
23
+ private static string ParallelSampleResourcesDirectory = Program . SampleDirectory + @"Parallel\Resources\" ;
24
+ private static string ParallelSampleOutputDirectory = Program . SampleDirectory + @"Parallel\Output\" ;
25
25
26
26
#endregion
27
27
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ public class ProtectionSample
20
20
{
21
21
#region Private Members
22
22
23
- private const string ProtectionSampleResourceDirectory = Program . SampleDirectory + @"Protection\Resources\" ;
24
- private const string ProtectionSampleOutputDirectory = Program . SampleDirectory + @"Protection\Output\" ;
23
+ private static string ProtectionSampleResourceDirectory = Program . SampleDirectory + @"Protection\Resources\" ;
24
+ private static string ProtectionSampleOutputDirectory = Program . SampleDirectory + @"Protection\Output\" ;
25
25
26
26
#endregion
27
27
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public class SectionSample
22
22
{
23
23
#region Private Members
24
24
25
- private const string SectionSampleOutputDirectory = Program . SampleDirectory + @"Section\Output\" ;
25
+ private static string SectionSampleOutputDirectory = Program . SampleDirectory + @"Section\Output\" ;
26
26
27
27
#endregion
28
28
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ public class ShapeSample
23
23
{
24
24
#region Private Members
25
25
26
- private const string ShapeSampleOutputDirectory = Program . SampleDirectory + @"Shape\Output\" ;
26
+ private static string ShapeSampleOutputDirectory = Program . SampleDirectory + @"Shape\Output\" ;
27
27
28
28
#endregion
29
29
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ public class TableSample
24
24
25
25
private static Random rand = new Random ( ) ;
26
26
27
- private const string TableSampleResourcesDirectory = Program . SampleDirectory + @"Table\Resources\" ;
28
- private const string TableSampleOutputDirectory = Program . SampleDirectory + @"Table\Output\" ;
27
+ private static string TableSampleResourcesDirectory = Program . SampleDirectory + @"Table\Resources\" ;
28
+ private static string TableSampleOutputDirectory = Program . SampleDirectory + @"Table\Output\" ;
29
29
30
30
#endregion
31
31
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ public class TableOfContentSample
21
21
{
22
22
#region Private Members
23
23
24
- private const string TableOfContentSampleResourcesDirectory = Program . SampleDirectory + @"TableOfContent\Resources\" ;
25
- private const string TableOfContentSampleOutputDirectory = Program . SampleDirectory + @"TableOfContent\Output\" ;
24
+ private static string TableOfContentSampleResourcesDirectory = Program . SampleDirectory + @"TableOfContent\Resources\" ;
25
+ private static string TableOfContentSampleOutputDirectory = Program . SampleDirectory + @"TableOfContent\Output\" ;
26
26
27
27
#endregion
28
28
Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
2
<PropertyGroup >
3
- <TargetFrameworks >net40</TargetFrameworks >
3
+ <TargetFrameworks >net40;netcoreapp3.1;net5.0-windows;net6.0-windows </TargetFrameworks >
4
4
<OutputType >Exe</OutputType >
5
5
6
6
<AssemblyTitle >Xceed Words for .NET - Examples</AssemblyTitle >
Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
2
<PropertyGroup >
3
- <TargetFrameworks >net40</TargetFrameworks >
3
+ <TargetFrameworks >net40;netstandard2.0 </TargetFrameworks >
4
4
5
5
<AssemblyTitle >Xceed Words for .NET</AssemblyTitle >
6
6
<Description >This assembly implements the classes for Xceed Words for .NET.</Description >
26
26
<ItemGroup >
27
27
<ProjectReference Include =" ..\Xceed.Document.NET\Xceed.Document.NET.csproj" />
28
28
</ItemGroup >
29
- <ItemGroup >
29
+ <ItemGroup Condition = " '$(TargetFramework)' == 'net40' " >
30
30
<Reference Include =" WindowsBase" />
31
31
</ItemGroup >
32
32
</Project >
You can’t perform that action at this time.
0 commit comments