diff --git a/TypeClipboard.sln b/TypeClipboard.sln index 7adc458..59ccea8 100644 --- a/TypeClipboard.sln +++ b/TypeClipboard.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30011.22 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36202.13 d17.14 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TypeClipboard", "TypeClipboard\TypeClipboard.csproj", "{AFF27396-3E91-471E-B46B-2D2DA30FE6DB}" EndProject @@ -76,6 +76,6 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {5EEF55EE-BA4E-44D7-86FC-BF400D4D2424} + SolutionGuid = {72B1A5CF-B914-4E7B-9C0D-E0D565E2F6D0} EndGlobalSection EndGlobal diff --git a/TypeClipboard/App.config b/TypeClipboard/App.config deleted file mode 100644 index bb5e701..0000000 --- a/TypeClipboard/App.config +++ /dev/null @@ -1,21 +0,0 @@ - - - - -
- - - - - - - - - False - - - False - - - - diff --git a/TypeClipboard/Form1.Designer.cs b/TypeClipboard/Form1.Designer.cs index c5d8e0c..1cab5c7 100644 --- a/TypeClipboard/Form1.Designer.cs +++ b/TypeClipboard/Form1.Designer.cs @@ -3,12 +3,12 @@ partial class Form1 { /// - /// Required designer variable. + /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// - /// Clean up any resources being used. + /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) @@ -23,137 +23,135 @@ #region Windows Form Designer generated code /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. + /// 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.textBox1 = new System.Windows.Forms.TextBox(); - this.button1 = new System.Windows.Forms.Button(); - this.chkHotkey = new System.Windows.Forms.CheckBox(); - this.button2 = new System.Windows.Forms.Button(); - this.textBox2 = new System.Windows.Forms.TextBox(); - this.button3 = new System.Windows.Forms.Button(); - this.chkEnter = new System.Windows.Forms.CheckBox(); - this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.SuspendLayout(); + components = new System.ComponentModel.Container(); + textBox1 = new TextBox(); + button1 = new Button(); + chkHotkey = new CheckBox(); + button2 = new Button(); + textBox2 = new TextBox(); + button3 = new Button(); + chkEnter = new CheckBox(); + toolTip1 = new ToolTip(components); + SuspendLayout(); // // textBox1 // - this.textBox1.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBox1.Location = new System.Drawing.Point(12, 12); - this.textBox1.Name = "textBox1"; - this.textBox1.ReadOnly = true; - this.textBox1.Size = new System.Drawing.Size(201, 22); - this.textBox1.TabIndex = 0; + textBox1.Font = new Font("Consolas", 9F, FontStyle.Regular, GraphicsUnit.Point, 0); + textBox1.Location = new Point(12, 12); + textBox1.Name = "textBox1"; + textBox1.ReadOnly = true; + textBox1.Size = new Size(211, 22); + textBox1.TabIndex = 0; // // button1 // - this.button1.Location = new System.Drawing.Point(219, 12); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(103, 22); - this.button1.TabIndex = 1; - this.button1.Text = "Type (2s delay)"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); + button1.Location = new Point(229, 12); + button1.Name = "button1"; + button1.Size = new Size(103, 22); + button1.TabIndex = 1; + button1.Text = "Type (2s delay)"; + button1.UseVisualStyleBackColor = true; + button1.Click += button1_Click; // // chkHotkey // - this.chkHotkey.AutoSize = true; - this.chkHotkey.Location = new System.Drawing.Point(172, 42); - this.chkHotkey.Name = "chkHotkey"; - this.chkHotkey.Size = new System.Drawing.Size(73, 17); - this.chkHotkey.TabIndex = 2; - this.chkHotkey.Text = "F8 hotkey"; - this.toolTip1.SetToolTip(this.chkHotkey, "Enables the F8 hotkey"); - this.chkHotkey.UseVisualStyleBackColor = true; - this.chkHotkey.CheckedChanged += new System.EventHandler(this.chkHotkey_CheckedChanged); + chkHotkey.AutoSize = true; + chkHotkey.Location = new Point(172, 42); + chkHotkey.Name = "chkHotkey"; + chkHotkey.Size = new Size(77, 19); + chkHotkey.TabIndex = 2; + chkHotkey.Text = "F8 hotkey"; + toolTip1.SetToolTip(chkHotkey, "Enables the F8 hotkey"); + chkHotkey.UseVisualStyleBackColor = true; + chkHotkey.CheckedChanged += chkHotkey_CheckedChanged; // // button2 // - this.button2.Location = new System.Drawing.Point(219, 65); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(103, 22); - this.button2.TabIndex = 4; - this.button2.Text = "Type (2s delay)"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); + button2.Location = new Point(229, 65); + button2.Name = "button2"; + button2.Size = new Size(103, 22); + button2.TabIndex = 4; + button2.Text = "Type (2s delay)"; + button2.UseVisualStyleBackColor = true; + button2.Click += button2_Click; // // textBox2 // - this.textBox2.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBox2.Location = new System.Drawing.Point(12, 65); - this.textBox2.Name = "textBox2"; - this.textBox2.ReadOnly = true; - this.textBox2.Size = new System.Drawing.Size(201, 22); - this.textBox2.TabIndex = 5; + textBox2.Font = new Font("Consolas", 9F, FontStyle.Regular, GraphicsUnit.Point, 0); + textBox2.Location = new Point(12, 65); + textBox2.Name = "textBox2"; + textBox2.ReadOnly = true; + textBox2.Size = new Size(211, 22); + textBox2.TabIndex = 5; // // button3 // - this.button3.Location = new System.Drawing.Point(12, 39); - this.button3.Name = "button3"; - this.button3.Size = new System.Drawing.Size(154, 22); - this.button3.TabIndex = 6; - this.button3.Text = "Copy clipboard to buffer"; - this.button3.UseVisualStyleBackColor = true; - this.button3.Click += new System.EventHandler(this.button3_Click); + button3.Location = new Point(12, 39); + button3.Name = "button3"; + button3.Size = new Size(154, 22); + button3.TabIndex = 6; + button3.Text = "Copy clipboard to buffer"; + button3.UseVisualStyleBackColor = true; + button3.Click += button3_Click; // // chkEnter // - this.chkEnter.AutoSize = true; - this.chkEnter.Location = new System.Drawing.Point(244, 42); - this.chkEnter.Name = "chkEnter"; - this.chkEnter.Size = new System.Drawing.Size(78, 17); - this.chkEnter.TabIndex = 7; - this.chkEnter.Text = "Type Enter"; - this.toolTip1.SetToolTip(this.chkEnter, "If set, Type will type newline (\\n) as Enter, which is useful for large blobs of " + - "text.\r\n\r\nIf unset, Type will stop before the first newline, which is useful for " + - "passwords."); - this.chkEnter.UseVisualStyleBackColor = true; - this.chkEnter.CheckedChanged += new System.EventHandler(this.chkEnter_CheckedChanged); + chkEnter.AutoSize = true; + chkEnter.Location = new Point(251, 42); + chkEnter.Name = "chkEnter"; + chkEnter.Size = new Size(81, 19); + chkEnter.TabIndex = 7; + chkEnter.Text = "Type Enter"; + toolTip1.SetToolTip(chkEnter, "If set, Type will type newline (\\n) as Enter, which is useful for large blobs of text.\r\n\r\nIf unset, Type will stop before the first newline, which is useful for passwords."); + chkEnter.UseVisualStyleBackColor = true; + chkEnter.CheckedChanged += chkEnter_CheckedChanged; // // toolTip1 // - this.toolTip1.ShowAlways = true; + toolTip1.ShowAlways = true; // // Form1 // - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; - this.ClientSize = new System.Drawing.Size(334, 99); - this.Controls.Add(this.chkEnter); - this.Controls.Add(this.button3); - this.Controls.Add(this.textBox2); - this.Controls.Add(this.button2); - this.Controls.Add(this.chkHotkey); - this.Controls.Add(this.button1); - this.Controls.Add(this.textBox1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.Name = "Form1"; - this.ShowIcon = false; - this.Text = "Type Clipboard"; - this.TopMost = true; - this.Activated += new System.EventHandler(this.Form1_Activated); - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); - this.Load += new System.EventHandler(this.Form1_Load); - this.Enter += new System.EventHandler(this.Form1_Enter); - this.MouseEnter += new System.EventHandler(this.Form1_MouseEnter); - this.ResumeLayout(false); - this.PerformLayout(); + AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(344, 99); + Controls.Add(chkEnter); + Controls.Add(button3); + Controls.Add(textBox2); + Controls.Add(button2); + Controls.Add(chkHotkey); + Controls.Add(button1); + Controls.Add(textBox1); + FormBorderStyle = FormBorderStyle.FixedDialog; + MaximizeBox = false; + Name = "Form1"; + ShowIcon = false; + Text = "Type Clipboard"; + TopMost = true; + Activated += Form1_Activated; + FormClosing += Form1_FormClosing; + Load += Form1_Load; + Enter += Form1_Enter; + MouseEnter += Form1_MouseEnter; + ResumeLayout(false); + PerformLayout(); } #endregion - private System.Windows.Forms.TextBox textBox1; - private System.Windows.Forms.Button button1; - private System.Windows.Forms.CheckBox chkHotkey; - private System.Windows.Forms.Button button2; - private System.Windows.Forms.TextBox textBox2; - private System.Windows.Forms.Button button3; - private System.Windows.Forms.CheckBox chkEnter; - private System.Windows.Forms.ToolTip toolTip1; + private TextBox textBox1; + private Button button1; + private CheckBox chkHotkey; + private Button button2; + private TextBox textBox2; + private Button button3; + private CheckBox chkEnter; + private ToolTip toolTip1; } } - diff --git a/TypeClipboard/Form1.cs b/TypeClipboard/Form1.cs index d26ee38..accf73a 100644 --- a/TypeClipboard/Form1.cs +++ b/TypeClipboard/Form1.cs @@ -63,7 +63,7 @@ namespace TypeClipboard sb.Append(" (" + clipboard.Length.ToString() + " characters)"); } - + textBox1.Text = sb.ToString(); } else @@ -97,7 +97,8 @@ namespace TypeClipboard // Changing the chkEnter.Checked property also changes _tc.TypeEnter property chkEnter.Checked = Properties.Settings.Default.enableEnter; - ClipboardNotification.ClipboardUpdate += delegate (object cb_sender, EventArgs cb_e) { + ClipboardNotification.ClipboardUpdate += delegate (object cb_sender, EventArgs cb_e) + { UpdateTextbox(); }; UpdateTextbox(); @@ -120,7 +121,7 @@ namespace TypeClipboard { _listener.UnHookKeyboard(); } - + Properties.Settings.Default.Save(); } diff --git a/TypeClipboard/Form1.resx b/TypeClipboard/Form1.resx index 69363bf..dcfd08d 100644 --- a/TypeClipboard/Form1.resx +++ b/TypeClipboard/Form1.resx @@ -1,17 +1,17 @@  - @@ -120,10 +120,4 @@ 17, 17 - - 17, 17 - - - 17, 17 - \ No newline at end of file diff --git a/TypeClipboard/Program.cs b/TypeClipboard/Program.cs index c311030..3f5a947 100644 --- a/TypeClipboard/Program.cs +++ b/TypeClipboard/Program.cs @@ -1,19 +1,17 @@ -using System; -using System.Windows.Forms; - namespace TypeClipboard { - static class Program + internal static class Program { /// - /// The main entry point for the application. + /// The main entry point for the application. /// [STAThread] static void Main() { - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); + // 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/TypeClipboard/Properties/AssemblyInfo.cs b/TypeClipboard/Properties/AssemblyInfo.cs deleted file mode 100644 index ef149dd..0000000 --- a/TypeClipboard/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Type Clipboard")] -[assembly: AssemblyDescription("Types the clipboard contents")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Jed Laundry")] -[assembly: AssemblyProduct("Type Clipboard")] -[assembly: AssemblyCopyright("Copyright © Jed Laundry, 2025")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("aff27396-3e91-471e-b46b-2d2da30fe6db")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.5.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] diff --git a/TypeClipboard/Properties/Resources.Designer.cs b/TypeClipboard/Properties/Resources.Designer.cs deleted file mode 100644 index d77065e..0000000 --- a/TypeClipboard/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +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 TypeClipboard.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("TypeClipboard.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; - } - } - } -} diff --git a/TypeClipboard/Properties/Resources.resx b/TypeClipboard/Properties/Resources.resx deleted file mode 100644 index af7dbeb..0000000 --- a/TypeClipboard/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/TypeClipboard/TypeClipboard.csproj b/TypeClipboard/TypeClipboard.csproj index 64ddfc3..3f5ff9b 100644 --- a/TypeClipboard/TypeClipboard.csproj +++ b/TypeClipboard/TypeClipboard.csproj @@ -1,125 +1,19 @@ - - - + + - Debug - AnyCPU - {AFF27396-3E91-471E-B46B-2D2DA30FE6DB} WinExe - TypeClipboard - TypeClipboard - v4.7.2 - 512 - true - true - - false - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.5.0.0 - false - true + net8.0-windows + enable + true + True + enable + PerMonitorV2 + true + typeclipboard.ico - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 0 - false - - - AnyCPU - pdbonly - true - bin\Release\ - - - prompt - 4 - false - - - typeclipboard.ico - - - - - - - - - - - - - - - - - - - Form - - - Form1.cs - - - - - - - Form1.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - + - - - False - Microsoft .NET Framework 4.6.1 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 - false - - - + \ No newline at end of file diff --git a/TypeClipboard/Typer.cs b/TypeClipboard/Typer.cs index 638f22e..6d0601d 100644 --- a/TypeClipboard/Typer.cs +++ b/TypeClipboard/Typer.cs @@ -1,12 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using System.Windows.Forms; -using System.ComponentModel; -using System.Drawing; +using System.ComponentModel; using System.Runtime.InteropServices; using System.Windows.Input; diff --git a/TypeClipboardAppx/Package.appxmanifest b/TypeClipboardAppx/Package.appxmanifest index 1205d47..50f59df 100644 --- a/TypeClipboardAppx/Package.appxmanifest +++ b/TypeClipboardAppx/Package.appxmanifest @@ -9,7 +9,7 @@ + Version="2.0.0.0" /> TypeClipboard @@ -36,12 +36,7 @@ BackgroundColor="transparent" Square150x150Logo="Images\Square150x150Logo.png" Square44x44Logo="Images\Square44x44Logo.png"> - - - - - - + diff --git a/TypeClipboardAppx/TypeClipboardAppx.wapproj b/TypeClipboardAppx/TypeClipboardAppx.wapproj index bbdbb53..bb565bf 100644 --- a/TypeClipboardAppx/TypeClipboardAppx.wapproj +++ b/TypeClipboardAppx/TypeClipboardAppx.wapproj @@ -1,8 +1,10 @@ + 15.0 + Debug @@ -45,61 +47,30 @@ AnyCPU + $(MSBuildExtensionsPath)\Microsoft\DesktopBridge\ + + - d041bcc6-3c9d-4bdc-8443-2bec9b290d1a - 10.0.18362.0 + D041BCC6-3C9D-4BDC-8443-2BEC9B290D1A + 10.0.26100.0 10.0.17763.0 en-US - True - ..\TypeClipboard\TypeClipboard.csproj - False - SHA256 - False - False - neutral - C:\temp - 0 - TypeClipboardAppx_TemporaryKey.pfx - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always + + false + $(NoWarn);NU1702 + Designer + + @@ -108,11 +79,12 @@ - - - - - + + + + + + \ No newline at end of file diff --git a/global.json b/global.json deleted file mode 100644 index 5d14fe4..0000000 --- a/global.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "sdk": { - "version": "4.7.1" - } -} \ No newline at end of file