Compare commits
2 Commits
2.0.0beta1
...
1.6.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
911d06154c | ||
|
|
16cd8c89f8 |
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
@@ -6,7 +6,7 @@
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
<userSettings>
|
||||
<TypeClipboard.Properties.Settings>
|
||||
@@ -18,4 +18,4 @@
|
||||
</setting>
|
||||
</TypeClipboard.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
</configuration>
|
||||
67
TypeClipboard/Form1.Designer.cs
generated
67
TypeClipboard/Form1.Designer.cs
generated
@@ -1,4 +1,7 @@
|
||||
namespace TypeClipboard
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TypeClipboard
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
@@ -23,8 +26,8 @@
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
@@ -37,6 +40,8 @@
|
||||
this.button3 = new System.Windows.Forms.Button();
|
||||
this.chkEnter = new System.Windows.Forms.CheckBox();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.comboBox1 = new System.Windows.Forms.ComboBox();
|
||||
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBox1
|
||||
@@ -61,7 +66,7 @@
|
||||
// chkHotkey
|
||||
//
|
||||
this.chkHotkey.AutoSize = true;
|
||||
this.chkHotkey.Location = new System.Drawing.Point(172, 42);
|
||||
this.chkHotkey.Location = new System.Drawing.Point(102, 98);
|
||||
this.chkHotkey.Name = "chkHotkey";
|
||||
this.chkHotkey.Size = new System.Drawing.Size(73, 17);
|
||||
this.chkHotkey.TabIndex = 2;
|
||||
@@ -102,7 +107,7 @@
|
||||
// chkEnter
|
||||
//
|
||||
this.chkEnter.AutoSize = true;
|
||||
this.chkEnter.Location = new System.Drawing.Point(244, 42);
|
||||
this.chkEnter.Location = new System.Drawing.Point(177, 98);
|
||||
this.chkEnter.Name = "chkEnter";
|
||||
this.chkEnter.Size = new System.Drawing.Size(78, 17);
|
||||
this.chkEnter.TabIndex = 7;
|
||||
@@ -117,10 +122,39 @@
|
||||
//
|
||||
this.toolTip1.ShowAlways = true;
|
||||
//
|
||||
// comboBox1
|
||||
//
|
||||
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBox1.FormattingEnabled = true;
|
||||
this.comboBox1.Items.AddRange(new object[] {
|
||||
"SendInput",
|
||||
"SendKeys"});
|
||||
this.comboBox1.Location = new System.Drawing.Point(12, 95);
|
||||
this.comboBox1.Margin = new System.Windows.Forms.Padding(5);
|
||||
this.comboBox1.Name = "comboBox1";
|
||||
this.comboBox1.Size = new System.Drawing.Size(82, 21);
|
||||
this.comboBox1.TabIndex = 9;
|
||||
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
|
||||
//
|
||||
// linkLabel1
|
||||
//
|
||||
this.linkLabel1.AutoSize = true;
|
||||
this.linkLabel1.Location = new System.Drawing.Point(293, 98);
|
||||
this.linkLabel1.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.linkLabel1.Name = "linkLabel1";
|
||||
this.linkLabel1.Size = new System.Drawing.Size(29, 13);
|
||||
this.linkLabel1.TabIndex = 10;
|
||||
this.linkLabel1.TabStop = true;
|
||||
this.linkLabel1.Text = "Help";
|
||||
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.ClientSize = new System.Drawing.Size(334, 99);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(332, 124);
|
||||
this.Controls.Add(this.linkLabel1);
|
||||
this.Controls.Add(this.comboBox1);
|
||||
this.Controls.Add(this.chkEnter);
|
||||
this.Controls.Add(this.button3);
|
||||
this.Controls.Add(this.textBox2);
|
||||
@@ -146,14 +180,15 @@
|
||||
|
||||
#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;
|
||||
private ComboBox comboBox1;
|
||||
private LinkLabel linkLabel1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
@@ -97,7 +98,10 @@ 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) {
|
||||
comboBox1.SelectedItem = Properties.Settings.Default.typeMethod;
|
||||
|
||||
ClipboardNotification.ClipboardUpdate += delegate (object cb_sender, EventArgs cb_e)
|
||||
{
|
||||
UpdateTextbox();
|
||||
};
|
||||
UpdateTextbox();
|
||||
@@ -141,5 +145,24 @@ namespace TypeClipboard
|
||||
_tc.TypeEnter = chkEnter.Checked;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Process.Start(new ProcessStartInfo { FileName = @"https://github.com/jlaundry/TypeClipboard/wiki/Help", UseShellExecute = true });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Unable to open default browser. Go to https://github.com/jlaundry/TypeClipboard/wiki/Help");
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.typeMethod = (string)comboBox1.SelectedItem;
|
||||
_tc.TypeMethod = (string)comboBox1.SelectedItem;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,10 +120,4 @@
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -1,9 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TypeClipboard
|
||||
{
|
||||
static class Program
|
||||
internal static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// 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")]
|
||||
[assembly: AssemblyVersion("1.6.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.6.0.0")]
|
||||
|
||||
44
TypeClipboard/Properties/Resources.Designer.cs
generated
44
TypeClipboard/Properties/Resources.Designer.cs
generated
@@ -8,10 +8,10 @@
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace TypeClipboard.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
namespace TypeClipboard.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
@@ -19,43 +19,51 @@ namespace TypeClipboard.Properties {
|
||||
// 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.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
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() {
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TypeClipboard.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
37
TypeClipboard/Properties/Settings.Designer.cs
generated
37
TypeClipboard/Properties/Settings.Designer.cs
generated
@@ -12,7 +12,7 @@ namespace TypeClipboard.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.2.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
@@ -26,25 +26,46 @@ namespace TypeClipboard.Properties {
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool enableHotkey {
|
||||
get {
|
||||
public bool enableHotkey
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((bool)(this["enableHotkey"]));
|
||||
}
|
||||
set {
|
||||
set
|
||||
{
|
||||
this["enableHotkey"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool enableEnter {
|
||||
get {
|
||||
public bool enableEnter
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((bool)(this["enableEnter"]));
|
||||
}
|
||||
set {
|
||||
set
|
||||
{
|
||||
this["enableEnter"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("SendInput")]
|
||||
public string typeMethod
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((string)(this["typeMethod"]));
|
||||
}
|
||||
set
|
||||
{
|
||||
this["typeMethod"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
@@ -12,7 +12,6 @@
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
@@ -25,9 +24,12 @@
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.5.0.0</ApplicationVersion>
|
||||
<ApplicationVersion>1.6.0.0</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode>
|
||||
<ForceDesignerDpiUnaware>true</ForceDesignerDpiUnaware>
|
||||
<!-- Otherwise System.Windows.Input has no methods in .NET 8... -->
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -37,19 +39,16 @@
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>0</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>typeclipboard.ico</ApplicationIcon>
|
||||
@@ -91,7 +90,6 @@
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
@@ -110,9 +108,9 @@
|
||||
<Content Include="typeclipboard.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.6.1">
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4.6.1 %28x86 and x64%29</ProductName>
|
||||
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
|
||||
@@ -17,8 +17,11 @@ namespace TypeClipboard
|
||||
private const int INTERKEY_DELAY = 50;
|
||||
|
||||
private bool _typeEnter = false;
|
||||
private string _typeMethod = "SendInput";
|
||||
public bool TypeEnter { get => _typeEnter; set => _typeEnter = value; }
|
||||
|
||||
public string TypeMethod { get => _typeMethod; set => _typeMethod = value; }
|
||||
|
||||
public void Type(String str, int delay = 2000)
|
||||
{
|
||||
Thread.Sleep(delay);
|
||||
@@ -26,20 +29,85 @@ namespace TypeClipboard
|
||||
//KeyboardTyper.Reset();
|
||||
|
||||
KeyboardTyper.Type(str, _typeEnter, INTERKEY_DELAY);
|
||||
//KeyboardTyper.Press(Key.LeftShift);
|
||||
//KeyboardTyper.Type("hello, capitalized world");
|
||||
//KeyboardTyper.Release(Key.LeftShift);
|
||||
|
||||
NativeMethods.BlockInput(false);
|
||||
|
||||
}
|
||||
|
||||
public void TypeWithSendKeys(String str, int delay)
|
||||
{
|
||||
Thread.Sleep(delay);
|
||||
foreach (Char c in str.ToCharArray())
|
||||
{
|
||||
// Some characters have special meaning
|
||||
// https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/sendkeys-statement
|
||||
switch (c)
|
||||
{
|
||||
case '\n':
|
||||
if (_typeEnter)
|
||||
{
|
||||
SendKeys.Send("{ENTER}");
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
case '\r':
|
||||
if (_typeEnter)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
case '{':
|
||||
SendKeys.Send("{{}");
|
||||
break;
|
||||
case '}':
|
||||
SendKeys.Send("{}}");
|
||||
break;
|
||||
case '+':
|
||||
SendKeys.Send("{+}");
|
||||
break;
|
||||
case '^':
|
||||
SendKeys.Send("{^}");
|
||||
break;
|
||||
case '%':
|
||||
SendKeys.Send("{%}");
|
||||
break;
|
||||
case '~':
|
||||
SendKeys.Send("{~}");
|
||||
break;
|
||||
case '(':
|
||||
SendKeys.Send("{(}");
|
||||
break;
|
||||
case ')':
|
||||
SendKeys.Send("{)}");
|
||||
break;
|
||||
default:
|
||||
SendKeys.Send(c.ToString());
|
||||
break;
|
||||
}
|
||||
Thread.Sleep(INTERKEY_DELAY);
|
||||
}
|
||||
}
|
||||
|
||||
public void TypeClipboard(int delay = 2000)
|
||||
{
|
||||
if (Clipboard.ContainsText(TextDataFormat.UnicodeText))
|
||||
{
|
||||
String clipboard = Clipboard.GetText(TextDataFormat.UnicodeText);
|
||||
this.Type(clipboard, delay);
|
||||
if (_typeMethod == "SendKeys")
|
||||
{
|
||||
TypeWithSendKeys(clipboard, delay);
|
||||
}
|
||||
else
|
||||
{
|
||||
// SendInput is default
|
||||
Type(clipboard, delay);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<Identity
|
||||
Name="3373JedLaundry.TypeClipboard"
|
||||
Publisher="CN=CE320BA0-58BC-4F47-AF5B-94DB661147CC"
|
||||
Version="1.5.0.0" />
|
||||
Version="1.6.0.0" />
|
||||
|
||||
<Properties>
|
||||
<DisplayName>TypeClipboard</DisplayName>
|
||||
|
||||
@@ -51,49 +51,12 @@
|
||||
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" />
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>d041bcc6-3c9d-4bdc-8443-2bec9b290d1a</ProjectGuid>
|
||||
<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
|
||||
<TargetPlatformVersion>10.0.26100.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
|
||||
<EntryPointProjectUniqueName>..\TypeClipboard\TypeClipboard.csproj</EntryPointProjectUniqueName>
|
||||
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
|
||||
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
|
||||
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
|
||||
<GenerateTestArtifacts>False</GenerateTestArtifacts>
|
||||
<AppxBundlePlatforms>neutral</AppxBundlePlatforms>
|
||||
<AppInstallerUri>C:\temp</AppInstallerUri>
|
||||
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
|
||||
<PackageCertificateKeyFile>TypeClipboardAppx_TemporaryKey.pfx</PackageCertificateKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<AppxBundle>Always</AppxBundle>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<AppxBundle>Always</AppxBundle>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<AppxBundle>Always</AppxBundle>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
|
||||
<AppxBundle>Always</AppxBundle>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
|
||||
<AppxBundle>Always</AppxBundle>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
|
||||
<AppxBundle>Always</AppxBundle>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<AppxBundle>Always</AppxBundle>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<AppxBundle>Always</AppxBundle>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<AppxBundle>Always</AppxBundle>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
|
||||
<AppxBundle>Always</AppxBundle>
|
||||
<NoWarn>$(NoWarn);NU1702</NoWarn>
|
||||
<PackageCertificateThumbprint>FEEF43DFCBAB446B040886D53A9FF02C8C201CBA</PackageCertificateThumbprint>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="Package.appxmanifest">
|
||||
@@ -111,8 +74,8 @@
|
||||
<None Include="TypeClipboardAppx_TemporaryKey.pfx" />
|
||||
<None Include="Package.StoreAssociation.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\TypeClipboard\TypeClipboard.csproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1742" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"sdk": {
|
||||
"version": "4.7.1"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user