This commit is contained in:
TinyHerm committed 2026-11-24 23:40:08 +03:00
commit 1c7a8cf25f
579 files changed
+83196

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
using System;
using System.Windows.Forms;
namespace VibranceHud.Controls;
internal static class TheClipboard
{
internal static Action<string>? InsteadOfTheRealOneForTest { get; set; }
internal static bool Put(string text)
{
if (string.IsNullOrEmpty(text))
{
return false;
}
Action<string> insteadOfTheRealOneForTest = InsteadOfTheRealOneForTest;
if (insteadOfTheRealOneForTest != null)
{
insteadOfTheRealOneForTest(text);
return true;
}
try
{
Clipboard.SetText(text);
return true;
}
catch (Exception ex)
{
CrashLog.Write(ex);
return false;
}
}
}