public static Tuple <Message, TObject> WaitForSingleWndProc <TObject>(Func <Message, bool> predicate, Func <Message, TObject> generator) { using (WndProcReceiverForm form = new WndProcReceiverForm()) { form.Show(); return(form.WaitForWndProc(predicate, generator)); } }
public static Message WaitForSingleWndProc(Func <Message, bool> predicate) { using (WndProcReceiverForm form = new WndProcReceiverForm()) { form.Show(); return(form.WaitForWndProc(predicate)); } }