От: | alexsoff | ||
Дата: | 09.10.09 13:30 | ||
Оценка: |
public class FormsThreadAttribute : OnMethodInvocationAspect{
public override void OnInvocation(MethodInvocationEventArgs eventArgs)
{
Form f = (Form)eventArgs.Delegate.Target;
if (f.InvokeRequired)
f.Invoke(eventArgs.Delegate, eventArgs.GetArgumentArray());
else eventArgs.Proceed();
}
}