From 1a768cf8892207afe75aedea9dad9d43aa69707a Mon Sep 17 00:00:00 2001 From: Dale Fugier Date: Mon, 16 Sep 2024 14:30:39 -0700 Subject: [PATCH] Removed obsolete samples. --- .../Properties/Resources.Designer.cs | 73 ------ .../Properties/Resources.resx | 124 ----------- .../cs/SampleCsCommands/Resources/Logo.png | Bin 13918 -> 0 bytes .../cs/SampleCsCommands/SampleCsClipboard.cs | 208 ------------------ .../SampleCsDrawViewportLogo.cs | 57 ----- .../SampleCsRestoreLayerState.cs | 36 --- .../SampleCsSerializeClass.cs | 198 ----------------- .../cs/SampleCsCommands/SampleCsWritePdf.cs | 83 ------- 8 files changed, 779 deletions(-) delete mode 100644 rhinocommon/cs/SampleCsCommands/Properties/Resources.Designer.cs delete mode 100644 rhinocommon/cs/SampleCsCommands/Properties/Resources.resx delete mode 100644 rhinocommon/cs/SampleCsCommands/Resources/Logo.png delete mode 100644 rhinocommon/cs/SampleCsCommands/SampleCsClipboard.cs delete mode 100644 rhinocommon/cs/SampleCsCommands/SampleCsDrawViewportLogo.cs delete mode 100644 rhinocommon/cs/SampleCsCommands/SampleCsRestoreLayerState.cs delete mode 100644 rhinocommon/cs/SampleCsCommands/SampleCsSerializeClass.cs delete mode 100644 rhinocommon/cs/SampleCsCommands/SampleCsWritePdf.cs diff --git a/rhinocommon/cs/SampleCsCommands/Properties/Resources.Designer.cs b/rhinocommon/cs/SampleCsCommands/Properties/Resources.Designer.cs deleted file mode 100644 index 3974bdb9..00000000 --- a/rhinocommon/cs/SampleCsCommands/Properties/Resources.Designer.cs +++ /dev/null @@ -1,73 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace SampleCsCommands.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SampleCsCommands.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Logo { - get { - object obj = ResourceManager.GetObject("Logo", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - } -} diff --git a/rhinocommon/cs/SampleCsCommands/Properties/Resources.resx b/rhinocommon/cs/SampleCsCommands/Properties/Resources.resx deleted file mode 100644 index 61e26f0d..00000000 --- a/rhinocommon/cs/SampleCsCommands/Properties/Resources.resx +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - ..\Resources\Logo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - \ No newline at end of file diff --git a/rhinocommon/cs/SampleCsCommands/Resources/Logo.png b/rhinocommon/cs/SampleCsCommands/Resources/Logo.png deleted file mode 100644 index 70c77b57e8ce4066ac21c1852c166d2224ba9996..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13918 zcmV-kHlfLhP)kv*~ZT-ZRwyaWnp3I=+Y68-jOK9L<9?#h@yVR9={|;#i%hRF|mEtsEHUw z#Q>IA2}P0KL_k1UdXc5GEM@o3eE*r}-otS3?kaV&BSRF2O$ z;|wH2B;hO4kdcwWnS9&%k19v4g1}C|g(=4|$nMy&Ln^3LsZwxvqehKjdFq3E#fla8 z?%m4)l&D_4`ho=uAX54A6f>P9Qo%nLp5&)p`Z3M@mpk!xfgHe?# zRXFAV^#bBDvpG3AI$5qn$+P8$1uCjfUG2A-@bk5CD_jrj~+c}oU2ZI+i-ND5D0<=FaaX4;?JOA@N*yu1VA9r>|3^M*|cdB=fRQs z7-4Xf;-Zes1IJK8L<+Z0HOb1_wQI5AeAW5?N(r63l8{%uBbJB4H}qGeD@zs0I3K*O9Ta!Q9ghL;+*6F-k08x-iJ<`H*e-bOfDzE zlrtQ21|?=SiA~!{P)wlfBn{XDNQIe^lWOTy)VQ6nax7ku%z%X8yYIdOefSh;)~{br zkYxhzQ@o5VMMr@(ibxS0=<^el;8*2^gsG*gJ{5=|Rmcsh3>o4is!24kJt=DRih=+( zx2#W?R9+B#O6bd1WCGMM2B@a`_3L9TsCF<`fZm43VRja>6et8;xr%17;nYWc0X>dy zlO|0d$!V6yKI$jY!&~5_Z8)e~x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GBkbxRl;Egg27~}pVPY`~^%Zc?dE97(jF?ofOXEr5{onlNH{6l) zbPq#Fvw#kdV)^MOnhhn!Bipo!$gzFZ9MWZ7|GF7yuec zNlAf!AAR&uNvgz4v52;d(B=j9EmgK?Mu|AxzLnm-e9sNG`qSR9oQJRVu%fiy#;7!b zWG=j+M=)BtOMy!vZs_6tF-(5b4o!l~|Gj>FoI{;&;waxVYQBDgmoN=7PLpC1@wiZ5 zKmYm9wY;m4UM1c%4w1MgH3dX1anV3Q-f&{Hln((4NnwVcxscrQQB5c-q*@_?SR7;~ szrgUQ`tSpj=il3(d;_;aqSVCl|6u_sAwr4)#Q*>R07*qoM6N<$f=wWw=l}o! diff --git a/rhinocommon/cs/SampleCsCommands/SampleCsClipboard.cs b/rhinocommon/cs/SampleCsCommands/SampleCsClipboard.cs deleted file mode 100644 index c2f271ce..00000000 --- a/rhinocommon/cs/SampleCsCommands/SampleCsClipboard.cs +++ /dev/null @@ -1,208 +0,0 @@ -using System; -using System.Diagnostics; -using System.IO; -using System.Runtime.Serialization; -using System.Runtime.Serialization.Formatters.Binary; -using System.Windows.Forms; -using Rhino; -using Rhino.Commands; -using Rhino.Geometry; - -namespace SampleCsCommands -{ - /// - /// SampleCsCopyToClipboard command - /// - public class SampleCsCopyToClipboard : Command - { - public override string EnglishName => "SampleCsCopyToClipboard"; - - protected override Result RunCommand(RhinoDoc doc, RunMode mode) - { - var sphere = new Sphere(Plane.WorldXY, 5.0); - var brep = sphere.ToBrep(); - - var rc = SampleCsGeometryBaseClipboardHelper.Write(brep); - if (rc) - { - //Console.WriteLine("{0} copied to the Windows Clipboard", brep.ObjectType); - RhinoApp.WriteLine("{0} copied to the Windows Clipboard", brep.ObjectType); - } - - return Result.Success; - } - } - - /// - /// SampleCsPasteFromClipboard command - /// - public class SampleCsPasteFromClipboard : Command - { - public override string EnglishName => "SampleCsPasteFromClipboard"; - - protected override Result RunCommand(RhinoDoc doc, RunMode mode) - { - var geometry = SampleCsGeometryBaseClipboardHelper.Read(); - if (null == geometry) - { - RhinoApp.WriteLine("Nothing to paste."); - return Result.Nothing; - } - - doc.Objects.Add(geometry); - doc.Views.Redraw(); - - return Result.Success; - } - } - - public static class SampleCsGeometryBaseClipboardHelper - { - private const string CLIPBOARD_FORMAT = "Rhino.Geometry.GeometryBase"; - - /// - /// Writes an object, that inherits from Rhino.Geometry.GeometryBase to the Windows Clipboard. - /// - /// The geometry to write. - /// True if successful, false otherwise. - public static bool Write(GeometryBase geometry) - { - if (null == geometry) - return false; - - var bytes = GeometryBaseToBytes(geometry); - if (null == bytes || 0 == bytes.Length) - return false; - - return WriteClipboardBytes(bytes); - } - - /// - /// Reads an object, that inherits from Rhino.Geometry.GeometryBase from the Windows Clipboard. - /// - /// The object if successful, null otherwise. - public static GeometryBase Read() - { - var bytes = ReadClipboardBytes(); - if (null == bytes || 0 == bytes.Length) - return null; - - return BytesToGeometryBase(bytes); - } - - /// - /// Converts an object that inherits from Rhino.Geometry.GeometryBase to an array of bytes. - /// - private static byte[] GeometryBaseToBytes(GeometryBase src) - { - if (null == src) - return null; - - var rc = Array.Empty(); - try - { - var formatter = new BinaryFormatter(); - using (var stream = new MemoryStream()) - { - formatter.Serialize(stream, src); - rc = stream.ToArray(); - } - } - catch (Exception e) - { - Debug.WriteLine(e.Message); - } - - return rc; - } - - /// - /// Converts an array of bytes to an object that inherits from Rhino.Geometry.GeometryBase. - /// - private static GeometryBase BytesToGeometryBase(byte[] bytes) - { - if (null == bytes || 0 == bytes.Length) - return null; - - GeometryBase rc = null; - try - { - using (var stream = new MemoryStream()) - { - var formatter = new BinaryFormatter {Binder = new GeometryBaseBinder()}; - stream.Write(bytes, 0, bytes.Length); - stream.Seek(0, SeekOrigin.Begin); - if (formatter.Deserialize(stream) is GeometryBase geometry && geometry.IsValid) - rc = geometry; - } - } - catch (Exception e) - { - Debug.WriteLine(e.Message); - } - - return rc; - } - - /// - /// Writes an array of bytes to the Window Clipboard in our format. - /// - private static bool WriteClipboardBytes(byte[] bytes) - { - if (null == bytes || 0 == bytes.Length) - return false; - - var rc = false; - try - { - var data = new DataObject(); - using (var stream = new MemoryStream()) - { - stream.Write(bytes, 0, bytes.Length); - data.SetData(CLIPBOARD_FORMAT, false, stream); - Clipboard.SetDataObject(data, true); - rc = true; - } - } - catch (Exception e) - { - Debug.WriteLine(e.Message); - } - - return rc; - } - - /// - /// Reads an array of bytes from the Window Clipboard in our format. - /// - private static byte[] ReadClipboardBytes() - { - if (!(Clipboard.GetDataObject() is DataObject data) || !data.GetDataPresent(CLIPBOARD_FORMAT)) - return null; - - var stream = data.GetData(CLIPBOARD_FORMAT) as MemoryStream; - return stream?.ToArray(); - } - - /// - /// Both RhinoCommon and Rhino3dmIO have a Rhino.Geometry.GeometryBase - /// class. This serialization binder helps deserialize the equivalent - /// objects across the different assemblies. - /// - private class GeometryBaseBinder : SerializationBinder - { - public override Type BindToType(string assemblyName, string typeName) - { - if (assemblyName == null) - throw new ArgumentNullException(nameof(assemblyName)); - - var assembly = typeof(GeometryBase).Assembly; - assemblyName = assembly.ToString(); - var type_to_deserialize = Type.GetType($"{typeName}, {assemblyName}"); - - return type_to_deserialize; - } - } - - } -} \ No newline at end of file diff --git a/rhinocommon/cs/SampleCsCommands/SampleCsDrawViewportLogo.cs b/rhinocommon/cs/SampleCsCommands/SampleCsDrawViewportLogo.cs deleted file mode 100644 index 05752ad9..00000000 --- a/rhinocommon/cs/SampleCsCommands/SampleCsDrawViewportLogo.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using Rhino; -using Rhino.Commands; -using Rhino.Geometry; -using Rhino.Input.Custom; - -namespace SampleCsCommands -{ - /// - /// SampleCsDrawViewportLogo command - /// - public class SampleCsDrawViewportLogo : Command - { - public override string EnglishName => "SampleCsDrawViewportLogo"; - - protected override Result RunCommand(RhinoDoc doc, RunMode mode) - { - SampleCsDrawViewportLogoConduit conduit = new SampleCsDrawViewportLogoConduit(); - conduit.Enabled = true; - doc.Views.Redraw(); - - GetString gs = new GetString(); - gs.SetCommandPrompt("Press to continue"); - gs.AcceptNothing(true); - gs.Get(); - - conduit.Enabled = false; - doc.Views.Redraw(); - - return Result.Success; - } - } - - /// - /// SampleCsDrawViewportLogoConduit display conduit - /// - public class SampleCsDrawViewportLogoConduit : Rhino.Display.DisplayConduit - { - private float m_sprite_size = 64; - private System.Drawing.Bitmap m_logo; - private readonly Rhino.Display.DisplayBitmap m_bitmap; - - public SampleCsDrawViewportLogoConduit() - { - m_logo = SampleCsCommands.Properties.Resources.Logo; - m_bitmap = new Rhino.Display.DisplayBitmap(m_logo); - } - - protected override void DrawForeground(Rhino.Display.DrawEventArgs e) - { - System.Drawing.Rectangle rect = e.Viewport.Bounds; - Point2d point = new Point2d(rect.Right - (0.5 * m_sprite_size), rect.Bottom - (0.5 * m_sprite_size)); - e.Display.DrawSprite(m_bitmap, point, m_sprite_size); - } - } - -} diff --git a/rhinocommon/cs/SampleCsCommands/SampleCsRestoreLayerState.cs b/rhinocommon/cs/SampleCsCommands/SampleCsRestoreLayerState.cs deleted file mode 100644 index c555e68a..00000000 --- a/rhinocommon/cs/SampleCsCommands/SampleCsRestoreLayerState.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using Rhino; -using Rhino.Commands; - -namespace SampleCsCommands -{ - public class SampleCsRestoreLayerState : Command - { - public override string EnglishName => "SampleCsRestoreLayerState"; - - protected override Result RunCommand(RhinoDoc doc, RunMode mode) - { - Guid plugin_id = Rhino.PlugIns.PlugIn.IdFromName("Rhino Bonus Tools"); - if (plugin_id == Guid.Empty) - return Result.Failure; - - // The object returned by Rhino.RhinoApp.GetPlugInObject is a COM object, not a .NET object. - // C# 4 introduced the new dynamic keyword, which was designed with COM Interop in mind. - // The intent was to make calling properties and methods in C# as easy as it was in VBScript, etc. - - dynamic plugin_obj = Rhino.RhinoApp.GetPlugInObject(plugin_id); - if (null == plugin_obj) - return Result.Failure; - - object[] layer_states = plugin_obj.LayerStateNames(); - foreach (object layer_state in layer_states) - { - string state_name = layer_state.ToString(); - if (state_name.Equals("MyLayerState", StringComparison.OrdinalIgnoreCase)) - plugin_obj.RestoreLayerState(layer_state, 0); - } - - return Result.Success; - } - } -} diff --git a/rhinocommon/cs/SampleCsCommands/SampleCsSerializeClass.cs b/rhinocommon/cs/SampleCsCommands/SampleCsSerializeClass.cs deleted file mode 100644 index 353bceab..00000000 --- a/rhinocommon/cs/SampleCsCommands/SampleCsSerializeClass.cs +++ /dev/null @@ -1,198 +0,0 @@ -using System; -using System.IO; -using System.Runtime.Serialization.Formatters.Binary; -using Rhino; -using Rhino.Commands; -using Rhino.DocObjects; -using Rhino.DocObjects.Custom; -using Rhino.FileIO; -using Rhino.Input; - -namespace SampleCsCommands -{ - public class SampleCsSerializeClass : Command - { - public override string EnglishName => "SampleCsSerializeClass"; - - protected override Result RunCommand(RhinoDoc doc, RunMode mode) - { - var rc = RhinoGet.GetOneObject("Select object", false, ObjectType.AnyObject, out var objref); - if (rc != Result.Success) - return rc; - - var obj = objref.Object(); - if (null == obj) - return Result.Failure; - - if (!(obj.Attributes.UserData.Find(typeof(SampleCsCustomUserData)) is SampleCsCustomUserData ud)) - { - var rand = new Random(); - ud = new SampleCsCustomUserData - { - Data = - { - X = rand.NextDouble(), - Y = rand.NextDouble(), - Z = rand.NextDouble() - } - }; - obj.Attributes.UserData.Add(ud); - } - - RhinoApp.WriteLine("{0} = {1}", ud.Description, ud.Data); - - return Result.Success; - } - } - - /// - /// SampleCsCustomUserData - /// - [System.Runtime.InteropServices.Guid("23A7FA3D-74F6-4578-9059-B5E3611CD406")] - public class SampleCsCustomUserData : UserData - { - public SampleCsCustomClass Data { get; } - - public SampleCsCustomUserData() - { - Data = new SampleCsCustomClass(); - } - - public bool IsValid => Data.IsValid; - - public override string Description => "SampleCsCustomClass"; - - public override string ToString() - { - return Description; - } - - protected override void OnDuplicate(UserData source) - { - if (source is SampleCsCustomUserData src) - { - Data.Create(src.Data); - } - } - - public override bool ShouldWrite => IsValid; - - protected override bool Read(BinaryArchiveReader archive) - { - archive.Read3dmChunkVersion(out var major, out var minor); - if (1 == major && 0 == minor) - { - Data.Read(archive); - } - return !archive.ReadErrorOccured; - } - - protected override bool Write(BinaryArchiveWriter archive) - { - archive.Write3dmChunkVersion(1, 0); - Data.Write(archive); - return !archive.WriteErrorOccured; - } - } - - /// - /// SampleCsCustomClass - /// - [Serializable] - public class SampleCsCustomClass - { - public double X { get; set; } - public double Y { get; set; } - public double Z { get; set; } - - public SampleCsCustomClass() - { - X = Y = Z = 0.0; - } - - public SampleCsCustomClass(SampleCsCustomClass src) - { - X = src.X; - Y = src.Y; - Z = src.Z; - } - - public void Create(SampleCsCustomClass src) - { - X = src.X; - Y = src.Y; - Z = src.Z; - } - - public bool IsValid => RhinoMath.IsValidDouble(X) && - RhinoMath.IsValidDouble(Y) && - RhinoMath.IsValidDouble(Z); - - public bool Write(BinaryArchiveWriter archive) - { - var rc = false; - if (null != archive) - { - try - { - // Write chunk version - archive.Write3dmChunkVersion(1, 0); - - // Write 'this' object - var formatter = new BinaryFormatter(); - var stream = new MemoryStream(); - formatter.Serialize(stream, this); - stream.Seek(0, 0); - var bytes = stream.ToArray(); - archive.WriteByteArray(bytes); - stream.Close(); - - // Verify writing - rc = archive.WriteErrorOccured; - } - catch - { - // TODO - } - } - return rc; - } - - public bool Read(BinaryArchiveReader archive) - { - var rc = false; - if (null != archive) - { - // Read and verify chunk version - archive.Read3dmChunkVersion(out var major, out var minor); - if (1 == major && 0 == minor) - { - try - { - // Read this object - var bytes = archive.ReadByteArray(); - var stream = new MemoryStream(bytes); - var formatter = new BinaryFormatter(); - var data = formatter.Deserialize(stream) as SampleCsCustomClass; - Create(data); - - // Verify reading - rc = archive.ReadErrorOccured; - } - catch - { - // TODO - } - } - } - return rc; - } - - public override string ToString() - { - var culture = System.Globalization.CultureInfo.InvariantCulture; - return $"{X.ToString(culture)},{Y.ToString(culture)},{Z.ToString(culture)}"; - } - } - -} diff --git a/rhinocommon/cs/SampleCsCommands/SampleCsWritePdf.cs b/rhinocommon/cs/SampleCsCommands/SampleCsWritePdf.cs deleted file mode 100644 index 049682d8..00000000 --- a/rhinocommon/cs/SampleCsCommands/SampleCsWritePdf.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using Rhino; -using Rhino.Commands; -using Rhino.FileIO; - -namespace SampleCsCommands -{ - public class SampleCsWritePdf : Command - { - public override string EnglishName => "SampleCsWritePdf"; - - protected override Result RunCommand(RhinoDoc doc, RunMode mode) - { - var pdf = FilePdf.Create(); - - var pdf_doc = pdf.PdfDocumentImplementation() as Xfinium.Pdf.PdfFixedDocument; - if (null == pdf_doc) - return Result.Failure; - - var cover_page = pdf_doc.Pages.Add(); - - using (var font = new System.Drawing.Font("Arial", 30)) - { - var pdf_font = new Xfinium.Pdf.Graphics.PdfUnicodeTrueTypeFont(font, false) { Underline = true }; - var color = new Xfinium.Pdf.Graphics.PdfRgbColor(0, 0, 0); - var appearance = new Xfinium.Pdf.Graphics.PdfStringAppearanceOptions(pdf_font, null, new Xfinium.Pdf.Graphics.PdfBrush(color)); - var layout = new Xfinium.Pdf.Graphics.PdfStringLayoutOptions - { - HorizontalAlign = Xfinium.Pdf.Graphics.PdfStringHorizontalAlign.Center, - X = cover_page.Width / 2, - Y = cover_page.Height / 2 - }; - cover_page.Graphics.DrawString(EnglishName, appearance, layout); - } - - const int w = (int)(8.5 * 300); - const int h = 11 * 300; - - var views = doc.Views.GetViewList(true, false); - for (var i = 0; i < views.Length; i++) - { - var view = views[i]; - var viewcapture = new Rhino.Display.ViewCaptureSettings(view, new System.Drawing.Size(w, h), 300); - var page_index = pdf.AddPage(viewcapture) - 1; - using (var font = new System.Drawing.Font("Arial", 80)) - { - var pdf_font = new Xfinium.Pdf.Graphics.PdfUnicodeTrueTypeFont(font, false); - var color = new Xfinium.Pdf.Graphics.PdfRgbColor(40, 40, 40); - var pen = new Xfinium.Pdf.Graphics.PdfPen(color, 3); - var appearance = new Xfinium.Pdf.Graphics.PdfStringAppearanceOptions(pdf_font, pen, null); - var layout = new Xfinium.Pdf.Graphics.PdfStringLayoutOptions - { - HorizontalAlign = Xfinium.Pdf.Graphics.PdfStringHorizontalAlign.Center, - Rotation = 45, - X = cover_page.Width / 2, - Y = cover_page.Height / 2 - }; - pdf_doc.Pages[page_index].Graphics.DrawString("Top Secret", appearance, layout); - } - - using (var font = new System.Drawing.Font("Arial", 20)) - { - var pdf_font = new Xfinium.Pdf.Graphics.PdfUnicodeTrueTypeFont(font, false); - var color = new Xfinium.Pdf.Graphics.PdfRgbColor(0, 0, 0); - var appearance = new Xfinium.Pdf.Graphics.PdfStringAppearanceOptions(pdf_font, null, new Xfinium.Pdf.Graphics.PdfBrush(color)); - var layout = new Xfinium.Pdf.Graphics.PdfStringLayoutOptions - { - HorizontalAlign = Xfinium.Pdf.Graphics.PdfStringHorizontalAlign.Right, - X = cover_page.Width * 0.9, - Y = cover_page.Height * 0.9 - }; - pdf_doc.Pages[page_index].Graphics.DrawString($"Page {i + 1} of {views.Length}", appearance, layout); - } - } - - var path = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory); - path = System.IO.Path.Combine(path, EnglishName + ".pdf"); - pdf.Write(path); - - return Result.Success; - } - } -} \ No newline at end of file