keeweb/helper/win32/src/KeeWebHelper/InputCommands/CopyPasteCommand.cs

26 lines
574 B
C#
Raw Normal View History

2016-04-24 14:12:33 +02:00
using System.Threading;
using System.Windows.Forms;
namespace KeeWebHelper.InputCommands
{
class CopyPasteCommand : InputCommandBase
{
public string Text { get; set; }
public CopyPasteCommand(string text)
{
Text = text;
}
public override void Execute()
{
2016-08-19 19:30:11 +02:00
InputStateValidator.EnsureNoKeyIsPressed();
2016-04-24 14:12:33 +02:00
Thread.Sleep(500);
Clipboard.SetText(Text);
Thread.Sleep(500);
SendKeys.SendWait("+{ins}");
Thread.Sleep(500);
}
}
}