Initial check-in

This commit is contained in:
Robert McRackan 2019-10-04 16:14:04 -04:00
parent c080c9e51d
commit 2cc93078d2
282 changed files with 24387 additions and 0 deletions

View file

@ -0,0 +1,34 @@
using System;
using System.Windows.Forms;
namespace ffmpeg_decrypt
{
public static class StringExt
{
public static string SurroundWithQuotes(this string str) => "\"" + str + "\"";
public static string ExtractString(this string haystack, string before, int needleLength)
{
var index = haystack.IndexOf(before);
var needle = haystack.Substring(index + before.Length, needleLength);
return needle;
}
}
public static class ControlExt
{
/// <summary>
/// Executes the Action asynchronously on the UI thread, does not block execution on the calling thread.
/// </summary>
/// <param name="control"></param>
/// <param name="code"></param>
public static void UIThread(this Control control, Action code)
{
if (control.InvokeRequired)
control.BeginInvoke(code);
else
code.Invoke();
}
}
}