Widow

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 11  →  ?path2? @ 21
/trunk/Widow/Utilities.cs
@@ -35,16 +35,15 @@
return true;
}
 
public static void Execute(this Control control, Action lambda)
public static void InvokeIfRequired<T>(this T control, Action<T> action) where T : Control
{
if (control.InvokeRequired)
{
control.Invoke((MethodInvoker) lambda.Invoke);
control.BeginInvoke((MethodInvoker) delegate { action(control); });
return;
}
else
{
lambda.Invoke();
}
 
action(control);
}
 
public static bool Set(bool enable)