From 096c6aa661c79048a64e0c3049abbdc8080cd1a4 Mon Sep 17 00:00:00 2001 From: efrick Date: Wed, 31 Jul 2024 16:14:35 -0400 Subject: [PATCH] Add the WinForm framework. --- Form1.Designer.cs | 39 +++++++++++++++ Form1.cs | 10 ++++ Form1.resx | 120 ++++++++++++++++++++++++++++++++++++++++++++++ PDF-Merge.csproj | 12 +++++ PDF-Merge.sln | 25 ++++++++++ Program.cs | 17 +++++++ scratch.cs | 8 ++-- 7 files changed, 227 insertions(+), 4 deletions(-) create mode 100644 Form1.Designer.cs create mode 100644 Form1.cs create mode 100644 Form1.resx create mode 100644 PDF-Merge.csproj create mode 100644 PDF-Merge.sln create mode 100644 Program.cs diff --git a/Form1.Designer.cs b/Form1.Designer.cs new file mode 100644 index 0000000..f86058d --- /dev/null +++ b/Form1.Designer.cs @@ -0,0 +1,39 @@ +namespace PDF_Merge +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Text = "Form1"; + } + + #endregion + } +} diff --git a/Form1.cs b/Form1.cs new file mode 100644 index 0000000..f5e18f0 --- /dev/null +++ b/Form1.cs @@ -0,0 +1,10 @@ +namespace PDF_Merge +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + } +} diff --git a/Form1.resx b/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/PDF-Merge.csproj b/PDF-Merge.csproj new file mode 100644 index 0000000..9c4b751 --- /dev/null +++ b/PDF-Merge.csproj @@ -0,0 +1,12 @@ + + + + WinExe + net6.0-windows + PDF_Merge + enable + true + enable + + + \ No newline at end of file diff --git a/PDF-Merge.sln b/PDF-Merge.sln new file mode 100644 index 0000000..fd8facc --- /dev/null +++ b/PDF-Merge.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34701.34 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PDF-Merge", "PDF-Merge.csproj", "{512BC5EA-5D4B-4F5E-8E08-C7F6AF942057}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {512BC5EA-5D4B-4F5E-8E08-C7F6AF942057}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {512BC5EA-5D4B-4F5E-8E08-C7F6AF942057}.Debug|Any CPU.Build.0 = Debug|Any CPU + {512BC5EA-5D4B-4F5E-8E08-C7F6AF942057}.Release|Any CPU.ActiveCfg = Release|Any CPU + {512BC5EA-5D4B-4F5E-8E08-C7F6AF942057}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C58D94B9-DD90-4D0F-B30D-337F9BC3D4CF} + EndGlobalSection +EndGlobal diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..7e692ea --- /dev/null +++ b/Program.cs @@ -0,0 +1,17 @@ +namespace PDF_Merge +{ + internal static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + // To customize application configuration such as set high DPI settings or default font, + // see https://aka.ms/applicationconfiguration. + ApplicationConfiguration.Initialize(); + Application.Run(new Form1()); + } + } +} \ No newline at end of file diff --git a/scratch.cs b/scratch.cs index 6666fd8..efc1dc7 100644 --- a/scratch.cs +++ b/scratch.cs @@ -1,10 +1,10 @@ +using QuestPDF.Fluent; +using QuestPDF.Infrastructure; using System; using System.IO; using System.Linq; -using QuestPDF.Fluent; -using QuestPDF.Infrastructure; -class Program +internal class Program { static void Main(string[] args) { @@ -32,7 +32,7 @@ using System.Linq; using QuestPDF.Fluent; using QuestPDF.Infrastructure; -class Program +internal class Program { static void MergePdfFiles(string[] filePaths, string outputPath) {