├── .gitattributes
├── .gitignore
├── Examples
├── BandHelper.cs
├── ContractDealPassport.cs
├── Examples.csproj
├── Indexer.cs
├── LegalEntityCreation.cs
├── LegalEntityCreationData.cs
├── LoanAgreementDealPassport.cs
├── PaymentOrder.cs
├── Styles.cs
├── Svo.cs
└── Test.cs
├── Files
├── Code1.png
├── Code2.png
├── Code3.png
├── Code4.png
├── Code5.png
├── Code6.png
├── Code7.png
├── ContractDealPassport.pdf
├── LAW172722_0_20180026_141723.RTF
├── LAW191272_0_20170628_171359.RTF
├── LoanAgreementDealPassport.pdf
├── MigraDocVsSharpLayout.md
├── MigraDocVsSharpLayout.png
├── MigraDocVsSharpLayout.xlsx
├── Paragraph.png
├── PaymentOrder.pdf
├── PaymentOrder.png
├── PaymentOrderBlank.png
├── PaymentOrder_CellLines.pdf
├── PaymentOrder_Dev.pdf
├── Rabbits.pdf
├── SharpLayout_Rider.gif
├── Svo.pdf
├── Svo_Dev.pdf
├── Table.png
├── icon.pdn
├── icon.png
├── r1.png
├── r10.png
├── r11.png
├── r12.png
├── r13.png
├── r2.png
├── r3.png
├── r4.png
├── r5.png
├── r6.png
├── r7.png
├── r8.png
├── r9.png
├── video.png
└── video2.png
├── LICENSE.md
├── LiveViewer
├── DTEFinder.cs
├── LiveViewer.csproj
├── MainForm.Designer.cs
├── MainForm.cs
├── MainForm.resx
├── MessageFilter.cs
├── Program.cs
├── Settings.cs
└── Util.cs
├── Nuget
├── PdfSharp-net.nuspec
├── SharpLayout.ImageRendering.nuspec
├── SharpLayout.WatcherCore.nuspec
├── SharpLayout.nuspec
├── cmd.bat
└── cmd.txt
├── README.md
├── Resources
├── FontFamilies.cs
├── Fonts
│ ├── FontAnchor.cs
│ ├── WINGDNG2.TTF.gz
│ ├── arial.ttf.gz
│ ├── arialbd.ttf.gz
│ ├── arialbi.ttf.gz
│ ├── ariali.ttf.gz
│ ├── consola.ttf.gz
│ ├── consolab.ttf.gz
│ ├── consolai.ttf.gz
│ ├── consolaz.ttf.gz
│ ├── cour.ttf.gz
│ ├── courbd.ttf.gz
│ ├── courbi.ttf.gz
│ ├── couri.ttf.gz
│ ├── gzip.bat
│ ├── times.ttf.gz
│ ├── timesbd.ttf.gz
│ ├── timesbi.ttf.gz
│ ├── timesi.ttf.gz
│ └── wingding.ttf.gz
├── LegalEntityCreationTemplate.cs
├── LegalEntityCreationTemplate.tiff
└── Resources.csproj
├── SharpLayout.ImageRendering
├── DocumentExtensions.cs
├── FontResolutionKey.cs
├── ImageGraphics.cs
└── SharpLayout.ImageRendering.csproj
├── SharpLayout.WatcherCore
├── Choice.cs
├── Migration.md
├── Ref
│ ├── Microsoft.CSharp.dll
│ ├── Microsoft.VisualBasic.Core.dll
│ ├── Microsoft.VisualBasic.dll
│ ├── Microsoft.Win32.Primitives.dll
│ ├── Microsoft.Win32.Registry.dll
│ ├── Refs.cs
│ ├── System.AppContext.dll
│ ├── System.Buffers.dll
│ ├── System.Collections.Concurrent.dll
│ ├── System.Collections.Immutable.dll
│ ├── System.Collections.NonGeneric.dll
│ ├── System.Collections.Specialized.dll
│ ├── System.Collections.dll
│ ├── System.ComponentModel.Annotations.dll
│ ├── System.ComponentModel.DataAnnotations.dll
│ ├── System.ComponentModel.EventBasedAsync.dll
│ ├── System.ComponentModel.Primitives.dll
│ ├── System.ComponentModel.TypeConverter.dll
│ ├── System.ComponentModel.dll
│ ├── System.Configuration.dll
│ ├── System.Console.dll
│ ├── System.Core.dll
│ ├── System.Data.Common.dll
│ ├── System.Data.DataSetExtensions.dll
│ ├── System.Data.dll
│ ├── System.Diagnostics.Contracts.dll
│ ├── System.Diagnostics.Debug.dll
│ ├── System.Diagnostics.DiagnosticSource.dll
│ ├── System.Diagnostics.FileVersionInfo.dll
│ ├── System.Diagnostics.Process.dll
│ ├── System.Diagnostics.StackTrace.dll
│ ├── System.Diagnostics.TextWriterTraceListener.dll
│ ├── System.Diagnostics.Tools.dll
│ ├── System.Diagnostics.TraceSource.dll
│ ├── System.Diagnostics.Tracing.dll
│ ├── System.Drawing.Primitives.dll
│ ├── System.Drawing.dll
│ ├── System.Dynamic.Runtime.dll
│ ├── System.Formats.Asn1.dll
│ ├── System.Globalization.Calendars.dll
│ ├── System.Globalization.Extensions.dll
│ ├── System.Globalization.dll
│ ├── System.IO.Compression.Brotli.dll
│ ├── System.IO.Compression.FileSystem.dll
│ ├── System.IO.Compression.ZipFile.dll
│ ├── System.IO.Compression.dll
│ ├── System.IO.FileSystem.AccessControl.dll
│ ├── System.IO.FileSystem.DriveInfo.dll
│ ├── System.IO.FileSystem.Primitives.dll
│ ├── System.IO.FileSystem.Watcher.dll
│ ├── System.IO.FileSystem.dll
│ ├── System.IO.IsolatedStorage.dll
│ ├── System.IO.MemoryMappedFiles.dll
│ ├── System.IO.Pipes.AccessControl.dll
│ ├── System.IO.Pipes.dll
│ ├── System.IO.UnmanagedMemoryStream.dll
│ ├── System.IO.dll
│ ├── System.Linq.Expressions.dll
│ ├── System.Linq.Parallel.dll
│ ├── System.Linq.Queryable.dll
│ ├── System.Linq.dll
│ ├── System.Memory.dll
│ ├── System.Net.Http.Json.dll
│ ├── System.Net.Http.dll
│ ├── System.Net.HttpListener.dll
│ ├── System.Net.Mail.dll
│ ├── System.Net.NameResolution.dll
│ ├── System.Net.NetworkInformation.dll
│ ├── System.Net.Ping.dll
│ ├── System.Net.Primitives.dll
│ ├── System.Net.Requests.dll
│ ├── System.Net.Security.dll
│ ├── System.Net.ServicePoint.dll
│ ├── System.Net.Sockets.dll
│ ├── System.Net.WebClient.dll
│ ├── System.Net.WebHeaderCollection.dll
│ ├── System.Net.WebProxy.dll
│ ├── System.Net.WebSockets.Client.dll
│ ├── System.Net.WebSockets.dll
│ ├── System.Net.dll
│ ├── System.Numerics.Vectors.dll
│ ├── System.Numerics.dll
│ ├── System.ObjectModel.dll
│ ├── System.Reflection.DispatchProxy.dll
│ ├── System.Reflection.Emit.ILGeneration.dll
│ ├── System.Reflection.Emit.Lightweight.dll
│ ├── System.Reflection.Emit.dll
│ ├── System.Reflection.Extensions.dll
│ ├── System.Reflection.Metadata.dll
│ ├── System.Reflection.Primitives.dll
│ ├── System.Reflection.TypeExtensions.dll
│ ├── System.Reflection.dll
│ ├── System.Resources.Reader.dll
│ ├── System.Resources.ResourceManager.dll
│ ├── System.Resources.Writer.dll
│ ├── System.Runtime.CompilerServices.Unsafe.dll
│ ├── System.Runtime.CompilerServices.VisualC.dll
│ ├── System.Runtime.Extensions.dll
│ ├── System.Runtime.Handles.dll
│ ├── System.Runtime.InteropServices.RuntimeInformation.dll
│ ├── System.Runtime.InteropServices.dll
│ ├── System.Runtime.Intrinsics.dll
│ ├── System.Runtime.Loader.dll
│ ├── System.Runtime.Numerics.dll
│ ├── System.Runtime.Serialization.Formatters.dll
│ ├── System.Runtime.Serialization.Json.dll
│ ├── System.Runtime.Serialization.Primitives.dll
│ ├── System.Runtime.Serialization.Xml.dll
│ ├── System.Runtime.Serialization.dll
│ ├── System.Runtime.dll
│ ├── System.Security.AccessControl.dll
│ ├── System.Security.Claims.dll
│ ├── System.Security.Cryptography.Algorithms.dll
│ ├── System.Security.Cryptography.Cng.dll
│ ├── System.Security.Cryptography.Csp.dll
│ ├── System.Security.Cryptography.Encoding.dll
│ ├── System.Security.Cryptography.OpenSsl.dll
│ ├── System.Security.Cryptography.Primitives.dll
│ ├── System.Security.Cryptography.X509Certificates.dll
│ ├── System.Security.Principal.Windows.dll
│ ├── System.Security.Principal.dll
│ ├── System.Security.SecureString.dll
│ ├── System.Security.dll
│ ├── System.ServiceModel.Web.dll
│ ├── System.ServiceProcess.dll
│ ├── System.Text.Encoding.CodePages.dll
│ ├── System.Text.Encoding.Extensions.dll
│ ├── System.Text.Encoding.dll
│ ├── System.Text.Encodings.Web.dll
│ ├── System.Text.Json.dll
│ ├── System.Text.RegularExpressions.dll
│ ├── System.Threading.Channels.dll
│ ├── System.Threading.Overlapped.dll
│ ├── System.Threading.Tasks.Dataflow.dll
│ ├── System.Threading.Tasks.Extensions.dll
│ ├── System.Threading.Tasks.Parallel.dll
│ ├── System.Threading.Tasks.dll
│ ├── System.Threading.Thread.dll
│ ├── System.Threading.ThreadPool.dll
│ ├── System.Threading.Timer.dll
│ ├── System.Threading.dll
│ ├── System.Transactions.Local.dll
│ ├── System.Transactions.dll
│ ├── System.ValueTuple.dll
│ ├── System.Web.HttpUtility.dll
│ ├── System.Web.dll
│ ├── System.Windows.dll
│ ├── System.Xml.Linq.dll
│ ├── System.Xml.ReaderWriter.dll
│ ├── System.Xml.Serialization.dll
│ ├── System.Xml.XDocument.dll
│ ├── System.Xml.XPath.XDocument.dll
│ ├── System.Xml.XPath.dll
│ ├── System.Xml.XmlDocument.dll
│ ├── System.Xml.XmlSerializer.dll
│ ├── System.Xml.dll
│ ├── System.dll
│ ├── WindowsBase.dll
│ ├── mscorlib.dll
│ └── netstandard.dll
├── SharpLayout.WatcherCore.csproj
├── Watcher.cs
└── WatcherSettings.cs
├── SharpLayout.sln
├── SharpLayout
├── Cell.cs
├── CellInfo.cs
├── Column.cs
├── DefaultFontFamilies.cs
├── Direction.cs
├── Document.cs
├── Dpi254.cs
├── Drawer.cs
├── Font.cs
├── FontFamilyInfo.cs
├── FontKey.cs
├── FontResolutionKey.cs
├── FontResolver.cs
├── FontSlot.cs
├── Fonts
│ ├── FontAnchor.cs
│ └── Roboto-Regular.ttf.gz
├── Graphics.cs
├── GraphicsType.cs
├── HorizontalAlign.cs
├── IElement.cs
├── IHandler.cs
├── IPageFilter.cs
├── IlReader.cs
├── Image.cs
├── ImageRenderer.cs
├── InlineVerticalAlign.cs
├── Lazy.cs
├── LineKey.cs
├── Option.cs
├── PageSettings.cs
├── Paragraph.cs
├── ParagraphRenderer.cs
├── ReflectionUtil.cs
├── Row.cs
├── Section.cs
├── SectionGroup.cs
├── SharpLayout.csproj
├── Span.cs
├── SyncItemInfo.cs
├── Table.cs
├── TableRenderer.cs
├── Util.cs
└── VerticalAlign.cs
├── Starter
├── DataSources
│ ├── Examples.ContractDealPassportData_DataSource.json
│ ├── Examples.LegalEntityCreationData_DataSource.json
│ ├── Examples.LoanAgreementDealPassportData_DataSource.json
│ ├── Examples.PaymentData_DataSource.json
│ ├── Examples.SvoData_DataSource.json
│ └── Examples.TestData_DataSource.json
├── Program.cs
└── Starter.csproj
├── Tests
├── DataGenerator.cs
├── ImageUtil.cs
├── Images
│ ├── Image1.png
│ ├── Image2.jpg
│ ├── ResourceImage1.cs
│ ├── ResourceImage1.png
│ └── blue-rabbit.pdf
├── TestData
│ ├── AddPageBreak
│ │ ├── Page1.png
│ │ ├── Page2.png
│ │ ├── Page3.png
│ │ └── Page4.png
│ ├── AddParagraph_EmptyString
│ │ └── Page1.png
│ ├── AddParagraph_LineBreak
│ │ └── Page1.png
│ ├── AddParagraph_TrailingSpace
│ │ └── Page1.png
│ ├── AddParagraph_TrailingSpace2
│ │ └── Page1.png
│ ├── BackgroundColor
│ │ └── Page1.png
│ ├── Checkbox
│ │ └── Page1.png
│ ├── ContractDealPassportTest
│ │ └── Page1.png
│ ├── DashBorders
│ │ └── Page1.png
│ ├── DifferentFooters
│ │ ├── Page1.png
│ │ ├── Page2.png
│ │ └── Page3.png
│ ├── DifferentPageHeaders
│ │ ├── Page1.png
│ │ ├── Page2.png
│ │ └── Page3.png
│ ├── DifferentPageHeaders2
│ │ ├── Page1.png
│ │ ├── Page2.png
│ │ ├── Page3.png
│ │ └── Page4.png
│ ├── EmptyFirstPageHeader
│ │ ├── Page1.png
│ │ ├── Page2.png
│ │ └── Page3.png
│ ├── Footnotes
│ │ ├── Page1.png
│ │ ├── Page2.png
│ │ ├── Page3.png
│ │ └── Page4.png
│ ├── Footnotes2
│ │ ├── Page1.png
│ │ └── Page2.png
│ ├── HorizontalAlign_Justify
│ │ └── Page1.png
│ ├── HorizontalAlign_Justify_Underline
│ │ └── Page1.png
│ ├── Image
│ │ └── Page1.png
│ ├── Image_Alignments
│ │ └── Page1.png
│ ├── Intersection_of_border_lines_in_left_column
│ │ └── Page1.png
│ ├── KeepLinesTogether
│ │ ├── Page1.png
│ │ └── Page2.png
│ ├── KeepWith
│ │ ├── Page1.png
│ │ └── Page2.png
│ ├── KeepWithNext
│ │ ├── Page1.png
│ │ └── Page2.png
│ ├── KeepWithNext_DifferentPageHeaders
│ │ ├── Page1.png
│ │ ├── Page2.png
│ │ └── Page3.png
│ ├── LoanAgreementDealPassportTest
│ │ ├── Page1.png
│ │ └── Page2.png
│ ├── PageFooter
│ │ ├── Page1.png
│ │ ├── Page2.png
│ │ ├── Page3.png
│ │ ├── Page4.png
│ │ └── Page5.png
│ ├── PageHeader
│ │ ├── Page1.png
│ │ ├── Page2.png
│ │ ├── Page3.png
│ │ └── Page4.png
│ ├── ParagraphByPages
│ │ ├── Page1.png
│ │ └── Page2.png
│ ├── ParagraphLineSpacingFunc
│ │ └── Page1.png
│ ├── PaymentOrderTest
│ │ └── Page1.png
│ ├── QRCode
│ │ └── Page1.png
│ ├── RowHeightGreaterThanPageHeight
│ │ ├── Page1.png
│ │ └── Page2.png
│ ├── SectionGroup
│ │ ├── Page1.png
│ │ ├── Page2.png
│ │ └── Page3.png
│ ├── SpanBackgroundColor
│ │ └── Page1.png
│ ├── Superscript
│ │ └── Page1.png
│ ├── Superscript_LongText
│ │ └── Page1.png
│ ├── SvoTest
│ │ └── Page1.png
│ ├── TableBottomMargin
│ │ └── Page1.png
│ ├── TableHeader
│ │ ├── Page1.png
│ │ ├── Page2.png
│ │ ├── Page3.png
│ │ └── Page4.png
│ ├── Test1
│ │ ├── Page1.png
│ │ ├── Page2.png
│ │ ├── Page3.png
│ │ ├── Page4.png
│ │ └── Page5.png
│ ├── Test2
│ │ ├── Page1.png
│ │ ├── Page2.png
│ │ └── Page3.png
│ ├── Test3
│ │ ├── Page1.png
│ │ ├── Page2.png
│ │ └── Page3.png
│ ├── Test4
│ │ └── Page1.png
│ ├── TextIndent
│ │ └── Page1.png
│ ├── UnderlineText
│ │ └── Page1.png
│ ├── UnderlinedSpace
│ │ └── Page1.png
│ └── VectorImage
│ │ └── Page1.png
├── Tests.cs
└── Tests.csproj
└── Watcher
├── Program.cs
├── Watcher.csproj
└── WatcherSettingsProvider.cs
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/Examples/BandHelper.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.CompilerServices;
2 | using PdfSharp.Drawing;
3 | using SharpLayout;
4 |
5 | namespace Examples
6 | {
7 | public static class BandHelper
8 | {
9 | public static double Px(double value) => XUnit.FromInch(value / 300d);
10 |
11 | public static Section Band(this Section section, double x, double y, int columnCount, int rowCount, Indexer indexer,
12 | [CallerLineNumber] int line = 0, [CallerFilePath] string filePath = "")
13 | {
14 | for (var i = 0; i < rowCount; i++)
15 | section.Band(x, y + 98 * i, columnCount, indexer, line, filePath);
16 | return section;
17 | }
18 |
19 | public static Section Band(this Section section, double x, double y, int columnCount, Indexer indexer,
20 | [CallerLineNumber] int line = 0, [CallerFilePath] string filePath = "")
21 | {
22 | var table = section.AddTable().Font(Styles.Courier15)
23 | .ContentAlign(HorizontalAlign.Center).ContentVerticalAlign(VerticalAlign.Center)
24 | .Location(Px(x), Px(y));
25 | for (var i = 0; i < columnCount; i++)
26 | table.AddColumn(Px(2333 / 40d));
27 | var r1 = table.AddRow().Height(Px(72));
28 | for (var i = 0; i < columnCount; i++)
29 | {
30 | r1[i].Add(new Paragraph()
31 | .Add(indexer.Current, line, filePath));
32 | indexer.Next();
33 | }
34 | return section;
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Examples/Examples.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Examples/Indexer.cs:
--------------------------------------------------------------------------------
1 | namespace Examples
2 | {
3 | public class Indexer
4 | {
5 | private readonly string _value;
6 | private int _index;
7 |
8 | public Indexer(string value) => _value = value;
9 |
10 | public void Next() => _index++;
11 |
12 | public string Current => _index < _value?.Length ? _value.Substring(_index, 1) : "";
13 |
14 | public static implicit operator Indexer(string value) => new Indexer(value);
15 | }
16 | }
--------------------------------------------------------------------------------
/Examples/LegalEntityCreation.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using Resources;
3 | using SharpLayout;
4 |
5 | namespace Examples
6 | {
7 | public static class LegalEntityCreation
8 | {
9 | public static void AddSection(Document document, LegalEntityCreationData data)
10 | {
11 | var pageSettings = new PageSettings
12 | {
13 | TopMargin = 0,
14 | BottomMargin = 0,
15 | LeftMargin = 0,
16 | RightMargin = 0
17 | };
18 | var section = document.Add(new Section(pageSettings))
19 | .Template(Template);
20 | var areaName = new Indexer(data.AreaName);
21 | section
22 | .Band(71, 775, 40, 6, data.FullName)
23 | .Band(70, 1488, 40, 4, data.Name)
24 | .Band(579, 2138, 6, data.PostalCode)
25 | .Band(1789, 2138, 2, data.Subject)
26 | .Band(71, 2388, 10, data.Area)
27 | .Band(766, 2383, 28, areaName)
28 | .Band(71, 2496, 40, areaName)
29 | .Band(71, 2676, 10, data.City)
30 | .Band(771, 2675, 28, data.CityName);
31 | }
32 |
33 | private static Stream Template()
34 | {
35 | var anchorType = typeof(LegalEntityCreationTemplate);
36 | return anchorType.Assembly.GetManifestResourceStream(anchorType.FullName + ".tiff");
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/Examples/LegalEntityCreationData.cs:
--------------------------------------------------------------------------------
1 | namespace Examples
2 | {
3 | public class LegalEntityCreationData
4 | {
5 | public string FullName { get; set; }
6 | public string Name { get; set; }
7 | public string PostalCode { get; set; }
8 | public string Subject { get; set; }
9 | public string AreaName { get; set; }
10 | public string Area { get; set; }
11 | public string City { get; set; }
12 | public string CityName { get; set; }
13 | }
14 | }
--------------------------------------------------------------------------------
/Examples/Styles.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using PdfSharp.Drawing;
3 | using PdfSharp.Pdf;
4 | using SharpLayout;
5 | using static Resources.FontFamilies;
6 | using static SharpLayout.Direction;
7 | using static SharpLayout.Util;
8 |
9 | namespace Examples
10 | {
11 | public static class Styles
12 | {
13 | public static Font TimesNewRoman10_5 => new Font(TimesNewRoman, 10.5, XFontStyle.Regular, PdfOptions);
14 | public static Font TimesNewRoman60Bold => new Font(TimesNewRoman, 60, XFontStyle.Bold, PdfOptions);
15 |
16 | public static Font TimesNewRoman7_5 => new Font(TimesNewRoman, 7.5, XFontStyle.Regular, PdfOptions);
17 | public static Font TimesNewRoman8 => new Font(TimesNewRoman, 8, XFontStyle.Regular, PdfOptions);
18 | public static Font TimesNewRoman9 => new Font(TimesNewRoman, 9, XFontStyle.Regular, PdfOptions);
19 | public static Font TimesNewRoman9_5 => new Font(TimesNewRoman, 9.5, XFontStyle.Regular, PdfOptions);
20 | public static Font TimesNewRoman10 => new Font(TimesNewRoman, 10, XFontStyle.Regular, PdfOptions);
21 | public static Font TimesNewRoman10Bold => new Font(TimesNewRoman, 10, XFontStyle.Bold, PdfOptions);
22 | public static Font TimesNewRoman10_5Bold => new Font(TimesNewRoman, 10.5, XFontStyle.Bold, PdfOptions);
23 | public static Font TimesNewRoman11 => new Font(TimesNewRoman, 11, XFontStyle.Regular, PdfOptions);
24 | public static Font TimesNewRoman11_5 => new Font(TimesNewRoman, 11.5, XFontStyle.Regular, PdfOptions);
25 | public static Font TimesNewRoman11_5Bold => new Font(TimesNewRoman, 11.5, XFontStyle.Bold, PdfOptions);
26 | public static Font TimesNewRoman12 => new Font(TimesNewRoman, 12, XFontStyle.Regular, PdfOptions);
27 | public static Font TimesNewRoman14 => new Font(TimesNewRoman, 14, XFontStyle.Regular, PdfOptions);
28 | public static Font Courier15 => new Font(CourierNew, 15, XFontStyle.Regular, PdfOptions);
29 | public static Font TimesNewRoman12Bold => new Font(TimesNewRoman, 12, XFontStyle.Bold, PdfOptions);
30 | public static Font TimesNewRoman13Bold => new Font(TimesNewRoman, 13, XFontStyle.Bold, PdfOptions);
31 |
32 | public static Font Arial9 => new Font(Arial, 9, XFontStyle.Regular, PdfOptions);
33 |
34 | public const double BorderWidth = 0.5D;
35 |
36 | public static Cell Border(this Cell cell, Direction direction) => cell.Border(direction, BorderWidth);
37 |
38 | public static XPdfFontOptions PdfOptions => new XPdfFontOptions(PdfFontEncoding.Unicode);
39 |
40 | public static string Format(this DateTime value) => value.ToString("dd.MM.yyyy");
41 |
42 | public static void Distribute(this Column[] columns, double width)
43 | {
44 | var d = width / columns.Length;
45 | double sum = 0;
46 | for (var i = 0; i < columns.Length - 1; i++)
47 | {
48 | columns[i].Width += d;
49 | sum += d;
50 | }
51 | columns[columns.Length - 1].Width += width - sum;
52 | }
53 |
54 | public static string CellSubstring(this string s, int i, int cellCount)
55 | {
56 | if (s == null) return "";
57 | if (i >= s.Length) return "";
58 | if (i == cellCount - 1) return s.Substring(i);
59 | return s.Substring(i, 1);
60 | }
61 |
62 | public static Paragraph NormalParagraph => new Paragraph().Margin(Left | Right, Cm(0.05));
63 | }
64 | }
--------------------------------------------------------------------------------
/Examples/Test.cs:
--------------------------------------------------------------------------------
1 | using SharpLayout;
2 | using static Examples.Styles;
3 | using static SharpLayout.Util;
4 |
5 | namespace Examples
6 | {
7 | public static class Test
8 | {
9 | public static void AddSection(Document document, TestData data)
10 | {
11 | var pageSettings = new PageSettings {
12 | TopMargin = 0,
13 | BottomMargin = 0,
14 | LeftMargin = Cm(1),
15 | RightMargin = Cm(1)
16 | };
17 | var section = document.Add(new Section(pageSettings));
18 | }
19 | }
20 |
21 | public class TestData
22 | {
23 | }
24 | }
--------------------------------------------------------------------------------
/Files/Code1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/Code1.png
--------------------------------------------------------------------------------
/Files/Code2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/Code2.png
--------------------------------------------------------------------------------
/Files/Code3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/Code3.png
--------------------------------------------------------------------------------
/Files/Code4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/Code4.png
--------------------------------------------------------------------------------
/Files/Code5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/Code5.png
--------------------------------------------------------------------------------
/Files/Code6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/Code6.png
--------------------------------------------------------------------------------
/Files/Code7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/Code7.png
--------------------------------------------------------------------------------
/Files/ContractDealPassport.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/ContractDealPassport.pdf
--------------------------------------------------------------------------------
/Files/LoanAgreementDealPassport.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/LoanAgreementDealPassport.pdf
--------------------------------------------------------------------------------
/Files/MigraDocVsSharpLayout.md:
--------------------------------------------------------------------------------
1 | ## Сравнение производительности MigraDoc vs SharpLayout
2 |
3 | Время создания pdf файла в зависимости от количества строк в таблице. MigraDoc – степенная функция с показателем 1.75. SharpLayout – линейная зависимость.
4 | 
5 | Измерения времени можно запустить, пройдя по ссылкам
6 | [для MigraDoc](https://github.com/AVPolyakov/MigraDoc-samples/blob/PerformanceLongTable/samples/core/HelloWorld/Program.cs#L16),
7 | [для SharpLayout](https://github.com/AVPolyakov/SharpLayout/blob/PerformanceLongTable/SharpLayout.Tests/Program.cs#L11).
8 | Таблица с результатами [ссылка](MigraDocVsSharpLayout.xlsx?raw=true).
9 |
--------------------------------------------------------------------------------
/Files/MigraDocVsSharpLayout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/MigraDocVsSharpLayout.png
--------------------------------------------------------------------------------
/Files/MigraDocVsSharpLayout.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/MigraDocVsSharpLayout.xlsx
--------------------------------------------------------------------------------
/Files/Paragraph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/Paragraph.png
--------------------------------------------------------------------------------
/Files/PaymentOrder.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/PaymentOrder.pdf
--------------------------------------------------------------------------------
/Files/PaymentOrder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/PaymentOrder.png
--------------------------------------------------------------------------------
/Files/PaymentOrderBlank.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/PaymentOrderBlank.png
--------------------------------------------------------------------------------
/Files/PaymentOrder_CellLines.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/PaymentOrder_CellLines.pdf
--------------------------------------------------------------------------------
/Files/PaymentOrder_Dev.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/PaymentOrder_Dev.pdf
--------------------------------------------------------------------------------
/Files/Rabbits.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/Rabbits.pdf
--------------------------------------------------------------------------------
/Files/SharpLayout_Rider.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/SharpLayout_Rider.gif
--------------------------------------------------------------------------------
/Files/Svo.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/Svo.pdf
--------------------------------------------------------------------------------
/Files/Svo_Dev.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/Svo_Dev.pdf
--------------------------------------------------------------------------------
/Files/Table.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/Table.png
--------------------------------------------------------------------------------
/Files/icon.pdn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/icon.pdn
--------------------------------------------------------------------------------
/Files/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/icon.png
--------------------------------------------------------------------------------
/Files/r1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/r1.png
--------------------------------------------------------------------------------
/Files/r10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/r10.png
--------------------------------------------------------------------------------
/Files/r11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/r11.png
--------------------------------------------------------------------------------
/Files/r12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/r12.png
--------------------------------------------------------------------------------
/Files/r13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/r13.png
--------------------------------------------------------------------------------
/Files/r2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/r2.png
--------------------------------------------------------------------------------
/Files/r3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/r3.png
--------------------------------------------------------------------------------
/Files/r4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/r4.png
--------------------------------------------------------------------------------
/Files/r5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/r5.png
--------------------------------------------------------------------------------
/Files/r6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/r6.png
--------------------------------------------------------------------------------
/Files/r7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/r7.png
--------------------------------------------------------------------------------
/Files/r8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/r8.png
--------------------------------------------------------------------------------
/Files/r9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/r9.png
--------------------------------------------------------------------------------
/Files/video.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/video.png
--------------------------------------------------------------------------------
/Files/video2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Files/video2.png
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017-2022 Alexander Polyakov
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/LiveViewer/DTEFinder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 | using System.Runtime.InteropServices.ComTypes;
4 | using EnvDTE80;
5 |
6 | namespace LiveViewer
7 | {
8 | public static class DTEFinder
9 | {
10 | private const string ProgId = "VisualStudio.DTE";
11 |
12 | [DllImport("ole32.dll")]
13 | private static extern int CreateBindCtx(uint reserved, out IBindCtx ppbc);
14 |
15 | public static DTE2 GetDTE(int? processId)
16 | {
17 | object runningObject = null;
18 |
19 | IBindCtx bindCtx = null;
20 | IRunningObjectTable rot = null;
21 | IEnumMoniker enumMonikers = null;
22 |
23 | try
24 | {
25 | Marshal.ThrowExceptionForHR(CreateBindCtx(reserved: 0, ppbc: out bindCtx));
26 | bindCtx.GetRunningObjectTable(out rot);
27 | rot.EnumRunning(out enumMonikers);
28 |
29 | IMoniker[] moniker = new IMoniker[1];
30 | IntPtr numberFetched = IntPtr.Zero;
31 | while (enumMonikers.Next(1, moniker, numberFetched) == 0)
32 | {
33 | IMoniker runningObjectMoniker = moniker[0];
34 |
35 | string name = null;
36 |
37 | try
38 | {
39 | if (runningObjectMoniker != null)
40 | {
41 | runningObjectMoniker.GetDisplayName(bindCtx, null, out name);
42 | }
43 | }
44 | catch (UnauthorizedAccessException)
45 | {
46 | // Do nothing, there is something in the ROT that we do not have access to.
47 | }
48 |
49 | if (!string.IsNullOrEmpty(name) &&
50 | name.StartsWith($"!{ProgId}", StringComparison.Ordinal) &&
51 | (!processId.HasValue || name.EndsWith($":{processId}", StringComparison.Ordinal)))
52 | {
53 | Marshal.ThrowExceptionForHR(rot.GetObject(runningObjectMoniker, out runningObject));
54 | break;
55 | }
56 | }
57 | }
58 | finally
59 | {
60 | if (enumMonikers != null)
61 | {
62 | Marshal.ReleaseComObject(enumMonikers);
63 | }
64 |
65 | if (rot != null)
66 | {
67 | Marshal.ReleaseComObject(rot);
68 | }
69 |
70 | if (bindCtx != null)
71 | {
72 | Marshal.ReleaseComObject(bindCtx);
73 | }
74 | }
75 |
76 | return (DTE2)runningObject;
77 | }
78 | }
79 | }
--------------------------------------------------------------------------------
/LiveViewer/LiveViewer.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | WinExe
5 | net5.0-windows
6 | true
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/LiveViewer/MainForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace LiveViewer
2 | {
3 | partial class MainForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | this.pictureBox = new System.Windows.Forms.PictureBox();
33 | this.fileSystemWatcher = new System.IO.FileSystemWatcher();
34 | this.multipleLineMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
35 | this.panel1 = new System.Windows.Forms.Panel();
36 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
37 | ((System.ComponentModel.ISupportInitialize)(this.fileSystemWatcher)).BeginInit();
38 | this.panel1.SuspendLayout();
39 | this.SuspendLayout();
40 | //
41 | // pictureBox
42 | //
43 | this.pictureBox.Location = new System.Drawing.Point(0, 0);
44 | this.pictureBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
45 | this.pictureBox.Name = "pictureBox";
46 | this.pictureBox.Size = new System.Drawing.Size(100, 50);
47 | this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
48 | this.pictureBox.TabIndex = 0;
49 | this.pictureBox.TabStop = false;
50 | this.pictureBox.MouseClick += new System.Windows.Forms.MouseEventHandler(this.pictureBox_MouseClick);
51 | this.pictureBox.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBox_MouseDown);
52 | this.pictureBox.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBox_MouseMove);
53 | //
54 | // fileSystemWatcher
55 | //
56 | this.fileSystemWatcher.EnableRaisingEvents = true;
57 | this.fileSystemWatcher.SynchronizingObject = this;
58 | this.fileSystemWatcher.Changed += new System.IO.FileSystemEventHandler(this.fileSystemWatcher_Changed);
59 | //
60 | // multipleLineMenuStrip
61 | //
62 | this.multipleLineMenuStrip.Name = "multipleLineMenuStrip";
63 | this.multipleLineMenuStrip.Size = new System.Drawing.Size(61, 4);
64 | //
65 | // panel1
66 | //
67 | this.panel1.AutoScroll = true;
68 | this.panel1.Controls.Add(this.pictureBox);
69 | this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
70 | this.panel1.Location = new System.Drawing.Point(0, 0);
71 | this.panel1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
72 | this.panel1.Name = "panel1";
73 | this.panel1.Size = new System.Drawing.Size(1060, 573);
74 | this.panel1.TabIndex = 1;
75 | //
76 | // MainForm
77 | //
78 | this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
79 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
80 | this.AutoScroll = true;
81 | this.ClientSize = new System.Drawing.Size(1060, 573);
82 | this.Controls.Add(this.panel1);
83 | this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
84 | this.Name = "MainForm";
85 | this.Text = "Live Viewer";
86 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
87 | ((System.ComponentModel.ISupportInitialize)(this.fileSystemWatcher)).EndInit();
88 | this.panel1.ResumeLayout(false);
89 | this.panel1.PerformLayout();
90 | this.ResumeLayout(false);
91 |
92 | }
93 |
94 | #endregion
95 |
96 | private System.Windows.Forms.PictureBox pictureBox;
97 | private System.IO.FileSystemWatcher fileSystemWatcher;
98 | private System.Windows.Forms.ContextMenuStrip multipleLineMenuStrip;
99 | private System.Windows.Forms.Panel panel1;
100 | }
101 | }
102 |
103 |
--------------------------------------------------------------------------------
/LiveViewer/MainForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | text/microsoft-resx
50 |
51 |
52 | 2.0
53 |
54 |
55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
56 |
57 |
58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
59 |
60 |
--------------------------------------------------------------------------------
/LiveViewer/MessageFilter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace LiveViewer
5 | {
6 | ///
7 | /// How to: Fix 'Application is Busy' and 'Call was Rejected By Callee' Errors
8 | /// https://msdn.microsoft.com/en-us/library/ms228772(v=vs.140).aspx
9 | ///
10 | public class MessageFilter : IOleMessageFilter
11 | {
12 | //
13 | // Class containing the IOleMessageFilter
14 | // thread error-handling functions.
15 |
16 | // Start the filter.
17 | public static void Register()
18 | {
19 | IOleMessageFilter newFilter = new MessageFilter();
20 | IOleMessageFilter oldFilter = null;
21 | CoRegisterMessageFilter(newFilter, out oldFilter);
22 | }
23 |
24 | // Done with the filter, close it.
25 | public static void Revoke()
26 | {
27 | IOleMessageFilter oldFilter = null;
28 | CoRegisterMessageFilter(null, out oldFilter);
29 | }
30 |
31 | //
32 | // IOleMessageFilter functions.
33 | // Handle incoming thread requests.
34 | int IOleMessageFilter.HandleInComingCall(int dwCallType,
35 | System.IntPtr hTaskCaller, int dwTickCount, System.IntPtr
36 | lpInterfaceInfo)
37 | {
38 | //Return the flag SERVERCALL_ISHANDLED.
39 | return 0;
40 | }
41 |
42 | // Thread call was rejected, so try again.
43 | int IOleMessageFilter.RetryRejectedCall(System.IntPtr
44 | hTaskCallee, int dwTickCount, int dwRejectType)
45 | {
46 | if (dwRejectType == 2)
47 | // flag = SERVERCALL_RETRYLATER.
48 | {
49 | // Retry the thread call immediately if return >=0 &
50 | // <100.
51 | return 99;
52 | }
53 | // Too busy; cancel call.
54 | return -1;
55 | }
56 |
57 | int IOleMessageFilter.MessagePending(System.IntPtr hTaskCallee,
58 | int dwTickCount, int dwPendingType)
59 | {
60 | //Return the flag PENDINGMSG_WAITDEFPROCESS.
61 | return 2;
62 | }
63 |
64 | // Implement the IOleMessageFilter interface.
65 | [DllImport("Ole32.dll")]
66 | private static extern int
67 | CoRegisterMessageFilter(IOleMessageFilter newFilter, out
68 | IOleMessageFilter oldFilter);
69 | }
70 |
71 | [ComImport(), Guid("00000016-0000-0000-C000-000000000046"),
72 | InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
73 | interface IOleMessageFilter
74 | {
75 | [PreserveSig]
76 | int HandleInComingCall(
77 | int dwCallType,
78 | IntPtr hTaskCaller,
79 | int dwTickCount,
80 | IntPtr lpInterfaceInfo);
81 |
82 | [PreserveSig]
83 | int RetryRejectedCall(
84 | IntPtr hTaskCallee,
85 | int dwTickCount,
86 | int dwRejectType);
87 |
88 | [PreserveSig]
89 | int MessagePending(
90 | IntPtr hTaskCallee,
91 | int dwTickCount,
92 | int dwPendingType);
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/LiveViewer/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Windows.Forms;
4 | using Microsoft.VisualBasic.ApplicationServices;
5 |
6 | namespace LiveViewer
7 | {
8 | static class Program
9 | {
10 | ///
11 | /// The main entry point for the application.
12 | ///
13 | [STAThread]
14 | static void Main()
15 | {
16 | Application.EnableVisualStyles();
17 | Application.SetCompatibleTextRenderingDefault(false);
18 | var args = Environment.GetCommandLineArgs();
19 | var controller = new SingleInstanceController();
20 | controller.Run(args);
21 | }
22 | }
23 |
24 | ///
25 | /// http://www.hanselman.com/blog/TheWeeklySourceCode31SingleInstanceWinFormsAndMicrosoftVisualBasicdll.aspx
26 | /// https://stackoverflow.com/a/3808173
27 | ///
28 | public class SingleInstanceController : WindowsFormsApplicationBase
29 | {
30 | public SingleInstanceController()
31 | {
32 | IsSingleInstance = true;
33 |
34 | StartupNextInstance += this_StartupNextInstance;
35 | }
36 |
37 | void this_StartupNextInstance(object sender, StartupNextInstanceEventArgs e)
38 | {
39 | ((MainForm) MainForm).LoadFile(e.CommandLine.ToArray());
40 | }
41 |
42 | protected override void OnCreateMainForm()
43 | {
44 | MainForm = new MainForm();
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/LiveViewer/Settings.cs:
--------------------------------------------------------------------------------
1 | using System.Drawing;
2 | using System.Windows.Forms;
3 |
4 | namespace LiveViewer
5 | {
6 | public class Settings
7 | {
8 | public Point? Location { get; set; }
9 | public Size? Size { get; set; }
10 | public FormWindowState WindowState { get; set; }
11 | }
12 | }
--------------------------------------------------------------------------------
/LiveViewer/Util.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using SharpLayout;
3 |
4 | namespace LiveViewer
5 | {
6 | public static class Util
7 | {
8 | public static double ToPixel(this double value, SyncBitmapInfo bitmapInfo)
9 | {
10 | return Math.Round(value * bitmapInfo.Resolution / 72, MidpointRounding.AwayFromZero);
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/Nuget/PdfSharp-net.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | PdfSharp-net
5 | 1.0.1
6 | Alexander Polyakov
7 | Alexander Polyakov
8 | false
9 | https://github.com/AVPolyakov/PDFsharp
10 | This package was built from the source at commit https://github.com/AVPolyakov/PDFsharp/commit/0d919f5f0e2744548358352819f3c3728359b360
11 | Copyright 2021
12 | PDFsharp PDF creation .NETCore
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Nuget/SharpLayout.ImageRendering.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | SharpLayout.ImageRendering
5 | 1.0.6
6 | SharpLayout image rendering.
7 | Alexander Polyakov
8 | Alexander Polyakov
9 | false
10 | https://github.com/AVPolyakov/SharpLayout/blob/master/LICENSE.md
11 | https://github.com/AVPolyakov/SharpLayout
12 | https://raw.githubusercontent.com/AVPolyakov/SharpLayout/master/Files/icon.png
13 | SharpLayout image rendering.
14 | Copyright 2021
15 | SharpLayout Image Rendering
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Nuget/SharpLayout.WatcherCore.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | SharpLayout.WatcherCore
5 | 1.0.31
6 | Watcher for SharpLayout.
7 | Alexander Polyakov
8 | Alexander Polyakov
9 | false
10 | https://github.com/AVPolyakov/SharpLayout/blob/master/LICENSE.md
11 | https://github.com/AVPolyakov/SharpLayout
12 | Watcher for SharpLayout.
13 | Copyright 2021
14 | PDF CSharp PDFsharp
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Nuget/SharpLayout.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | SharpLayout
5 | 1.0.77
6 | C# library for creating PDF.
7 | Alexander Polyakov
8 | Alexander Polyakov
9 | false
10 | https://github.com/AVPolyakov/SharpLayout/blob/master/LICENSE.md
11 | https://github.com/AVPolyakov/SharpLayout
12 | https://raw.githubusercontent.com/AVPolyakov/SharpLayout/master/Files/icon.png
13 | C# library for creating PDF.
14 | Remove System.Drawing reference
15 | Copyright 2021
16 | PDF CSharp PDFsharp
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Nuget/cmd.bat:
--------------------------------------------------------------------------------
1 | copy SharpLayout.nuspec ..\SharpLayout\
2 | NuGet.exe pack ..\SharpLayout\SharpLayout.csproj -Prop Configuration=Release
3 | del ..\SharpLayout\SharpLayout.nuspec
4 |
5 | copy SharpLayout.ImageRendering.nuspec ..\SharpLayout.ImageRendering\
6 | NuGet.exe pack ..\SharpLayout.ImageRendering\SharpLayout.ImageRendering.csproj -Prop Configuration=Release
7 | del ..\SharpLayout.ImageRendering\SharpLayout.ImageRendering.nuspec
8 |
9 | copy SharpLayout.WatcherCore.nuspec ..\SharpLayout.WatcherCore\
10 | NuGet.exe pack ..\SharpLayout.WatcherCore\SharpLayout.WatcherCore.csproj -Prop Configuration=Release
11 | del ..\SharpLayout.WatcherCore\SharpLayout.WatcherCore.nuspec
--------------------------------------------------------------------------------
/Nuget/cmd.txt:
--------------------------------------------------------------------------------
1 | NuGet.exe pack SharpLayout.csproj -Prop Configuration=Release
2 |
3 | NuGet.exe pack SharpLayout.ImageRendering.csproj -Prop Configuration=Release
4 |
5 | NuGet.exe pack SharpLayout.WatcherCore.csproj -Prop Configuration=Release
6 |
7 | NuGet.exe pack PdfSharp-net.csproj -Prop Configuration=Release
--------------------------------------------------------------------------------
/Resources/FontFamilies.cs:
--------------------------------------------------------------------------------
1 | using Resources.Fonts;
2 | using SharpLayout;
3 |
4 | namespace Resources
5 | {
6 | public static class FontFamilies
7 | {
8 | public static FontFamilyInfo TimesNewRoman => slot.FamilyInfo("Times New Roman");
9 | public static FontFamilyInfo Arial => slot.FamilyInfo("Arial");
10 | public static FontFamilyInfo CourierNew => slot.FamilyInfo("Courier New");
11 | public static FontFamilyInfo Consolas => slot.FamilyInfo("Consolas");
12 | public static FontFamilyInfo Wingdings => slot.FamilyInfo("Wingdings");
13 | public static FontFamilyInfo Wingdings2 => slot.FamilyInfo("Wingdings 2");
14 |
15 | private static readonly FontSlot slot = new();
16 |
17 | static FontFamilies() => FontResolver.Install(slot, typeof(FontAnchor));
18 | }
19 | }
--------------------------------------------------------------------------------
/Resources/Fonts/FontAnchor.cs:
--------------------------------------------------------------------------------
1 | namespace Resources.Fonts
2 | {
3 | public class FontAnchor
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/Resources/Fonts/WINGDNG2.TTF.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Resources/Fonts/WINGDNG2.TTF.gz
--------------------------------------------------------------------------------
/Resources/Fonts/arial.ttf.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Resources/Fonts/arial.ttf.gz
--------------------------------------------------------------------------------
/Resources/Fonts/arialbd.ttf.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Resources/Fonts/arialbd.ttf.gz
--------------------------------------------------------------------------------
/Resources/Fonts/arialbi.ttf.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Resources/Fonts/arialbi.ttf.gz
--------------------------------------------------------------------------------
/Resources/Fonts/ariali.ttf.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Resources/Fonts/ariali.ttf.gz
--------------------------------------------------------------------------------
/Resources/Fonts/consola.ttf.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Resources/Fonts/consola.ttf.gz
--------------------------------------------------------------------------------
/Resources/Fonts/consolab.ttf.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Resources/Fonts/consolab.ttf.gz
--------------------------------------------------------------------------------
/Resources/Fonts/consolai.ttf.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Resources/Fonts/consolai.ttf.gz
--------------------------------------------------------------------------------
/Resources/Fonts/consolaz.ttf.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Resources/Fonts/consolaz.ttf.gz
--------------------------------------------------------------------------------
/Resources/Fonts/cour.ttf.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Resources/Fonts/cour.ttf.gz
--------------------------------------------------------------------------------
/Resources/Fonts/courbd.ttf.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Resources/Fonts/courbd.ttf.gz
--------------------------------------------------------------------------------
/Resources/Fonts/courbi.ttf.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Resources/Fonts/courbi.ttf.gz
--------------------------------------------------------------------------------
/Resources/Fonts/couri.ttf.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Resources/Fonts/couri.ttf.gz
--------------------------------------------------------------------------------
/Resources/Fonts/gzip.bat:
--------------------------------------------------------------------------------
1 | for %%f in (*.ttf) do (
2 | "C:\Program Files\7-Zip\7z.exe" a -tgzip "%%f.gz" "%%f"
3 | )
--------------------------------------------------------------------------------
/Resources/Fonts/times.ttf.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Resources/Fonts/times.ttf.gz
--------------------------------------------------------------------------------
/Resources/Fonts/timesbd.ttf.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Resources/Fonts/timesbd.ttf.gz
--------------------------------------------------------------------------------
/Resources/Fonts/timesbi.ttf.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Resources/Fonts/timesbi.ttf.gz
--------------------------------------------------------------------------------
/Resources/Fonts/timesi.ttf.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Resources/Fonts/timesi.ttf.gz
--------------------------------------------------------------------------------
/Resources/Fonts/wingding.ttf.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Resources/Fonts/wingding.ttf.gz
--------------------------------------------------------------------------------
/Resources/LegalEntityCreationTemplate.cs:
--------------------------------------------------------------------------------
1 | namespace Resources
2 | {
3 | public class LegalEntityCreationTemplate
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Resources/LegalEntityCreationTemplate.tiff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/Resources/LegalEntityCreationTemplate.tiff
--------------------------------------------------------------------------------
/Resources/Resources.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/SharpLayout.ImageRendering/FontResolutionKey.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace SharpLayout.ImageRendering
4 | {
5 | internal readonly struct FontResolutionKey : IEquatable
6 | {
7 | private readonly string familyName;
8 | private readonly bool isBold;
9 | private readonly bool isItalic;
10 |
11 | public FontResolutionKey(string familyName, bool isBold, bool isItalic)
12 | {
13 | this.familyName = familyName;
14 | this.isBold = isBold;
15 | this.isItalic = isItalic;
16 | }
17 |
18 | public bool Equals(FontResolutionKey other)
19 | {
20 | return familyName == other.familyName && isBold == other.isBold && isItalic == other.isItalic;
21 | }
22 |
23 | public override bool Equals(object obj)
24 | {
25 | return obj is FontResolutionKey other && Equals(other);
26 | }
27 |
28 | public override int GetHashCode()
29 | {
30 | unchecked
31 | {
32 | var hashCode = familyName != null ? familyName.GetHashCode() : 0;
33 | hashCode = (hashCode * 397) ^ isBold.GetHashCode();
34 | hashCode = (hashCode * 397) ^ isItalic.GetHashCode();
35 | return hashCode;
36 | }
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/SharpLayout.ImageRendering/SharpLayout.ImageRendering.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | latest
6 |
7 | false
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Choice.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace SharpLayout.WatcherCore
4 | {
5 | public abstract class Choice
6 | {
7 | public abstract T Match(Func choice1, Func choice2);
8 |
9 | public static implicit operator Choice(T1 choice1) => new Choice1(choice1);
10 |
11 | public static implicit operator Choice(T2 choice2) => new Choice2(choice2);
12 |
13 | public bool HasValue1 => Match(_ => true, _ => false);
14 |
15 | public bool HasValue2 => Match(_ => false, _ => true);
16 |
17 | public T1 Value1 => Match(_ => _, _ => throw new InvalidOperationException());
18 |
19 | public T2 Value2 => Match(_ => throw new InvalidOperationException(), _ => _);
20 |
21 | private Choice()
22 | {
23 | }
24 |
25 | public sealed class Choice1 : Choice
26 | {
27 | private readonly T1 value;
28 |
29 | public Choice1(T1 value) => this.value = value;
30 |
31 | public override T Match(Func choice1, Func choice2) => choice1(value);
32 | }
33 |
34 | public sealed class Choice2 : Choice
35 | {
36 | private readonly T2 value;
37 |
38 | public Choice2(T2 value) => this.value = value;
39 |
40 | public override T Match(Func choice1, Func choice2) => choice2(value);
41 | }
42 | }
43 |
44 | public static class Choice
45 | {
46 | public static Choice Create(T1 choice1, Option choice2) => choice1;
47 |
48 | public static Choice Create(Option choice1, T2 choice2) => choice2;
49 | }
50 | }
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Migration.md:
--------------------------------------------------------------------------------
1 | # Migration to .NET 5
2 | Create a new project in Visual Studio.
3 | In csproj, set:
4 | ```
5 |
6 | true
7 | `
8 | ```
9 | https://github.com/dotnet/core/issues/2082#issuecomment-442713181
10 | Build Release configuration.
11 | Copy all assemblies from `bin\Release\net5.0\refs` folder to embedded resources.
12 | Update `Watcher.referenceNames` array.
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/Microsoft.CSharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/Microsoft.CSharp.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/Microsoft.VisualBasic.Core.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/Microsoft.VisualBasic.Core.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/Microsoft.VisualBasic.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/Microsoft.VisualBasic.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/Microsoft.Win32.Primitives.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/Microsoft.Win32.Primitives.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/Microsoft.Win32.Registry.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/Microsoft.Win32.Registry.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/Refs.cs:
--------------------------------------------------------------------------------
1 | namespace SharpLayout.WatcherCore.Ref
2 | {
3 | public class Refs
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.AppContext.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.AppContext.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Buffers.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Buffers.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Collections.Concurrent.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Collections.Concurrent.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Collections.Immutable.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Collections.Immutable.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Collections.NonGeneric.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Collections.NonGeneric.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Collections.Specialized.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Collections.Specialized.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Collections.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Collections.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.ComponentModel.Annotations.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.ComponentModel.Annotations.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.ComponentModel.DataAnnotations.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.ComponentModel.DataAnnotations.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.ComponentModel.EventBasedAsync.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.ComponentModel.EventBasedAsync.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.ComponentModel.Primitives.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.ComponentModel.Primitives.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.ComponentModel.TypeConverter.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.ComponentModel.TypeConverter.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.ComponentModel.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.ComponentModel.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Configuration.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Configuration.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Console.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Console.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Core.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Core.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Data.Common.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Data.Common.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Data.DataSetExtensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Data.DataSetExtensions.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Data.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Data.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Diagnostics.Contracts.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Diagnostics.Contracts.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Diagnostics.Debug.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Diagnostics.Debug.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Diagnostics.DiagnosticSource.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Diagnostics.DiagnosticSource.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Diagnostics.FileVersionInfo.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Diagnostics.FileVersionInfo.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Diagnostics.Process.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Diagnostics.Process.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Diagnostics.StackTrace.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Diagnostics.StackTrace.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Diagnostics.TextWriterTraceListener.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Diagnostics.TextWriterTraceListener.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Diagnostics.Tools.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Diagnostics.Tools.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Diagnostics.TraceSource.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Diagnostics.TraceSource.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Diagnostics.Tracing.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Diagnostics.Tracing.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Drawing.Primitives.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Drawing.Primitives.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Drawing.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Drawing.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Dynamic.Runtime.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Dynamic.Runtime.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Formats.Asn1.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Formats.Asn1.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Globalization.Calendars.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Globalization.Calendars.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Globalization.Extensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Globalization.Extensions.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Globalization.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Globalization.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.IO.Compression.Brotli.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.IO.Compression.Brotli.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.IO.Compression.FileSystem.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.IO.Compression.FileSystem.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.IO.Compression.ZipFile.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.IO.Compression.ZipFile.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.IO.Compression.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.IO.Compression.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.IO.FileSystem.AccessControl.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.IO.FileSystem.AccessControl.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.IO.FileSystem.DriveInfo.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.IO.FileSystem.DriveInfo.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.IO.FileSystem.Primitives.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.IO.FileSystem.Primitives.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.IO.FileSystem.Watcher.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.IO.FileSystem.Watcher.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.IO.FileSystem.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.IO.FileSystem.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.IO.IsolatedStorage.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.IO.IsolatedStorage.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.IO.MemoryMappedFiles.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.IO.MemoryMappedFiles.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.IO.Pipes.AccessControl.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.IO.Pipes.AccessControl.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.IO.Pipes.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.IO.Pipes.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.IO.UnmanagedMemoryStream.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.IO.UnmanagedMemoryStream.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.IO.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.IO.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Linq.Expressions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Linq.Expressions.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Linq.Parallel.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Linq.Parallel.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Linq.Queryable.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Linq.Queryable.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Linq.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Linq.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Memory.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Memory.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Net.Http.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Net.Http.Json.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Net.Http.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Net.Http.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Net.HttpListener.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Net.HttpListener.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Net.Mail.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Net.Mail.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Net.NameResolution.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Net.NameResolution.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Net.NetworkInformation.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Net.NetworkInformation.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Net.Ping.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Net.Ping.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Net.Primitives.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Net.Primitives.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Net.Requests.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Net.Requests.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Net.Security.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Net.Security.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Net.ServicePoint.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Net.ServicePoint.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Net.Sockets.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Net.Sockets.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Net.WebClient.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Net.WebClient.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Net.WebHeaderCollection.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Net.WebHeaderCollection.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Net.WebProxy.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Net.WebProxy.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Net.WebSockets.Client.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Net.WebSockets.Client.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Net.WebSockets.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Net.WebSockets.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Net.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Numerics.Vectors.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Numerics.Vectors.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Numerics.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Numerics.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.ObjectModel.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.ObjectModel.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Reflection.DispatchProxy.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Reflection.DispatchProxy.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Reflection.Emit.ILGeneration.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Reflection.Emit.ILGeneration.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Reflection.Emit.Lightweight.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Reflection.Emit.Lightweight.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Reflection.Emit.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Reflection.Emit.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Reflection.Extensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Reflection.Extensions.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Reflection.Metadata.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Reflection.Metadata.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Reflection.Primitives.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Reflection.Primitives.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Reflection.TypeExtensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Reflection.TypeExtensions.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Reflection.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Reflection.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Resources.Reader.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Resources.Reader.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Resources.ResourceManager.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Resources.ResourceManager.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Resources.Writer.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Resources.Writer.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Runtime.CompilerServices.Unsafe.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Runtime.CompilerServices.Unsafe.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Runtime.CompilerServices.VisualC.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Runtime.CompilerServices.VisualC.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Runtime.Extensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Runtime.Extensions.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Runtime.Handles.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Runtime.Handles.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Runtime.InteropServices.RuntimeInformation.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Runtime.InteropServices.RuntimeInformation.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Runtime.InteropServices.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Runtime.InteropServices.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Runtime.Intrinsics.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Runtime.Intrinsics.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Runtime.Loader.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Runtime.Loader.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Runtime.Numerics.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Runtime.Numerics.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Runtime.Serialization.Formatters.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Runtime.Serialization.Formatters.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Runtime.Serialization.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Runtime.Serialization.Json.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Runtime.Serialization.Primitives.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Runtime.Serialization.Primitives.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Runtime.Serialization.Xml.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Runtime.Serialization.Xml.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Runtime.Serialization.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Runtime.Serialization.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Runtime.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Runtime.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Security.AccessControl.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Security.AccessControl.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Security.Claims.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Security.Claims.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Security.Cryptography.Algorithms.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Security.Cryptography.Algorithms.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Security.Cryptography.Cng.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Security.Cryptography.Cng.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Security.Cryptography.Csp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Security.Cryptography.Csp.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Security.Cryptography.Encoding.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Security.Cryptography.Encoding.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Security.Cryptography.OpenSsl.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Security.Cryptography.OpenSsl.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Security.Cryptography.Primitives.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Security.Cryptography.Primitives.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Security.Cryptography.X509Certificates.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Security.Cryptography.X509Certificates.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Security.Principal.Windows.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Security.Principal.Windows.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Security.Principal.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Security.Principal.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Security.SecureString.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Security.SecureString.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Security.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Security.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.ServiceModel.Web.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.ServiceModel.Web.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.ServiceProcess.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.ServiceProcess.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Text.Encoding.CodePages.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Text.Encoding.CodePages.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Text.Encoding.Extensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Text.Encoding.Extensions.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Text.Encoding.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Text.Encoding.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Text.Encodings.Web.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Text.Encodings.Web.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Text.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Text.Json.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Text.RegularExpressions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Text.RegularExpressions.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Threading.Channels.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Threading.Channels.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Threading.Overlapped.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Threading.Overlapped.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Threading.Tasks.Dataflow.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Threading.Tasks.Dataflow.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Threading.Tasks.Extensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Threading.Tasks.Extensions.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Threading.Tasks.Parallel.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Threading.Tasks.Parallel.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Threading.Tasks.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Threading.Tasks.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Threading.Thread.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Threading.Thread.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Threading.ThreadPool.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Threading.ThreadPool.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Threading.Timer.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Threading.Timer.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Threading.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Threading.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Transactions.Local.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Transactions.Local.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Transactions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Transactions.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.ValueTuple.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.ValueTuple.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Web.HttpUtility.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Web.HttpUtility.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Web.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Web.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Windows.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Windows.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Xml.Linq.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Xml.Linq.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Xml.ReaderWriter.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Xml.ReaderWriter.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Xml.Serialization.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Xml.Serialization.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Xml.XDocument.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Xml.XDocument.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Xml.XPath.XDocument.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Xml.XPath.XDocument.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Xml.XPath.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Xml.XPath.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Xml.XmlDocument.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Xml.XmlDocument.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Xml.XmlSerializer.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Xml.XmlSerializer.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.Xml.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.Xml.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/System.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/System.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/WindowsBase.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/WindowsBase.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/mscorlib.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/mscorlib.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/Ref/netstandard.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout.WatcherCore/Ref/netstandard.dll
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/SharpLayout.WatcherCore.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 |
6 | false
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/SharpLayout.WatcherCore/WatcherSettings.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace SharpLayout.WatcherCore
4 | {
5 | public class WatcherSettings
6 | {
7 | public string SourceCodeFile { get; }
8 | public string[] SourceCodeFiles1 { get; }
9 | public string[] SourceCodeFiles2 { get; }
10 | public int PageNumber { get; }
11 | public double Resolution { get; }
12 | public Func DocumentFunc { get; }
13 | public bool StartExternalProcess { get; set; }
14 | public string DataSourceDirectory { get; set; }
15 |
16 | ///
17 | ///
18 | ///
19 | ///
20 | /// Source code files of level 2.
21 | /// Source code files of level 1.
22 | ///
23 | ///
24 | ///
25 | public WatcherSettings(string sourceCodeFile, string[] sourceCodeFiles2, string[] sourceCodeFiles1, int pageNumber,
26 | double resolution, Func documentFunc)
27 | {
28 | SourceCodeFile = sourceCodeFile;
29 | SourceCodeFiles1 = sourceCodeFiles1;
30 | SourceCodeFiles2 = sourceCodeFiles2;
31 | PageNumber = pageNumber;
32 | Resolution = resolution;
33 | DocumentFunc = documentFunc;
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/SharpLayout.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.29424.173
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharpLayout", "SharpLayout\SharpLayout.csproj", "{05E890DE-939F-4E72-A971-2EA897E9B503}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiveViewer", "LiveViewer\LiveViewer.csproj", "{1D441DD3-FF8A-4F28-B2BB-CFD67E9ECC0F}"
9 | EndProject
10 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Watcher", "Watcher\Watcher.csproj", "{F3EB86D4-7BE4-4633-AF1B-538F90D87CC2}"
11 | EndProject
12 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Examples", "Examples\Examples.csproj", "{67CAFB07-66B1-4D07-8D23-175E8A1BF64D}"
13 | EndProject
14 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Starter", "Starter\Starter.csproj", "{8DB99140-992F-4A93-999B-6A1E6E604CC8}"
15 | EndProject
16 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj", "{6D772C22-1D54-4CC7-B704-18D9CFB6B3FA}"
17 | EndProject
18 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpLayout.WatcherCore", "SharpLayout.WatcherCore\SharpLayout.WatcherCore.csproj", "{964AF511-8B56-4E3C-8976-A20D316A3B27}"
19 | EndProject
20 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Resources", "Resources\Resources.csproj", "{ECA6139B-CBE7-4C7D-95D5-B1A78FBFC8CC}"
21 | EndProject
22 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpLayout.ImageRendering", "SharpLayout.ImageRendering\SharpLayout.ImageRendering.csproj", "{1141D2FF-5390-467F-8346-B479A02AFEDF}"
23 | EndProject
24 | Global
25 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
26 | Debug|Any CPU = Debug|Any CPU
27 | Release|Any CPU = Release|Any CPU
28 | EndGlobalSection
29 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
30 | {05E890DE-939F-4E72-A971-2EA897E9B503}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
31 | {05E890DE-939F-4E72-A971-2EA897E9B503}.Debug|Any CPU.Build.0 = Debug|Any CPU
32 | {05E890DE-939F-4E72-A971-2EA897E9B503}.Release|Any CPU.ActiveCfg = Release|Any CPU
33 | {05E890DE-939F-4E72-A971-2EA897E9B503}.Release|Any CPU.Build.0 = Release|Any CPU
34 | {1D441DD3-FF8A-4F28-B2BB-CFD67E9ECC0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35 | {1D441DD3-FF8A-4F28-B2BB-CFD67E9ECC0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
36 | {1D441DD3-FF8A-4F28-B2BB-CFD67E9ECC0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
37 | {1D441DD3-FF8A-4F28-B2BB-CFD67E9ECC0F}.Release|Any CPU.Build.0 = Release|Any CPU
38 | {F3EB86D4-7BE4-4633-AF1B-538F90D87CC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39 | {F3EB86D4-7BE4-4633-AF1B-538F90D87CC2}.Debug|Any CPU.Build.0 = Debug|Any CPU
40 | {F3EB86D4-7BE4-4633-AF1B-538F90D87CC2}.Release|Any CPU.ActiveCfg = Release|Any CPU
41 | {F3EB86D4-7BE4-4633-AF1B-538F90D87CC2}.Release|Any CPU.Build.0 = Release|Any CPU
42 | {67CAFB07-66B1-4D07-8D23-175E8A1BF64D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
43 | {67CAFB07-66B1-4D07-8D23-175E8A1BF64D}.Debug|Any CPU.Build.0 = Debug|Any CPU
44 | {67CAFB07-66B1-4D07-8D23-175E8A1BF64D}.Release|Any CPU.ActiveCfg = Release|Any CPU
45 | {67CAFB07-66B1-4D07-8D23-175E8A1BF64D}.Release|Any CPU.Build.0 = Release|Any CPU
46 | {8DB99140-992F-4A93-999B-6A1E6E604CC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
47 | {8DB99140-992F-4A93-999B-6A1E6E604CC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
48 | {8DB99140-992F-4A93-999B-6A1E6E604CC8}.Release|Any CPU.ActiveCfg = Release|Any CPU
49 | {8DB99140-992F-4A93-999B-6A1E6E604CC8}.Release|Any CPU.Build.0 = Release|Any CPU
50 | {6D772C22-1D54-4CC7-B704-18D9CFB6B3FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
51 | {6D772C22-1D54-4CC7-B704-18D9CFB6B3FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
52 | {6D772C22-1D54-4CC7-B704-18D9CFB6B3FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
53 | {6D772C22-1D54-4CC7-B704-18D9CFB6B3FA}.Release|Any CPU.Build.0 = Release|Any CPU
54 | {964AF511-8B56-4E3C-8976-A20D316A3B27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
55 | {964AF511-8B56-4E3C-8976-A20D316A3B27}.Debug|Any CPU.Build.0 = Debug|Any CPU
56 | {964AF511-8B56-4E3C-8976-A20D316A3B27}.Release|Any CPU.ActiveCfg = Release|Any CPU
57 | {964AF511-8B56-4E3C-8976-A20D316A3B27}.Release|Any CPU.Build.0 = Release|Any CPU
58 | {ECA6139B-CBE7-4C7D-95D5-B1A78FBFC8CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
59 | {ECA6139B-CBE7-4C7D-95D5-B1A78FBFC8CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
60 | {ECA6139B-CBE7-4C7D-95D5-B1A78FBFC8CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
61 | {ECA6139B-CBE7-4C7D-95D5-B1A78FBFC8CC}.Release|Any CPU.Build.0 = Release|Any CPU
62 | {1141D2FF-5390-467F-8346-B479A02AFEDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
63 | {1141D2FF-5390-467F-8346-B479A02AFEDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
64 | {1141D2FF-5390-467F-8346-B479A02AFEDF}.Release|Any CPU.ActiveCfg = Release|Any CPU
65 | {1141D2FF-5390-467F-8346-B479A02AFEDF}.Release|Any CPU.Build.0 = Release|Any CPU
66 | EndGlobalSection
67 | GlobalSection(SolutionProperties) = preSolution
68 | HideSolutionNode = FALSE
69 | EndGlobalSection
70 | GlobalSection(ExtensibilityGlobals) = postSolution
71 | SolutionGuid = {565C6836-BF67-43A4-9F1C-606CC1E38ACB}
72 | EndGlobalSection
73 | EndGlobal
74 |
--------------------------------------------------------------------------------
/SharpLayout/Cell.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using PdfSharp.Drawing;
5 | using static SharpLayout.Direction;
6 |
7 | namespace SharpLayout
8 | {
9 | public class Cell
10 | {
11 | public Table Table { get; }
12 |
13 | public int RowIndex { get; }
14 |
15 | public int ColumnIndex { get; }
16 |
17 | public double ColumnWidth => Table.Columns[ColumnIndex].Width;
18 |
19 | private int? rowspan;
20 | public int? Rowspan() => rowspan;
21 | public Cell Rowspan(int? value)
22 | {
23 | rowspan = value;
24 | return this;
25 | }
26 |
27 | private int? colspan;
28 | public int? Colspan() => colspan;
29 | public Cell Colspan(int? value)
30 | {
31 | colspan = value;
32 | return this;
33 | }
34 |
35 | private Option leftBorder;
36 | public Option LeftBorder() => leftBorder;
37 | public Cell LeftBorder(Option value)
38 | {
39 | leftBorder = value;
40 | return this;
41 | }
42 |
43 | private Option rightBorder;
44 | public Option RightBorder() => rightBorder;
45 | public Cell RightBorder(Option value)
46 | {
47 | rightBorder = value;
48 | return this;
49 | }
50 |
51 | private Option topBorder;
52 | public Option TopBorder() => topBorder;
53 | public Cell TopBorder(Option value)
54 | {
55 | topBorder = value;
56 | return this;
57 | }
58 |
59 | private Option bottomBorder;
60 | public Option BottomBorder() => bottomBorder;
61 | public Cell BottomBorder(Option value)
62 | {
63 | bottomBorder = value;
64 | return this;
65 | }
66 |
67 | public Cell Border(Direction direction, XPen value)
68 | {
69 | if (direction.HasFlag(Left)) LeftBorder(value);
70 | if (direction.HasFlag(Right)) RightBorder(value);
71 | if (direction.HasFlag(Top)) TopBorder(value);
72 | if (direction.HasFlag(Bottom)) BottomBorder(value);
73 | return this;
74 | }
75 |
76 | public Cell Border(Direction direction, double value) => Border(direction, new XPen(XColors.Black, value));
77 |
78 | private XColor? backgroundColor;
79 | public XColor? BackgroundColor() => backgroundColor;
80 | public Cell BackgroundColor(XColor? value)
81 | {
82 | backgroundColor = value;
83 | return this;
84 | }
85 |
86 | public readonly List Elements = new List();
87 |
88 | public IEnumerable Paragraphs => Elements
89 | .Where(_ => _.Match(p => true, t => false, image => false))
90 | .Select(_ => _.Match(p => p, t => throw new Exception(), image => throw new Exception()));
91 |
92 | public Cell Add(IElement value)
93 | {
94 | Elements.Add(value);
95 | return this;
96 | }
97 |
98 | private VerticalAlign? verticalAlign;
99 | public VerticalAlign? VerticalAlign() => verticalAlign;
100 | public Cell VerticalAlign(VerticalAlign? value)
101 | {
102 | verticalAlign = value;
103 | return this;
104 | }
105 |
106 | private List callerInfos;
107 | public List CallerInfos
108 | {
109 | get
110 | {
111 | if (Document.CollectCallerInfo && callerInfos == null)
112 | callerInfos = new List();
113 | return callerInfos;
114 | }
115 | }
116 |
117 | internal Cell(Table table, int rowIndex, int columnIndex)
118 | {
119 | Table = table;
120 | ColumnIndex = columnIndex;
121 | RowIndex = rowIndex;
122 | }
123 | }
124 | }
--------------------------------------------------------------------------------
/SharpLayout/CellInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace SharpLayout
4 | {
5 | public struct CellInfo: IEquatable
6 | {
7 | public int RowIndex { get; }
8 |
9 | public int ColumnIndex { get; }
10 |
11 | public CellInfo(int rowIndex, int columnIndex)
12 | {
13 | RowIndex = rowIndex;
14 | ColumnIndex = columnIndex;
15 | }
16 |
17 | public CellInfo(Row row, Column column) : this(row.Index, column.Index)
18 | {
19 | }
20 |
21 | public CellInfo(Cell cell) : this(cell.RowIndex, cell.ColumnIndex)
22 | {
23 | }
24 |
25 | public static implicit operator CellInfo(Cell cell) => new CellInfo(cell);
26 |
27 | public bool Equals(CellInfo other)
28 | {
29 | return RowIndex == other.RowIndex && ColumnIndex == other.ColumnIndex;
30 | }
31 |
32 | public override bool Equals(object obj)
33 | {
34 | if (ReferenceEquals(null, obj)) return false;
35 | return obj is CellInfo info && Equals(info);
36 | }
37 |
38 | public override int GetHashCode()
39 | {
40 | unchecked
41 | {
42 | return (RowIndex * 397) ^ ColumnIndex;
43 | }
44 | }
45 | }
46 | }
--------------------------------------------------------------------------------
/SharpLayout/Column.cs:
--------------------------------------------------------------------------------
1 | namespace SharpLayout
2 | {
3 | public class Column
4 | {
5 | public double Width { get; set; }
6 |
7 | public int Index { get; }
8 |
9 | internal Column(int index)
10 | {
11 | Index = index;
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/SharpLayout/DefaultFontFamilies.cs:
--------------------------------------------------------------------------------
1 | namespace SharpLayout
2 | {
3 | public static class DefaultFontFamilies
4 | {
5 | public static readonly FontFamilyInfo Roboto = new FontSlot().FamilyInfo("Roboto");
6 |
7 | static DefaultFontFamilies() => FontResolver.Init();
8 | }
9 | }
--------------------------------------------------------------------------------
/SharpLayout/Direction.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace SharpLayout
4 | {
5 | [Flags]
6 | public enum Direction
7 | {
8 | Top = 0x1,
9 | Bottom = 0x2,
10 | Left = 0x4,
11 | Right = 0x8,
12 | All = Top | Bottom | Left | Right
13 | }
14 | }
--------------------------------------------------------------------------------
/SharpLayout/Document.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using PdfSharp;
5 | using PdfSharp.Drawing;
6 | using PdfSharp.Pdf;
7 |
8 | namespace SharpLayout
9 | {
10 | public class Document
11 | {
12 | public static bool CollectCallerInfo;
13 |
14 | public List> SectionGroups { get; } = new List>();
15 |
16 | public Section Add(Section section)
17 | {
18 | return Add(new SectionGroup()).Add(section);
19 | }
20 |
21 | public SectionGroup Add(SectionGroup sectionGroup)
22 | {
23 | Add(() => sectionGroup);
24 | return sectionGroup;
25 | }
26 |
27 | public void Add(Func sectionGroup)
28 | {
29 | SectionGroups.Add(sectionGroup);
30 | }
31 |
32 | public bool CellsAreHighlighted { get; set; }
33 |
34 | public bool R1C1AreVisible { get; set; }
35 |
36 | public bool ParagraphsAreHighlighted { get; set; }
37 |
38 | public bool CellLineNumbersAreVisible { get; set; }
39 |
40 | public bool ExpressionVisible { get; set; }
41 |
42 | public byte[] CreatePdf()
43 | {
44 | using (var pdfDocument = new PdfDocument())
45 | {
46 | Render(pdfDocument);
47 | if (pdfDocument.PageCount == 0)
48 | {
49 | var page = pdfDocument.AddPage();
50 | page.Size = PageSize.A4;
51 | page.Orientation = PageOrientation.Portrait;
52 | }
53 | using (var stream = new MemoryStream())
54 | {
55 | pdfDocument.Save(stream);
56 | return stream.ToArray();
57 | }
58 | }
59 | }
60 |
61 | public void Render(PdfDocument pdfDocument)
62 | {
63 | pdfDocument.ViewerPreferences.Elements.SetName("/PrintScaling", "/None");
64 | pdfDocument.Info.Creator = "SharpLayout";
65 | foreach (var sectionGroupFunc in SectionGroups)
66 | {
67 | var sectionGroup = sectionGroupFunc();
68 | if (sectionGroup.Sections.Count == 0) continue;
69 | var page = pdfDocument.AddPage();
70 | page.Size = PageSize.A4;
71 | page.Orientation = sectionGroup.Sections[0].PageSettings.Orientation;
72 | using (var xGraphics = XGraphics.FromPdfPage(page))
73 | {
74 | TableRenderer.Draw(new Graphics(xGraphics), (pageIndex, action, section) => {
75 | var addPage = pdfDocument.AddPage();
76 | addPage.Size = PageSize.A4;
77 | addPage.Orientation = section.PageSettings.Orientation;
78 | using (var xGraphics2 = XGraphics.FromPdfPage(addPage))
79 | action(new Graphics(xGraphics2));
80 | }, this, GraphicsType.Pdf, sectionGroup, AllPageFilter.Instance);
81 | }
82 | }
83 | }
84 |
85 | public string SavePdf(string path)
86 | {
87 | File.WriteAllBytes(path, CreatePdf());
88 | return path;
89 | }
90 | }
91 | }
--------------------------------------------------------------------------------
/SharpLayout/Dpi254.cs:
--------------------------------------------------------------------------------
1 | using PdfSharp.Drawing;
2 |
3 | namespace SharpLayout
4 | {
5 | public static class Dpi254
6 | {
7 | public static double Px(double value) => XUnit.FromCentimeter(value / 100d);
8 | }
9 | }
--------------------------------------------------------------------------------
/SharpLayout/Drawer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using PdfSharp.Drawing;
5 |
6 | namespace SharpLayout
7 | {
8 | public class Drawer
9 | {
10 | private readonly IGraphics graphics;
11 | private readonly List- items = new List
- ();
12 |
13 | public Drawer(IGraphics graphics)
14 | {
15 | this.graphics = graphics;
16 | }
17 |
18 | public void DrawString(string s, Font font, XBrush brush, double x, double y)
19 | {
20 | Add(DrawType.Foreground, () => graphics.DrawString(s, font, brush, x, y));
21 | }
22 |
23 | public void DrawLine(XPen pen, double x1, double y1, double x2, double y2)
24 | {
25 | Add(DrawType.Foreground, () => graphics.DrawLine(pen, x1, y1, x2, y2));
26 | }
27 |
28 | public void DrawLines(XPen pen, XPoint[] points)
29 | {
30 | Add(DrawType.Foreground, () => graphics.DrawLines(pen, points));
31 | }
32 |
33 | public void DrawImage(Image image, double x, double y)
34 | {
35 | Add(DrawType.Background, () => {
36 | var content = image.Content();
37 | if (content.HasValue)
38 | if (!image.Height().HasValue && !image.Width().HasValue)
39 | graphics.DrawImage(content.Value, x, y);
40 | else
41 | graphics.DrawImage(content.Value, x, y,
42 | width => image.Width().GetValueOrDefault(width),
43 | height => image.Height().GetValueOrDefault(height));
44 | });
45 | }
46 |
47 | public void DrawRectangle(XBrush brush, double x, double y, double width, double height,
48 | DrawType drawType = DrawType.Foreground)
49 | {
50 | Add(drawType, () => graphics.DrawRectangle(brush, x, y, width, height));
51 | }
52 |
53 | public void Flush()
54 | {
55 | Flush(DrawType.Background);
56 | Flush(DrawType.Foreground);
57 | }
58 |
59 | private void Flush(DrawType drawType)
60 | {
61 | foreach (var item in items.Where(_ => _.DrawType == drawType))
62 | item.Action();
63 | }
64 |
65 | private void Add(DrawType drawType, Action action) => items.Add(new Item(drawType, action));
66 |
67 | private class Item
68 | {
69 | public readonly DrawType DrawType;
70 | public readonly Action Action;
71 |
72 | public Item(DrawType drawType, Action action)
73 | {
74 | DrawType = drawType;
75 | Action = action;
76 | }
77 | }
78 | }
79 |
80 | public enum DrawType
81 | {
82 | Background,
83 | Foreground
84 | }
85 | }
--------------------------------------------------------------------------------
/SharpLayout/Font.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Concurrent;
2 | using PdfSharp.Drawing;
3 |
4 | namespace SharpLayout
5 | {
6 | public class Font
7 | {
8 | private static readonly ConcurrentDictionary cache = new();
9 |
10 | private static XFont GetXFont(FontFamilyInfo familyInfo, double emSize, XFontStyle style, XPdfFontOptions pdfOptions, out FontKey key)
11 | {
12 | key = new FontKey(familyInfo.Name, emSize, style, pdfOptions.FontEncoding);
13 | if (cache.TryGetValue(key, out var value))
14 | return value;
15 | var xFont = new XFont(familyInfo.Name, emSize, style, pdfOptions);
16 | cache.TryAdd(key, xFont);
17 | return xFont;
18 | }
19 |
20 | public FontKey Key { get; }
21 |
22 | public Font(FontFamilyInfo familyInfo, double emSize, XFontStyle style, XPdfFontOptions pdfOptions)
23 | {
24 | FamilyInfo = familyInfo;
25 | XFont = GetXFont(familyInfo, emSize, style, pdfOptions, out var key);
26 | Key = key;
27 | }
28 |
29 | public FontFamilyInfo FamilyInfo { get; }
30 |
31 | public XFont XFont { get; }
32 |
33 | public XFontFamily FontFamily => XFont.FontFamily;
34 |
35 | public double GetHeight() => XFont.GetHeight();
36 |
37 | public bool Underline => XFont.Underline;
38 |
39 | public double Size => XFont.Size;
40 |
41 | public XFontStyle Style => XFont.Style;
42 |
43 | public XPdfFontOptions PdfOptions => XFont.PdfOptions;
44 |
45 | public bool Bold => XFont.Bold;
46 |
47 | public string Name => XFont.Name;
48 | }
49 | }
--------------------------------------------------------------------------------
/SharpLayout/FontFamilyInfo.cs:
--------------------------------------------------------------------------------
1 | namespace SharpLayout
2 | {
3 | public class FontFamilyInfo
4 | {
5 | public FontSlot Slot { get; }
6 | public string OriginalName { get; }
7 | public string Name => Slot.Identifier.HasValue ? $"{OriginalName}_{Slot.Identifier}" : OriginalName;
8 |
9 | public FontFamilyInfo(FontSlot slot, string originalName)
10 | {
11 | Slot = slot;
12 | OriginalName = originalName;
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/SharpLayout/FontKey.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using PdfSharp.Drawing;
3 | using PdfSharp.Pdf;
4 |
5 | namespace SharpLayout
6 | {
7 | public struct FontKey : IEquatable
8 | {
9 | public string Name { get; }
10 | public double Size { get; }
11 | public XFontStyle Style { get; }
12 | public PdfFontEncoding FontEncoding { get; }
13 |
14 | public FontKey(string name, double size, XFontStyle style, PdfFontEncoding fontEncoding)
15 | {
16 | Name = name;
17 | Size = size;
18 | Style = style;
19 | FontEncoding = fontEncoding;
20 | }
21 |
22 | public bool Equals(FontKey other)
23 | {
24 | return string.Equals(Name, other.Name) && Size.Equals(other.Size) && Style == other.Style && FontEncoding == other.FontEncoding;
25 | }
26 |
27 | public override bool Equals(object obj)
28 | {
29 | if (ReferenceEquals(null, obj)) return false;
30 | return obj is FontKey other && Equals(other);
31 | }
32 |
33 | public override int GetHashCode()
34 | {
35 | unchecked
36 | {
37 | var hashCode = Name != null ? Name.GetHashCode() : 0;
38 | hashCode = hashCode * 397 ^ Size.GetHashCode();
39 | hashCode = hashCode * 397 ^ (int) Style;
40 | hashCode = hashCode * 397 ^ (int) FontEncoding;
41 | return hashCode;
42 | }
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/SharpLayout/FontResolutionKey.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace SharpLayout
4 | {
5 | internal readonly struct FontResolutionKey : IEquatable
6 | {
7 | private readonly string familyName;
8 | private readonly bool isBold;
9 | private readonly bool isItalic;
10 |
11 | public FontResolutionKey(string familyName, bool isBold, bool isItalic)
12 | {
13 | this.familyName = familyName;
14 | this.isBold = isBold;
15 | this.isItalic = isItalic;
16 | }
17 |
18 | public bool Equals(FontResolutionKey other)
19 | {
20 | return familyName == other.familyName && isBold == other.isBold && isItalic == other.isItalic;
21 | }
22 |
23 | public override bool Equals(object obj)
24 | {
25 | return obj is FontResolutionKey other && Equals(other);
26 | }
27 |
28 | public override int GetHashCode()
29 | {
30 | unchecked
31 | {
32 | var hashCode = familyName != null ? familyName.GetHashCode() : 0;
33 | hashCode = (hashCode * 397) ^ isBold.GetHashCode();
34 | hashCode = (hashCode * 397) ^ isItalic.GetHashCode();
35 | return hashCode;
36 | }
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/SharpLayout/FontResolver.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Concurrent;
3 | using System.IO;
4 | using System.IO.Compression;
5 | using System.Reflection;
6 | using PdfSharp.Fonts;
7 | using SharpLayout.Fonts;
8 | using SixLabors.Fonts;
9 |
10 | namespace SharpLayout
11 | {
12 | public class FontResolver : IFontResolver
13 | {
14 | static FontResolver() => GlobalFontSettings.FontResolver = new FontResolver();
15 |
16 | private FontResolver()
17 | {
18 | }
19 |
20 | private static readonly ConcurrentDictionary fontResolverInfos = new ();
21 | private static readonly ConcurrentDictionary> fontFaces = new ();
22 | private static readonly string defaultFontFace = Guid.NewGuid().ToString();
23 |
24 | public static void Install(FontSlot slot, IHandler streamHandler)
25 | {
26 | var fontDescription = streamHandler.Handle(FontDescription.LoadDescription);
27 |
28 | var faceName = Guid.NewGuid().ToString();
29 | fontFaces.TryAdd(faceName, streamHandler);
30 |
31 | var isBold = fontDescription.Style.HasFlag(FontStyle.Bold);
32 | var isItalic = fontDescription.Style.HasFlag(FontStyle.Italic);
33 | var familyName = slot.FamilyInfo(fontDescription.FontFamilyInvariantCulture).Name;
34 | fontResolverInfos.TryAdd(
35 | new FontResolutionKey(familyName, isBold, isItalic),
36 | new FontResolverInfo(faceName));
37 | }
38 |
39 | public static void Install(FontSlot slot, Type anchorType)
40 | {
41 | foreach (var resourceName in anchorType.Assembly.GetManifestResourceNames())
42 | if (resourceName.StartsWith(anchorType.Namespace))
43 | Install(slot, resourceName, anchorType.Assembly);
44 | }
45 |
46 | public static void Install(FontSlot slot, string resourceName, Assembly assembly)
47 | {
48 | Install(slot, new StreamHandler(resourceName, assembly));
49 | }
50 |
51 | private class StreamHandler: IHandler
52 | {
53 | private readonly string resourceName;
54 | private readonly Assembly assembly;
55 |
56 | public StreamHandler(string resourceName, Assembly assembly)
57 | {
58 | this.resourceName = resourceName;
59 | this.assembly = assembly;
60 | }
61 |
62 | public TResult Handle(Func func)
63 | {
64 | using (var resourceStream = assembly.GetManifestResourceStream(resourceName))
65 | {
66 | var extension = Path.GetExtension(resourceName);
67 | if (".gz".Equals(extension, StringComparison.InvariantCultureIgnoreCase))
68 | {
69 | using (var gZipStream = new GZipStream(resourceStream, CompressionMode.Decompress))
70 | using (var memoryStream = new MemoryStream())
71 | {
72 | gZipStream.CopyTo(memoryStream);
73 | memoryStream.Position = 0;
74 | return func(memoryStream);
75 | }
76 | }
77 | else
78 | {
79 | return func(resourceStream);
80 | }
81 | }
82 | }
83 | }
84 |
85 | public FontResolverInfo ResolveTypeface(string familyName, bool isBold, bool isItalic)
86 | {
87 | if (fontResolverInfos.TryGetValue(new FontResolutionKey(familyName, isBold, isItalic), out var fontResolverInfo))
88 | return fontResolverInfo;
89 |
90 | if (fontResolverInfos.TryGetValue(new FontResolutionKey(familyName, false, false), out var regularFontResolverInfo))
91 | return new FontResolverInfo(regularFontResolverInfo.FaceName, isBold, isItalic);
92 |
93 | return new FontResolverInfo(defaultFontFace, isBold, isItalic);
94 | }
95 |
96 | public byte[] GetFont(string faceName)
97 | {
98 | if (fontFaces.TryGetValue(faceName, out var streamHandler))
99 | return streamHandler.Handle(stream =>
100 | {
101 | var bytes = new byte[stream.Length];
102 | stream.Read(bytes, 0, bytes.Length);
103 | return bytes;
104 | });
105 |
106 | var anchorType = typeof(FontAnchor);
107 | var fileName = "Roboto-Regular.ttf.gz";
108 | using (var resourceStream = anchorType.Assembly.GetManifestResourceStream($"{anchorType.Namespace}.{fileName}"))
109 | using (var gZipStream = new GZipStream(resourceStream, CompressionMode.Decompress))
110 | using (var memoryStream = new MemoryStream())
111 | {
112 | gZipStream.CopyTo(memoryStream);
113 | return memoryStream.ToArray();
114 | }
115 | }
116 |
117 | internal static void Init()
118 | {
119 | }
120 | }
121 | }
--------------------------------------------------------------------------------
/SharpLayout/FontSlot.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace SharpLayout
4 | {
5 | public class FontSlot
6 | {
7 | public Guid? Identifier;
8 |
9 | public FontSlot(Guid? identifier) => Identifier = identifier;
10 |
11 | public FontSlot() : this(Guid.NewGuid())
12 | {
13 | }
14 |
15 | public FontFamilyInfo FamilyInfo(string familyName) => new(this, familyName);
16 | }
17 | }
--------------------------------------------------------------------------------
/SharpLayout/Fonts/FontAnchor.cs:
--------------------------------------------------------------------------------
1 | namespace SharpLayout.Fonts
2 | {
3 | internal class FontAnchor
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/SharpLayout/Fonts/Roboto-Regular.ttf.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVPolyakov/SharpLayout/a0464674899796fc2996529f878abe327ac52b6b/SharpLayout/Fonts/Roboto-Regular.ttf.gz
--------------------------------------------------------------------------------
/SharpLayout/Graphics.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using PdfSharp.Drawing;
4 |
5 | namespace SharpLayout
6 | {
7 | public interface IGraphics
8 | {
9 | void DrawImage(Func imageContent, double x, double y);
10 | void DrawImage(Func imageContent, double x, double y, Func width, Func height);
11 | void DrawString(string s, Font font, XBrush brush, double x, double y);
12 | void DrawLine(XPen pen, double x1, double y1, double x2, double y2);
13 | void DrawRectangle(XBrush brush, double x, double y, double width, double height);
14 | XSize MeasureString(string text, XFont font, XStringFormat stringFormat);
15 | void DrawLines(XPen pen, XPoint[] points);
16 | }
17 |
18 | public class Graphics: IGraphics
19 | {
20 | private readonly XGraphics xGraphics;
21 |
22 | public Graphics(XGraphics xGraphics)
23 | {
24 | this.xGraphics = xGraphics;
25 | }
26 |
27 | public void DrawImage(Func imageContent, double x, double y)
28 | {
29 | using (var stream = imageContent())
30 | using (var xImage = XImage.FromStream(stream))
31 | xGraphics.DrawImage(xImage, x, y);
32 | }
33 |
34 | public void DrawImage(Func imageContent, double x, double y,
35 | Func width, Func height)
36 | {
37 | using (var stream = imageContent())
38 | using (var xImage = XImage.FromStream(stream))
39 | xGraphics.DrawImage(xImage, x, y, width(xImage.PointWidth), height(xImage.PointHeight));
40 | }
41 |
42 | public void DrawString(string s, Font font, XBrush brush, double x, double y)
43 | {
44 | xGraphics.DrawString(s, font.XFont, brush, x, y);
45 | }
46 |
47 | public void DrawLine(XPen pen, double x1, double y1, double x2, double y2)
48 | {
49 | xGraphics.DrawLine(pen, x1, y1, x2, y2);
50 | }
51 |
52 | public void DrawLines(XPen pen, XPoint[] points)
53 | {
54 | xGraphics.DrawLines(pen, points);
55 | }
56 |
57 | public void DrawRectangle(XBrush brush, double x, double y, double width, double height)
58 | {
59 | xGraphics.DrawRectangle(brush, x, y, width, height);
60 | }
61 |
62 | public XSize MeasureString(string text, XFont font, XStringFormat stringFormat)
63 | {
64 | return xGraphics.MeasureString(text, font, stringFormat);
65 | }
66 | }
67 | }
--------------------------------------------------------------------------------
/SharpLayout/GraphicsType.cs:
--------------------------------------------------------------------------------
1 | namespace SharpLayout
2 | {
3 | public enum GraphicsType
4 | {
5 | Pdf,
6 | Image
7 | }
8 | }
--------------------------------------------------------------------------------
/SharpLayout/HorizontalAlign.cs:
--------------------------------------------------------------------------------
1 | namespace SharpLayout
2 | {
3 | public enum HorizontalAlign
4 | {
5 | Left,
6 | Center,
7 | Right,
8 | Justify
9 | }
10 | }
--------------------------------------------------------------------------------
/SharpLayout/IElement.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace SharpLayout
4 | {
5 | public interface IElement
6 | {
7 | T Match(Func paragraph, Func
table, Func image);
8 | }
9 | }
--------------------------------------------------------------------------------
/SharpLayout/IHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace SharpLayout
4 | {
5 | public interface IHandler
6 | {
7 | TResult Handle(Func func);
8 | }
9 | }
--------------------------------------------------------------------------------
/SharpLayout/IPageFilter.cs:
--------------------------------------------------------------------------------
1 | namespace SharpLayout
2 | {
3 | public interface IPageFilter
4 | {
5 | void OnNewPage();
6 | bool PageMustBeAdd { get; }
7 | }
8 |
9 | public class AllPageFilter: IPageFilter
10 | {
11 | public static readonly IPageFilter Instance = new AllPageFilter();
12 |
13 | private AllPageFilter()
14 | {
15 | }
16 |
17 | public void OnNewPage()
18 | {
19 | }
20 |
21 | public bool PageMustBeAdd => true;
22 | }
23 |
24 | public class OnePageFilter: IPageFilter
25 | {
26 | private readonly int pageNumber;
27 | private int pageIndex;
28 |
29 | public OnePageFilter(int pageNumber)
30 | {
31 | this.pageNumber = pageNumber;
32 | }
33 |
34 | public void OnNewPage() => pageIndex++;
35 |
36 | public bool PageMustBeAdd => pageIndex == pageNumber;
37 | }
38 | }
--------------------------------------------------------------------------------
/SharpLayout/Image.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using static SharpLayout.Direction;
4 |
5 | namespace SharpLayout
6 | {
7 | public class Image : IElement
8 | {
9 | public T Match(Func paragraph, Func table, Func image) => image(this);
10 |
11 | private double? topMargin;
12 | public double? TopMargin() => topMargin;
13 | public Image TopMargin(double? value)
14 | {
15 | topMargin = value;
16 | return this;
17 | }
18 |
19 | private double? height;
20 | public double? Height() => height;
21 | public Image Height(double? value)
22 | {
23 | height = value;
24 | return this;
25 | }
26 |
27 | private double? width;
28 | public double? Width() => width;
29 | public Image Width(double? value)
30 | {
31 | width = value;
32 | return this;
33 | }
34 |
35 | private double? leftMargin;
36 | public double? LeftMargin() => leftMargin;
37 | public Image LeftMargin(double? value)
38 | {
39 | leftMargin = value;
40 | return this;
41 | }
42 |
43 | private double? rightMargin;
44 | public double? RightMargin() => rightMargin;
45 | public Image RightMargin(double? value)
46 | {
47 | rightMargin = value;
48 | return this;
49 | }
50 |
51 | private double? bottomMargin;
52 | public double? BottomMargin() => bottomMargin;
53 | public Image BottomMargin(double? value)
54 | {
55 | bottomMargin = value;
56 | return this;
57 | }
58 |
59 | public Image Margin(Direction direction, double value)
60 | {
61 | if (direction.HasFlag(Left)) LeftMargin(value);
62 | if (direction.HasFlag(Right)) RightMargin(value);
63 | if (direction.HasFlag(Top)) TopMargin(value);
64 | if (direction.HasFlag(Bottom)) BottomMargin(value);
65 | return this;
66 | }
67 |
68 | private Option> content;
69 | public Option> Content() => content;
70 | public Image Content(Func value)
71 | {
72 | content = value.ToOption();
73 | return this;
74 | }
75 |
76 | private HorizontalAlign? alignment;
77 | public HorizontalAlign? Alignment() => alignment;
78 | public Image Alignment(HorizontalAlign? value)
79 | {
80 | alignment = value;
81 | return this;
82 | }
83 | }
84 | }
--------------------------------------------------------------------------------
/SharpLayout/ImageRenderer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using PdfSharp.Drawing;
3 |
4 | namespace SharpLayout
5 | {
6 | internal static class ImageRenderer
7 | {
8 | public static void Draw(Image image, XUnit x0, XUnit y0, Drawer drawer, HorizontalAlign alignment, double width)
9 | {
10 | var y = y0 + image.TopMargin().ToOption().ValueOr(0);
11 | var x = x0 + image.LeftMargin().ToOption().ValueOr(0);
12 | var innerWidth = image.GetInnerWidth(width);
13 | double dx;
14 | switch (alignment)
15 | {
16 | case HorizontalAlign.Left:
17 | case HorizontalAlign.Justify:
18 | dx = 0;
19 | break;
20 | case HorizontalAlign.Center:
21 | dx = (innerWidth - image.ContentWidth()) / 2;
22 | break;
23 | case HorizontalAlign.Right:
24 | dx = innerWidth - image.ContentWidth();
25 | break;
26 | default:
27 | throw new ArgumentOutOfRangeException(nameof(alignment), alignment, null);
28 | }
29 | drawer.DrawImage(image, x + dx, y);
30 | }
31 |
32 | private static double ContentWidth(this Image image)
33 | {
34 | if (image.Width().HasValue)
35 | return image.Width().Value;
36 | else
37 | {
38 | var content = image.Content();
39 | if (content.HasValue)
40 | {
41 | using (var stream = content.Value())
42 | using (var xImage = XImage.FromStream(stream))
43 | return xImage.PointWidth;
44 | }
45 | else
46 | return 0;
47 | }
48 | }
49 |
50 | public static double GetInnerWidth(this Image image, double width)
51 | => width - image.LeftMargin().ToOption().ValueOr(0) - image.RightMargin().ToOption().ValueOr(0);
52 | }
53 | }
--------------------------------------------------------------------------------
/SharpLayout/InlineVerticalAlign.cs:
--------------------------------------------------------------------------------
1 | namespace SharpLayout
2 | {
3 | public enum InlineVerticalAlign
4 | {
5 | Baseline,
6 | Sub,
7 | Super
8 | }
9 | }
--------------------------------------------------------------------------------
/SharpLayout/Lazy.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace SharpLayout
5 | {
6 | public class Lazy
7 | {
8 | private readonly Dictionary dictionary;
9 | private readonly Func func;
10 |
11 | public Lazy(Dictionary dictionary, Func func)
12 | {
13 | this.dictionary = dictionary;
14 | this.func = func;
15 | }
16 |
17 | public TValue GetValue(TKey key)
18 | {
19 | {
20 | if (dictionary.TryGetValue(key, out var value)) return value;
21 | }
22 | {
23 | var value = func(key);
24 | dictionary.Add(key, value);
25 | return value;
26 | }
27 | }
28 | }
29 |
30 | public static class Lazy
31 | {
32 | public static Lazy Create(Dictionary dictionary, Func func)
33 | => new Lazy(dictionary, func);
34 |
35 | public static Lazy Create(Func func) => new Lazy(func);
36 | }
37 | }
--------------------------------------------------------------------------------
/SharpLayout/LineKey.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace SharpLayout
4 | {
5 | public struct LineKey : IEquatable
6 | {
7 | public int RowIndex { get; }
8 | public int ColumnIndex { get; }
9 | public int ElementIndex { get; }
10 | public int SoftLineIndex { get; }
11 |
12 | public LineKey(int rowIndex, int columnIndex, int elementIndex, int softLineIndex)
13 | {
14 | RowIndex = rowIndex;
15 | ColumnIndex = columnIndex;
16 | ElementIndex = elementIndex;
17 | SoftLineIndex = softLineIndex;
18 | }
19 |
20 | public bool Equals(LineKey other)
21 | {
22 | return RowIndex == other.RowIndex &&
23 | ColumnIndex == other.ColumnIndex &&
24 | ElementIndex == other.ElementIndex &&
25 | SoftLineIndex == other.SoftLineIndex;
26 | }
27 |
28 | public override bool Equals(object obj)
29 | {
30 | if (ReferenceEquals(null, obj)) return false;
31 | return obj is LineKey other && Equals(other);
32 | }
33 |
34 | public override int GetHashCode()
35 | {
36 | unchecked
37 | {
38 | var hashCode = RowIndex;
39 | hashCode = (hashCode * 397) ^ ColumnIndex;
40 | hashCode = (hashCode * 397) ^ ElementIndex;
41 | hashCode = (hashCode * 397) ^ SoftLineIndex;
42 | return hashCode;
43 | }
44 | }
45 | }
46 | }
--------------------------------------------------------------------------------
/SharpLayout/Option.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics.Contracts;
4 | using System.Linq;
5 |
6 | namespace SharpLayout
7 | {
8 | ///
9 | /// https://en.wikipedia.org/wiki/Option_type
10 | /// Java https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html
11 | /// F# https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/options-%5Bfsharp%5D
12 | /// C# Roslyn https://github.com/dotnet/roslyn/blob/56f605c41915317ccdb925f66974ee52282609e7/src/Compilers/Core/Portable/Optional.cs
13 | ///
14 | public struct Option : IEquatable