private void HandleResponse(Object sender, ResponseEventArgs args) { if (InvokeRequired) { Invoke(new EventHandler<ResponseEventArgs>(HandleResponse), new Object[] { sender, args }); } Debug.WriteLine("Response received: {0}", args); DisplayResult(args.ResponseResult); }
private void OnRaiseResponseEvent(Result result) { EventHandler<ResponseEventArgs> handler = RaiseResponseEvent; if (handler != null) { ResponseEventArgs args = new ResponseEventArgs(result); handler(this, args); } }