public static void InvokeSafe(this ISynchronizeInvoke invoker, Action action) { if (invoker.InvokeRequired) invoker.Invoke(action); else action(); }