initial commit

This commit is contained in:
i2p
2026-08-27 11:22:57 -06:00
commit 3ad3d6e5f4
211 changed files with 105455 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
using System.Threading;
namespace SHARP
{
internal class Clipboard
{
public static string GetText()
{
string ReturnValue = string.Empty;
try
{
Thread thread = new Thread((ThreadStart) (() => ReturnValue = System.Windows.Forms.Clipboard.GetText()));
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
thread.Join();
}
catch
{
}
return ReturnValue;
}
public static void SetText(string text)
{
Thread thread = new Thread((ThreadStart) (() =>
{
try
{
System.Windows.Forms.Clipboard.SetText(text);
}
catch
{
}
}));
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
thread.Join();
}
}
}