private static void SendObfuscated(string strKeys)
{
Debug.Assert(strKeys != null);
if (strKeys == null)
{
throw new ArgumentNullException("strKeys");
}
if (strKeys.Length == 0)
{
return;
}
ClipboardEventChainBlocker cev = new ClipboardEventChainBlocker();
ClipboardContents cnt = new ClipboardContents(true);
Exception excpInner = null;
char[] vSpecial = new char[] { '{', '}', '(', ')', '+', '^', '%',
' ', '\t', '\r', '\n' };
try
{
List <string> vParts = SplitKeySequence(strKeys);
foreach (string strPart in vParts)
{
if (strPart.Length == 0)
{
continue;
}
if (strPart.IndexOfAny(vSpecial) >= 0)
{
SendKeysWithSpecial(strPart);
}
else
{
MixedTransfer(strPart);
}
}
}
catch (Exception ex) { excpInner = ex; }
cnt.SetData();
cev.Release();
if (excpInner != null)
{
throw excpInner;
}
}